Commit Graph
763 Commits
Author SHA1 Message Date
Xin Li b8b866e236 Merge stage branch to development trunk.
Bug: 160260413
Merged-In: Ic5eb962d272432725f634d485742e025a15b8011
Change-Id: Ica8ca2884ddb2beb4558e62bc1b5cb640d7e2023
2020-08-24 22:31:56 +00:00
Raman Tenneti 8fe5feae57 AOSP/Messaging - Update language to comply with Android's inclusive language guidance. am: 4b52654e98
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Messaging/+/1378899

Change-Id: Ic5eb962d272432725f634d485742e025a15b8011
2020-07-30 01:26:06 +00:00
Raman Tenneti 4b52654e98 AOSP/Messaging - Update language to comply with Android's inclusive language guidance.
See https://source.android.com/setup/contribute/respectful-code for reference

BUG=161896447

Test: make and make messagingtests
Change-Id: I01c520f1d5e9eab8dbb25b08d133ae34bd301093
2020-07-29 16:43:46 -07:00
Raman Tenneti 4c12eb471c AOSP/Messaging - Changes to make unit tests to run and pass. am: b1aa213ce9
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Messaging/+/1360018

Change-Id: I5dad8a738ccecbb85c8788fcd867f7b3631c8deb
2020-07-10 03:10:09 +00:00
Raman Tenneti b1aa213ce9 AOSP/Messaging - Changes to make unit tests to run and pass.
+ 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
2020-07-09 18:37:41 -07:00
Treehugger Robot d67e1db151 Merge "Fix NoSuchMethodError for getTypeInfo()" am: 919cb6afdd
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Messaging/+/1352082

Change-Id: I3c817f847749649e3540e3827263cc8f7184f2b3
2020-06-29 16:53:27 +00:00
Treehugger Robot 919cb6afdd Merge "Fix NoSuchMethodError for getTypeInfo()" 2020-06-29 16:40:57 +00:00
Bill Yi a3c59da09d [automerger skipped] Import translations. DO NOT MERGE am: 8e0d3e91f3 -s ours
am skip reason: subject contains skip directive

Original change: https://android-review.googlesource.com/c/platform/packages/apps/Messaging/+/1350824

Change-Id: Iaa813c8fc1b91f8270670b9f0f59dfab655432f0
2020-06-29 15:37:55 +00:00
Taesu Lee f2d9199bfb Fix NoSuchMethodError for getTypeInfo()
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: Taesu Lee <taesu82.lee@samsung.com>
2020-06-29 15:51:07 +09:00
Bill Yi 8e0d3e91f3 Import translations. DO NOT MERGE
BUG:148403740

TEST: m messaging

Merged-In: I4b74a267c0ed7cffe04d97ca465f2aa90ae1847a
Change-Id: Ie6f26f2a9e207adeee475e347f17dd8e0da78d9b
Auto-generated-cl: translation import
(cherry picked from commit 3bd7b79daa)
2020-06-28 18:51:48 +00:00
Taesu Lee 34ebed2bba Remove advanced category if no preference am: 392850a825
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Messaging/+/1351522

Change-Id: Icbed01452b088198a11436aad233c281b4068067
2020-06-26 16:48:17 +00:00
Taesu Lee 392850a825 Remove advanced category if no preference
Test: In debug mode, turn off all the configs for advanced category

Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
Change-Id: I52ea0905b9d4f03a57b4849e5b575bc5e508dd2d
2020-06-26 19:25:05 +09:00
Raman Tenneti 58d5681edd AOSP/Messaging - Changed minSdkVersion to 19. am: 8926653a98
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Messaging/+/1348203

Change-Id: Icbbf5bf2bfa0e59e75fb0a0e87a928ee1fe93bf8
2020-06-23 23:16:24 +00:00
Raman Tenneti 8926653a98 AOSP/Messaging - Changed minSdkVersion to 19.
Bug: 159055957

Test: manual - Tested the messaging UI.

$ make -j 40

Change-Id: I6f89161d7c841e88fcd8496417ae1ab8e964961a
2020-06-23 22:10:34 +00:00
Treehugger Robot 92b38533ec Merge "Fix SecurityException at getActiveSubscriptionInfoList() on N and O" am: be4c269813
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Messaging/+/1345449

Change-Id: If661b26336c80e6c4928afd9adc2111eb2a255ee
2020-06-22 16:53:21 +00:00
Taesu Lee ba59a36fdb Fix app initialization issue if no permissions am: 297a6f7047
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Messaging/+/1345448

Change-Id: If592a8e5431035c8a369917f24dbdd73e28bae4d
2020-06-22 16:53:14 +00:00
Treehugger Robot be4c269813 Merge "Fix SecurityException at getActiveSubscriptionInfoList() on N and O" 2020-06-22 16:38:07 +00:00
Taesu Lee 615ebb9dd6 Fix SecurityException at getActiveSubscriptionInfoList() on N and O
Creating ConnectivityUtil instances after checking the minimum set of
permissions since SubscriptionManager#getActiveSubscriptionInfoList()
requires READ_PHONE_STATE and users can revoke the permission.
On P and beyond, the subscription list will be filtered instead when no
permission.

Bug: 159421050
Test: Manual

Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
Change-Id: Iafc3c57060e1893a91e629b1b3e3ba9ad78967cb
2020-06-22 19:15:39 +09:00
Taesu Lee 297a6f7047 Fix app initialization issue if no permissions
Call onRequiredPermissionsAcquired() before calling redirect() so that
BugleApplication initialization can be done completed always even
PermissionCheckActivity#onResume() case.

Test: Manual

Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
Change-Id: I01bb681442e0b391238bc162ce139ff40d947eaf
2020-06-22 19:14:52 +09:00
Raman Tenneti f556ac71f2 AOSP/Messaging - Changed midSdkVersion to 14 and reverted to using Telephony.Carriers.CONTENT_URI instead of Telephony.Carriers.SIM_APN_URI. am: 7f4bb54ece
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Messaging/+/1344864

Change-Id: Idaac2e53f28bde3bd2d88c484744308130d5b4d0
2020-06-19 23:37:46 +00:00
Raman Tenneti 7f4bb54ece 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
2020-06-19 21:58:29 +00:00
Treehugger Robot ea97b36d27 Merge "Fix handling format based on API level accordingly." am: d626bcaf0c
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Messaging/+/1343463

Change-Id: I71a236a34be90808809c85bbe062e6452fb06afa
2020-06-19 17:04:32 +00:00
Taesu Lee 5db150a742 Remove only one Lambda Exp for JAVA 7 am: 0c7ab8c20a
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Messaging/+/1343464

Change-Id: If165c85253bfd9bdcc2c3939def095968796fe83
2020-06-19 17:04:20 +00:00
Treehugger Robot d626bcaf0c Merge "Fix handling format based on API level accordingly." 2020-06-19 16:55:25 +00:00
Taesu Lee 0c7ab8c20a Remove only one Lambda Exp for JAVA 7
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: Taesu Lee <taesu82.lee@samsung.com>
Change-Id: I7ff8a3b5fc4673dfe05c5ecc9418d377f3ed4f2e
2020-06-19 19:30:58 +09:00
Taesu Lee bd3b711aca Fix handling format based on API level accordingly.
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: Taesu Lee <taesu82.lee@samsung.com>
Change-Id: Icab2c6c3c86ee8b6597881bfac6066fed60db4d2
2020-06-19 18:34:20 +09:00
Taesu Lee 86314ff8e6 Fix creating ConnectivityUtil to work on any platform am: dcfe928ff3
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Messaging/+/1343457

Change-Id: Id737b6239df8b85888e7832ab6f5e157be94de1f
2020-06-18 17:27:52 +00:00
Taesu Lee dcfe928ff3 Fix creating ConnectivityUtil to work on any platform
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 f0ccb76d8d.

Reason for revert: Manage ConnectivityUtil instances for subIds at least
                   on N instead.

Test: Manual

Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
Change-Id: I2f08928a6798a2ce275c5c75569ad379999d274c
2020-06-18 19:24:27 +09:00
Treehugger Robot feaad2df13 Merge "Fix missing computeIfAbsent() method in L_MR1 and M" am: db1ebc265c
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Messaging/+/1341554

Change-Id: I4bdfca1d8b537b3940eec4ecf1a166b78589b2db
2020-06-17 16:22:59 +00:00
Treehugger Robot db1ebc265c Merge "Fix missing computeIfAbsent() method in L_MR1 and M" 2020-06-17 16:15:32 +00:00
Taesu Lee f0ccb76d8d Fix missing computeIfAbsent() method in L_MR1 and M
Replace ConcurrentHashMap#computeIfAbsent() with containsKey() and put()
since computeIfAbsent() is added in API level 24.

Bug: 158846265
Test: Build

Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
Change-Id: I3c43f0d7b1f289f0442c9359de4f099217244387
2020-06-17 19:03:26 +09:00
Taesu Lee b9dd11dd77 Remove unnecessary methods from MmsUtils am: c9e85fd21a
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Messaging/+/1339795

Change-Id: I6359187593ac39b7bbd1628cab743586515f72e8
2020-06-16 16:23:53 +00:00
Taesu Lee c9e85fd21a Remove unnecessary methods from MmsUtils
Same methods in PhoneUtils are used everywhere instead.

Test: Build

Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
Change-Id: Ia17c1f17511c53a9235af462fa0809146726e89f
2020-06-16 11:00:42 +09:00
Taesu Lee d067695cd8 Allow call to phone numbers or voice mail numbers only am: 8b347325fa
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Messaging/+/1331094

Change-Id: Iaa1761772b4e7991e009fce48e692a99ebe09150
2020-06-11 19:05:57 +00:00
Taesu Lee 8b347325fa Allow call to phone numbers or voice mail numbers only
It allows to call to well-formatted phone numbers or carrier specific
phone numbers starting with star sign such as *20 so that user can make
a call directly in a conversation for voice mail SMSs.

Revert "Check whether dialable only"

This reverts commit dbc43316cf.

Reason for revert: a call icon is disappeared for well-formatted phone
                   number with parentheses, dash and etc.

Test: Check the call icon in conversations for phone numbers and voice
      mail numbers.

Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
Change-Id: I1b279f8a5372b00a5a0c572f9969731f1e633389
2020-06-11 18:56:04 +09:00
Taesu Lee 638c7a6817 Check CONFIG_SEND_MULTIPART_SMS_AS_SEPARATE_MESSAGES always am: f3ea99181b
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Messaging/+/1325631

Change-Id: If82c2db8dc767a806360c91c55a056cddd2f06a9
2020-06-08 17:08:29 +00:00
Xin Li fffdde5087 [automerger skipped] Merge "Merge QQ3A.200605.002 into master" am: c66d3e6e32 -s ours
am skip reason: Change-Id Ie293c1c84489e4a1f20972bc056f6d2af67b79b4 with SHA-1 4e646c4948 is in history

Original change: https://android-review.googlesource.com/c/platform/packages/apps/Messaging/+/1323634

Change-Id: I1c87c70a6e4df7803ca0b8e310c7221fe35b1fbc
2020-06-08 15:56:53 +00:00
Taesu Lee f3ea99181b Check CONFIG_SEND_MULTIPART_SMS_AS_SEPARATE_MESSAGES always
Check CONFIG_SEND_MULTIPART_SMS_AS_SEPARATE_MESSAGES directly for each
sending messages always so that the correct config can be used for each
SIM cards in multi-sim devices.

Test: Manual

Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
Change-Id: Iff80d093f43014ff2fe97caf6929aefe43911192
2020-06-08 16:12:02 +09:00
Xin Li c66d3e6e32 Merge "Merge QQ3A.200605.002 into master" 2020-06-06 01:41:24 +00:00
Taesu Lee 93c591bdb0 Fix ConcurrentModificationException am: 845aa217fc
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Messaging/+/1324972

Change-Id: Ia9e1ac9906beace9db944fcbfcf7235a6c0f29ac
2020-06-05 17:31:20 +00:00
Taesu Lee 845aa217fc Fix ConcurrentModificationException
ConcurrentModificationException could be happened during iterating if
parts are added newly.

Test: Select several images on Gallery app and attach them to a message
via Sharing

Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
Change-Id: Idb96239ef2c05a08fc0727797b97739aa89f12a4
2020-06-05 14:46:51 +09:00
Xin Li 0580b4ade0 Merge QQ3A.200605.002 into master
Bug: 158095402
Merged-In: Ie293c1c84489e4a1f20972bc056f6d2af67b79b4
Change-Id: If9e62cf4c65cd4d4e029989f23b136c8f5efc7ae
2020-06-03 10:45:08 -07:00
Taesu Lee 4e646c4948 Parse recipients from RESPOND_VIA_MESSAGE correctly am: fcf6699742
Change-Id: Ie293c1c84489e4a1f20972bc056f6d2af67b79b4
2020-05-28 20:42:10 +00:00
Taesu Lee fcf6699742 Parse recipients from RESPOND_VIA_MESSAGE correctly
UriUtil#parseRecipientsFromSmsMmsUri() will returns a comma-separated
recipients for common use so that InsertNewMessageAction#createMessage()
can create or get a conversation correctly for RESPOND_VIA_MESSAGE.
In addition, mms/mmsto schemes are added. And it includes small cleanup
intent-filters for LaunchConversationActivity.

Test: adb shell am startservice
-a android.intent.action.RESPOND_VIA_MESSAGE -d "sms:12345678,87654321"
-e android.intent.extra.TEXT "Text"

Change-Id: I291dc765a46846982d059016d44f90873c687867
Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
2020-05-28 16:43:29 +09:00
Treehugger Robot 6e1c1395cb Merge "Disallow making a call to emergency numbers" am: ab856cb957
Change-Id: Ic46575c128f0c2916296d5a31ef81561d5ed8aa1
2020-05-25 21:05:29 +00:00
Treehugger Robot c38bc2ec1b Merge "Auto re-sending MMS for all the transient failures" am: 0e0bf43d46
Change-Id: Ic2464c3b3adc080fa38f0d19bd0aa41866ba552c
2020-05-25 21:05:22 +00:00
Treehugger Robot 653f908e22 Merge "Remove dead code" am: 6287290cea
Change-Id: I4a4415673b4be5bd8960b0b1cecc00c9a54aa87a
2020-05-25 21:05:15 +00:00
Taesu Lee 45741a4489 Check whether dialable only am: dbc43316cf
Change-Id: I517a73f1dcae564e177db748361c1f508bb426a0
2020-05-25 21:05:07 +00:00
Treehugger Robot ab856cb957 Merge "Disallow making a call to emergency numbers" 2020-05-25 20:52:01 +00:00
Treehugger Robot 0e0bf43d46 Merge "Auto re-sending MMS for all the transient failures" 2020-05-25 20:51:40 +00:00