Commit Graph
18 Commits
Author SHA1 Message Date
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 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
Taesu Lee 45d1e1d044 New interface to pick a contact as attachment
New ContactMediaChooser allows the user to pick a contact from contacts
apps as attachment.

Test: Manual

Change-Id: Idb00cd8a3164a3cac859947affd5cbcc7e41b8c2
Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
2020-03-05 18:57:22 +09:00
Taesu Lee 4e99cc0a02 ProcessPendingMessagesAction works based on subscriptions
PorcessPendingMessagesAction queues one message for sending/downloading
associated with a subscription triggering current action at a time. And
the ConnectivityUtil also works based on subscriptions so that pending
messages can be processed regardless of other phones' state in multi-sim
case.

It includes cleanup code as well.

Test: Manual

Change-Id: Id6b4f4a0aa6a3291e7a4d8a5d3f0fbb9db3c5b86
Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
2020-02-28 18:16:54 +09:00
Taesu Lee 2716c26c23 Support audio attachments through GalleryMediaChooser
GalleryMediaChooser supports audio types also. It displays simple audio
icon and file info for audio files on grid views.

Test: Manual

Change-Id: I98b605156af3c1909c0141a2b99380b5da11c1e2
Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
2020-02-20 08:52:44 +09:00
Taesu Lee 6c77158718 Support video attachments through GalleryMediaChooser
GalleryMediaChooser supports video types and more image types also. And
video thumbnails are overlaid with the play button image to distinguish
between images and videos.

Note:
 1. EXTRA_ALLOW_MULTIPLE is not specified for ACTION_GET_CONTENT.
 2. Files, methods and variables' name are still including "image".
 3. Content descriptions are not updated.

Test: Manual

Change-Id: I961928f150e4ae8ee80a1fba2f20c37fb5426669
Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
2020-02-19 18:36:32 +09:00
Taesu Lee a019a9da5c Fix GetOrCreateConversationActionTest failure
Test: atest messagingtests

Change-Id: I62a30f50a64a6e6e3f7ce21c0919cb2873654bc2
Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
2019-06-25 14:28:08 +09:00
Raman Tenneti a3b82b5fff AOSP/Messaging - Moved LOCAL_COMPATIBILITY_SUITE to tests/Android.mk.
+ Deleted the unnecessary blankId check. Updated the TODO comment for NUM_TEST_CONVERSATIONS+4.
+ Added AndroidTest.xml
+ Added "LOCAL_PROGUARD_ENABLED := disabled" for tests to pass on cf.

Bug: 126516784

Test: make messagingtests and tested the messaging UI manually. Ran the following CTS tests on Pixel phone.

$ make -j 40
  -rw-r--r-- 1 rtenneti primarygroup 8529760 Mar  8 16:46 out/target/product/marlin/system/app/messaging/messaging.apk

$ make messagingtests -j
  -rw-r--r-- 1 rtenneti primarygroup 729713 Mar 13 14:22 out/target/product/marlin/testcases/messagingtests/messagingtests.apk

$ adb install -r -d out/target/product/marlin/system/app/messaging/messaging.apk
$ adb install -r -d out/target/product/marlin/testcases/messagingtests/messagingtests.apk

atest
-----
$ cd .../packages/apps/Messaging
$ atest
  ...
  Results from tests that require device:

  Summary
  -------
  messagingtests: Passed: 113, Failed: 0, Ignored: 0

  All tests passed!

acloud test
-----------
$ lunch aosp_cf_x86_phone-userdebug

$ make -j 40
  -rw-r--r-- 1 rtenneti primarygroup 10585182 Mar 15 15:19 ./target/product/vsoc_x86/system/app/messaging/messaging.apk
$ make messagingtests -j
  -rw-r--r-- 1 rtenneti primarygroup 643697 Mar 15 15:57 ./target/product/vsoc_x86/system/app/messagingtests/messagingtests.apk

$ acloud reconnect
$ adb devices
  List of devices attached
  127.0.0.1:52761	device

$ adb install -r -d out/target/product/vsoc_x86/system/app/messaging/messaging.apk
$ adb install -r -d out/target/product/vsoc_x86/system/app/messagingtests/messagingtests.apk

$ cd packages/apps/Messaging
$ atest messagingtests -- --abi x86 --serial 127.0.0.1:52761

Change-Id: I6b1143db6c596805f3c48f310323e0e02d344d00
2019-04-24 22:32:45 +00:00
Raman Tenneti cdf40bb061 AOSP/Messaging - update the Messaging version to target P (28) or higher.
Use JobIntentService to start the Backgroundworkerservice and
ActionServiceImpl services.

+ Deleted WakeLock code.
+ Made changes to com.android.messaging.test tests so that all tests
  pass with the new JobService. I am not sure if these tests passed
  before these changes.
+ CTS tests passed without any changes.
+ Added TEST_MAPPING file for presubmit tests.

Bug: 115499280
Bug: 119503204

Test: manual - Tested the messaging UI. Ran the following CTS tests on Pixel phone.

$ make -j 40
  rw-r--r-- 1 rtenneti primarygroup 8624061 Feb 19 12:37 out/target/product/marlin/system/app/messaging/messaging.apk

$ make messagingtests -j
  -rw-r--r-- 1 rtenneti primarygroup 729713 Feb 19 12:52 out/target/product/marlin/testcases/messagingtests/messagingtests.apk

$ adb install -r -d out/target/product/marlin/system/app/messaging/messaging.apk

$ adb install -r -d out/target/product/marlin/testcases/messagingtests/messagingtests.apk

$ adb shell am instrument -w com.android.messaging.test
  Test results for InstrumentationTestRunner=...........
  Time: 13.353
  OK (113 tests)

CTS tests for Mesaging app
---------------------------
$ ./development/testrunner/runtest.py --path cts/tests/app/src/android/app/cts/NotificationTest.java
  android.app.cts.NotificationTest:...........................
  Time: 0.299
  OK (27 tests)

atest
-----
$ cd .../packages/apps/Messaging
$ atest
  Running Tests...
  messagingtests (113 Tests)
  -------------------------
  ...
  [113/113] com.android.messaging.util.YouTubeUtilTest#testGetYoutubePreviewImageLink: PASSED (2ms)

  Results from tests that require device:

  Summary
  -------
  messagingtests: Passed: 113, Failed: 0, Ignored: 0

  All tests passed!

Change-Id: I9494f0750954e6364abb695aa867494669ae54c4
2019-02-19 14:52:18 -08:00
Aurimas Liutikas 1b693ea7df Migrate Messaging to androidx.
Test: make messaging
Bug: 76692459
Change-Id: I9103450622f129311545648ac75f5b2f9fc2d04a
Merged-In: I9103450622f129311545648ac75f5b2f9fc2d04a
2019-02-14 22:59:57 +00:00
Raman Tenneti c188adbeaa AOSP/Messaging - updated tests target version to 24 to match the Messaing app's targetSdkVersion. All messagingtests tests pass/work.
+ ParticipantRefreshTest - Added UIIntents and FakeDataModel. Fixed the errors in the data verification.
+ GetOrCreateConversationActionTest - changed the blankId assert to assertEquals because 10 conversations were inserted when database was created.
+ ConversationFragmentTest - Return mockDraftMessageData even if createDraftMessageData is called with null argument.

Bug: 119503204

Test: manual - Ran the following CTS tests on Pixel phone. Tested the messaging UI.

$ make -j 40

$ make messagingtests -j

$ ls -l out/target/product/marlin/system/app/messaging/messaging.apk
  -rw-r--r-- 1 rtenneti primarygroup 8974412 Dec  3 17:21 out/target/product/marlin/system/app/messaging/messaging.apk

$ ls -l  out/target/product/marlin/testcases/messagingtests/messagingtests.apk
  -rw-r--r-- 1 rtenneti primarygroup 709233 Dec  3 17:25 out/target/product/marlin/testcases/messagingtests/messagingtests.apk

$ adb install -r -d out/target/product/marlin/system/app/messaging/messaging.apk

$ adb install -r -d out/target/product/marlin/testcases/messagingtests/messagingtests.apk

$ adb shell am instrument -w com.android.messaging.test
  Test results for InstrumentationTestRunner=.........................................
  Time: 13.376
  OK (113 tests)

Change-Id: Ib5784b9ed0b9086f153dd438b2b791ae0bca2621
2018-12-03 17:34:14 -08:00
Raman Tenneti a302369720 Revert "AOSP/Messaging - update the Messaging version to target P (28) or higher. Fixed tests in messagingtests. All tests pass/work."
This reverts commit 9752cda535.

Reason for revert: com.android.devicehealthchecks are failing https://sponge.corp.google.com/target?id=3b9a97f0-48bc-410d-94ce-0971c2f75361&target=com.android.devicehealthchecks&searchFor=&show=FAILED&sortBy=STATUS

Change-Id: I82d337b1d859083169ac6057b408f7e920f06609
2018-12-03 23:26:08 +00:00
Raman Tenneti 9752cda535 AOSP/Messaging - update the Messaging version to target P (28) or higher. Fixed tests in messagingtests. All tests pass/work.
+ ParticipantRefreshTest - Added UIIntents and FakeDataModel. Fixed the errors in the data verification.
+ GetOrCreateConversationActionTest - conversation already exists (changed the assert).
+ ConversationFragmentTest - Return mockDraftMessageData even if createDraftMessageData is called with null argument.
  These tests weren't passing witout any changes (they weren't even starting without the target version update).

Bug: 119503204
Bug: 115499280

Test: manual - Ran the following CTS tests on Pixel phone. Tested the messaging UI.

$ make -j 40

$ make messagingtests -j

$ ls -l out/target/product/marlin/system/app/messaging/messaging.apk
-rw-r--r-- 1 rtenneti primarygroup 8716364 Nov 30 15:43 out/target/product/marlin/system/app/messaging/messaging.apk

$ ls -l  out/target/product/marlin/testcases/messagingtests/messagingtests.apk
-rw-r--r-- 1 rtenneti primarygroup 627313 Nov 30 15:45 out/target/product/marlin/testcases/messagingtests/messagingtests.apk

$ adb install -r -d out/target/product/marlin/system/app/messaging/messaging.apk

$ adb install -r -d out/target/product/marlin/testcases/messagingtests/messagingtests.apk

$ adb shell am instrument -w com.android.messaging.test
   Test results for InstrumentationTestRunner=.........................................
   Time: 12.921

   OK (113 tests)

   The following is from logcat output:

   11-30 23:47:31.861  6569  6590 I TestRunner: passed: testBindingReference(com.android.messaging.datamodel.BindingTest)
   11-30 23:47:31.868  6569  6590 I TestRunner: passed: testBindingStartsUnbound(com.android.messaging.datamodel.BindingTest)
   ...
   11-30 23:47:44.705  6569  6590 I TestRunner: passed: testGServiceGet(com.android.messaging.util.BugleGservicesTest)

Change-Id: I8f67da024d86f15f7430b803237ae4cff4d8e2c2
2018-11-30 19:53:43 -08:00
Philip P. Moltmann ea5d77fa38 Switch to modern ArgumentMatchers
Test: - adb shell am instrument -w -e class com.android.messaging.ui.attachmentchooser.AttachmentChooserFragmentTest com.android.messaging.test/android.test.InstrumentationTestRunner
      - adb shell am instrument -w -e class com.android.messaging.ui.conversation.ComposeMessageViewTest com.android.messaging.test/android.test.InstrumentationTestRunner
      - adb shell am instrument -w -e class com.android.messaging.ui.conversationlist.ConversationListItemViewTest com.android.messaging.test/android.test.InstrumentationTestRunner
Change-Id: Ic3f29ed0e13b392d5687934f25d99c2a0e8c4dac
2017-12-12 13:07:12 -08:00
Paul Duffin d529415c68 Refactor code incompatible with Mockito 2.7.13
Bug: 32912773
Test: make checkbuild
Change-Id: I252a7e8ae8473f0ce7e177f691aac7dfeb67e7d8
2017-03-09 18:49:41 +00:00
Mike Dodd d3b009ae55 Initial checkin of AOSP Messaging app.
b/23110861

Change-Id: I11db999bd10656801e618f78ab2b2ef74136fff1
2015-08-12 12:47:26 -07:00
Mike Dodd ef8c7abbcf Revert "Initial checkin of AOSP Messaging app."
This reverts commit 461a34b466.

Change-Id: Iac4ca77eeaa94989e91dead49a7959c905bd3078
2015-08-12 18:48:39 +00:00
Mike Dodd 461a34b466 Initial checkin of AOSP Messaging app.
b/23110861

Change-Id: I9aa980d7569247d6b2ca78f5dcb4502e1eaadb8a
2015-08-12 08:58:28 -07:00