Skip to content
Snippets Groups Projects
  1. Sep 04, 2024
    • Xin Li's avatar
      Revert "Remove abandoned implementation." · 8a3204f4
      Xin Li authored
      Revert submission 3242160-remove-messaging-package
      
      Reason for revert: Droidmonitor created revert due to b/364617310, b/364626927, b/364617560
      
      Reverted changes: /q/submissionid:3241481-remove-messaging-package
      
      This reverts commit 93b5e637.
      
      Change-Id: I182cbf1758988d9a4950d39354266a5fb3aaabce
      8a3204f4
  2. Aug 26, 2024
  3. Oct 17, 2023
  4. May 11, 2023
    • Jake Klinker's avatar
      Trim recipient addresses that are unreasonably long. · 4b16af13
      Jake Klinker authored
      This ensures that bad input does not affect the db - the fallback is a reasonable one where we just launch the new conversation screen and have the user select the recipient.
      
      TESTED=manually confirmed that I could no longer repro b/278556945 after this change.
      BUG=278556945
      
      Change-Id: I705a304a92cb46b20d916c6f5c2db81e6fa84f06
      4b16af13
    • Jake Klinker's avatar
      Trim recipient addresses that are unreasonably long. · e37bb58f
      Jake Klinker authored
      This ensures that bad input does not affect the db - the fallback is a reasonable one where we just launch the new conversation screen and have the user select the recipient.
      
      TESTED=manually confirmed that I could no longer repro b/278556945 after this change.
      BUG=278556945
      
      Change-Id: I705a304a92cb46b20d916c6f5c2db81e6fa84f06
      e37bb58f
  5. May 09, 2023
  6. Oct 16, 2022
    • Cole Faust's avatar
      Fix errorprone warnings that should be errors · 50b73ca5
      Cole Faust authored
      This commit is part of a large scale change to fix errorprone
      errors that have been downgraded to warnings in the android
      source tree, so that they can be promoted to errors again.
      The full list of changes include the following, but not all
      will be present in any one individual commit:
      
      BadAnnotationImplementation
      BadShiftAmount
      BanJNDI
      BoxedPrimitiveEquality
      ComparableType
      ComplexBooleanConstant
      CollectionToArraySafeParameter
      ConditionalExpressionNumericPromotion
      DangerousLiteralNull
      DoubleBraceInitialization
      DurationFrom
      DurationTemporalUnit
      EmptyTopLevelDeclaration
      EqualsNull
      EqualsReference
      FormatString
      FromTemporalAccessor
      GetClassOnAnnotation
      GetClassOnClass
      HashtableContains
      IdentityBinaryExpression
      IdentityHashMapBoxing
      InstantTemporalUnit
      InvalidTimeZoneID
      InvalidZoneId
      IsInstanceIncompatibleType
      JUnitParameterMethodNotFound
      LockOnBoxedPrimitive
      MathRoundIntLong
      MislabeledAndroidString
      MisusedDayOfYear
      MissingSuperCall
      MisusedWeekYear
      ModifyingCollectionWithItself
      NoCanIgnoreReturnValueOnClasses
      NonRuntimeAnnotation
      NullableOnContainingClass
      NullTernary
      OverridesJavaxInjectableMethod
      ParcelableCreator
      PeriodFrom
      PreconditionsInvalidPlaceholder
      ProtoBuilderReturnValueIgnored
      ProtoFieldNullComparison
      RandomModInteger
      RectIntersectReturnValueIgnored
      ReturnValueIgnored
      SelfAssignment
      SelfComparison
      SelfEquals
      SizeGreaterThanOrEqualsZero
      StringBuilderInitWithChar
      TreeToString
      TryFailThrowable
      UnnecessaryCheckNotNull
      UnusedCollectionModifiedInPlace
      XorPower
      
      See https://errorprone.info/bugpatterns for more
      information on the checks.
      
      Bug: 253827323
      Test: m RUN_ERROR_PRONE=true javac-check
      Change-Id: I8b1533cbea835343dcf589cbaa57c63794be58bd
      50b73ca5
  7. Oct 04, 2022
    • Michael Groover's avatar
      Add unaudited exported flag to exposed runtime receivers · 4b17ed7f
      Michael Groover authored
      Android T allows apps to declare a runtime receiver as not exported
      by invoking registerReceiver with a new RECEIVER_NOT_EXPORTED flag;
      receivers registered with this flag will only receive broadcasts from
      the platform and the app itself. However to ensure developers can
      properly protect their receivers, all apps targeting U or later
      registering a receiver for non-system broadcasts must specify either
      the exported or not exported flag when invoking #registerReceiver;
      if one of these flags is not provided, the platform will throw a
      SecurityException. This commit updates all the exposed receivers
      with a new RECEIVER_EXPORTED_UNAUDITED flag to maintain the existing
      behavior of exporting the receiver while also flagging the receiver
      for audit before the U release.
      
      Bug: 234659204
      Test: Build
      Change-Id: I15aba10fe12dfcd2e67330ca844491341ef6d920
      4b17ed7f
  8. Sep 15, 2022
  9. Aug 31, 2022
  10. Aug 26, 2022
  11. Jul 11, 2022
    • Almaz Mingaleev's avatar
      Remove uses of Time. · 909a0763
      Almaz Mingaleev authored
      android.text.format.Time is deprecated since 2014 and there are
      better alternatives.
      
      Bug: 16550209
      Test: presubmit
      Change-Id: Ibbc4fb11e96b5179ff5dec906e74c9d582b6fb97
      909a0763
  12. Apr 26, 2022
  13. Apr 21, 2022
  14. Mar 24, 2022
  15. Jan 31, 2022
    • Jake Klinker's avatar
      Use UriUtil when checking if a URI is a file. · 27e27d94
      Jake Klinker authored
      UriUtil.isFileUri contains several additional fixes, so this ensure that existing instances where we check for the file scheme use this method as well. This covers all existing instances in the app of SCHEME_FILE.
      
      Change-Id: I1f3131b33823eae3e620aa9608be8e72b2e84aa2
      Bug: 215212561
      27e27d94
    • Jake Klinker's avatar
      Use UriUtil when checking if a URI is a file. · ebc64c5b
      Jake Klinker authored
      UriUtil.isFileUri contains several additional fixes, so this ensure that existing instances where we check for the file scheme use this method as well. This covers all existing instances in the app of SCHEME_FILE.
      
      Change-Id: I1f3131b33823eae3e620aa9608be8e72b2e84aa2
      Bug: 215212561
      ebc64c5b
  16. Jan 11, 2022
    • Jake Klinker's avatar
      Fix isFileUri to recognize URIs with spaces. · 6e0ca560
      Jake Klinker authored
      The underlying framework recognizes " file://..." as a valid URI and fetches the file, allowing for a possible exploit (see b/209965112). This trims the URI so that we can properly recognize it as a file from within our code.
      
      Bug: 209965112
      Change-Id: I8d9d9100e9a8c3bd64d19015d2177a14ec2306f3
      Test: See repro steps on http://b/209965112, was no longer able to repro.
      6e0ca560
    • Jake Klinker's avatar
      Fix isFileUri to recognize URIs with spaces. · 0b258f03
      Jake Klinker authored
      The underlying framework recognizes " file://..." as a valid URI and fetches the file, allowing for a possible exploit (see b/209965112). This trims the URI so that we can properly recognize it as a file from within our code.
      
      Bug: 209965112
      Change-Id: I8d9d9100e9a8c3bd64d19015d2177a14ec2306f3
      Test: See repro steps on http://b/209965112, was no longer able to repro.
      0b258f03
  17. Oct 06, 2021
  18. Sep 22, 2021
  19. Sep 19, 2021
  20. Jan 12, 2021
    • Taesu Lee's avatar
      Fix wrong sync message issue for pending outgoing messages · bccecb63
      Taesu Lee authored
      
      If sync operation is occurred between ResendMessageAction and
      SendMessageAction, the pending outgoing messages in local db are deleted
      and new messages are added from remote db.
      
      To fix this issue, ResendMessageAction will update RETRY_TIMESTAMP only.
      And RECEIVED_TIMESTAMP and SENT_TIMESTAMP will be updated in
      SendMessageAction when the message is queued.
      
      Test: manual
      
      Change-Id: I0ffa6f46a7094ec3dfd2954d4313b78dd57d6994
      Signed-off-by: default avatarTaesu Lee <taesu82.lee@samsung.com>
      bccecb63
  21. Oct 06, 2020
  22. Sep 16, 2020
  23. Jul 29, 2020
  24. Jul 10, 2020
    • Raman Tenneti's avatar
      AOSP/Messaging - Changes to make unit tests to run and pass. · b1aa213c
      Raman Tenneti authored
      + Added missing androix libraries to LOCAL_STATIC_ANDROID_LIBRARIES.
      + Added keep class statements for androidx and messaging classes.
      + Deleted Assert.isEngBuild call (this package is the last user of that method).
      + Added import statements for androidx classes.
      
      Test: manual - Tested the messaging UI. Ran the following tests on Pixel phone.
      
      $ make -j 40
      $ make messagingtests -j
      $ find out -name "messaging*.apk" -print -exec ls -l {} \;
      -rw-r----- 1 rtenneti primarygroup 733809 Jul  9 17:42 out/target/product/bonito/testcases/messagingtests/arm64/messagingtests.apk
      -rw-r----- 1 rtenneti primarygroup 10799132 Jul  9 18:34 out/target/product/bonito/product/app/messaging/messaging.apk
      
      $ adb install -r -d -t  out/target/product/bonito/product/app/messaging/messaging.apk
      $ adb install -r -d -t  out/target/product/bonito/testcases/messagingtests/arm64/messagingtests.apk
      $ adb shell am instrument -w com.android.messaging.test
      
      com.android.messaging.datamodel.BindingTest:.......
      com.android.messaging.datamodel.BitmapPoolTest:....
      com.android.messaging.datamodel.ConversationListTest:.
      com.android.messaging.datamodel.DataModelTest:...
      com.android.messaging.datamodel.FrequentContactsCursorBuilderTest:...
      com.android.messaging.datamodel.MemoryCacheManagerTest:.
      com.android.messaging.datamodel.ParticipantRefreshTest:..........
      com.android.messaging.datamodel.action.ActionServiceSystemTest:.....
      com.android.messaging.datamodel.action.ActionServiceTest:..
      com.android.messaging.datamodel.action.ActionTest:.....
      com.android.messaging.datamodel.action.GetOrCreateConversationActionTest:.
      com.android.messaging.datamodel.action.ReadWriteDraftMessageActionTest:......
      com.android.messaging.datamodel.data.ConversationMessageDataTest:...
      com.android.messaging.datamodel.data.ConversationParticipantsDataTest:.
      com.android.messaging.datamodel.media.ImageRequestTest:..
      com.android.messaging.datamodel.media.MediaResourceManagerTest:.....
      com.android.messaging.ui.CustomHeaderViewPagerTest:.
      com.android.messaging.ui.MultiAttachmentLayoutTest:...
      com.android.messaging.ui.attachmentchooser.AttachmentChooserFragmentTest:.
      com.android.messaging.ui.contact.ContactListItemViewTest:....
      com.android.messaging.ui.contact.ContactPickerFragmentTest:......
      com.android.messaging.ui.conversation.ComposeMessageViewTest:..
      com.android.messaging.ui.conversation.ConversationActivityUiStateTest:....
      com.android.messaging.ui.conversation.ConversationFragmentTest:..
      com.android.messaging.ui.conversation.ConversationInputManagerTest:.....
      com.android.messaging.ui.conversation.ConversationMessageViewTest:...
      com.android.messaging.ui.conversationlist.ConversationListFragmentTest:...
      com.android.messaging.ui.conversationlist.ConversationListItemViewTest:....
      com.android.messaging.ui.mediapicker.AudioRecordViewTest:.
      com.android.messaging.ui.mediapicker.CameraManagerTest:......
      com.android.messaging.ui.mediapicker.GalleryGridItemViewTest:.....
      com.android.messaging.ui.mediapicker.MediaPickerTest:..
      com.android.messaging.util.BugleGservicesTest:.
      com.android.messaging.util.YouTubeUtilTest:.
      Test results for InstrumentationTestRunner=.........................................
      .........................................
      ...............................
      Time: 9.903
      
      OK (113 tests)
      
      Change-Id: If8fd8036791027739eb9bbb1d3849a46211a5137
      b1aa213c
  25. Jun 29, 2020
    • Taesu Lee's avatar
      Fix NoSuchMethodError for getTypeInfo() · f2d9199b
      Taesu Lee authored
      
      Load an icon image for audio files from app resources instead because
      ContentResolver#getTypeInfo() is for API level >= 29.
      And it includes size-fit ic_photo_library_light images also.
      
      Bug: 159987488
      Test: Manual
      
      Change-Id: Ie8f766f148a30e105e598e4b7e6b1b22bccda6ae
      Signed-off-by: default avatarTaesu Lee <taesu82.lee@samsung.com>
      f2d9199b
  26. Jun 26, 2020
  27. Jun 22, 2020
  28. Jun 19, 2020
    • Raman Tenneti's avatar
      AOSP/Messaging - Changed midSdkVersion to 14 and reverted to using... · 7f4bb54e
      Raman Tenneti authored
      AOSP/Messaging - Changed midSdkVersion to 14 and reverted to using Telephony.Carriers.CONTENT_URI instead of  Telephony.Carriers.SIM_APN_URI.
      
      Fixes error: "NoSuchFieldError exception: Telephony.Carriers.SIM_APN_URI requires API level 29"
      
      Bug: 159055957
      
      Test: manual - Tested the messaging UI. Without this change the app is crashing when we click on it.
      
      $ make -j 40
      
      Change-Id: Ic34ccac673531a61386c1eaa3bbfff950d19517b
      7f4bb54e
    • Taesu Lee's avatar
      Remove only one Lambda Exp for JAVA 7 · 0c7ab8c2
      Taesu Lee authored
      
      Remove a Lambda Exp and replace ConcurrentHashMap#computeIfAbsent() with
      containsKey() and put() so that this app can be built using JAVA 7.
      
      Test: Build
      
      Signed-off-by: default avatarTaesu Lee <taesu82.lee@samsung.com>
      Change-Id: I7ff8a3b5fc4673dfe05c5ecc9418d377f3ed4f2e
      0c7ab8c2
    • Taesu Lee's avatar
      Fix handling format based on API level accordingly. · bd3b711a
      Taesu Lee authored
      
      Use SmsMessage#createFromPdu(pdu, format) at least on M and replace
      SmsMessage#FORMAT_3GPP2 with "3gpp2".
       - SmsMessage#createFromPdu(pdu, format) is added in API level 23.
       - SmsMessage#FORMAT_3GPP2 is added in API level 28.
      
      Test: Manual
      
      Signed-off-by: default avatarTaesu Lee <taesu82.lee@samsung.com>
      Change-Id: Icab2c6c3c86ee8b6597881bfac6066fed60db4d2
      bd3b711a
  29. Jun 18, 2020
    • Taesu Lee's avatar
      Fix creating ConnectivityUtil to work on any platform · dcfe928f
      Taesu Lee authored
      
      After this CL, ConnectivityUtil for default subId is used again on pre
      N because TelephonyManager has createForSubscriptionId() for a specific
      subId from N.
      Nevertheless, listen() uses the default subId on PhoneStateListener
      instead of the subId on the manager still even N. On O and beyond,
      ConnectivityUtil works correctly on multi-sim devices.
      
      Revert "Fix missing computeIfAbsent() method in L_MR1 and M"
      
      This reverts commit f0ccb76d.
      
      Reason for revert: Manage ConnectivityUtil instances for subIds at least
                         on N instead.
      
      Test: Manual
      
      Signed-off-by: default avatarTaesu Lee <taesu82.lee@samsung.com>
      Change-Id: I2f08928a6798a2ce275c5c75569ad379999d274c
      dcfe928f
  30. Jun 17, 2020
  31. Jun 16, 2020
Loading