AOSP/Messaging - Added LOCAL_COMPATIBILITY_SUITE := device-tests to fix "Missing test_suite setting for test".
+ Added keepclass ContactPickerFragment to fix the following exception.
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.android.messaging.ui.contact.ContactPickerFragment"
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 8624061 Feb 27 10:55 out/target/product/marlin/system/app/messaging/messaging.apk
$ make messagingtests -j
-rw-r--r-- 1 rtenneti primarygroup 729713 Feb 27 10:33 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
Time: 13.18
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.263
OK (27 tests)
atest
-----
$ cd .../packages/apps/Messaging
$ atest
messagingtests: Passed: 113, Failed: 0, Ignored: 0
All tests passed!
Change-Id: I559b25aeb536489478fb3511b611e76da1891874
diff --git a/Android.mk b/Android.mk
index b21b98f..8eab88c 100644
--- a/Android.mk
+++ b/Android.mk
@@ -70,6 +70,8 @@
LOCAL_SDK_VERSION := current
+LOCAL_COMPATIBILITY_SUITE := device-tests
+
include $(BUILD_PACKAGE)
include $(call all-makefiles-under, $(LOCAL_PATH))
diff --git a/proguard.flags b/proguard.flags
index 44f6ccd..ff83f12 100644
--- a/proguard.flags
+++ b/proguard.flags
@@ -21,6 +21,9 @@
-keepclassmembers class * {
@com.google.common.annotations.VisibleForTesting *;
}
+-keepclassmembers class * {
+ @com.android.messaging.ui.contact.ContactPickerFragment *;
+}
# Keep methods that have the @VisibleForAnimation annotation
-keep @interface com.android.messaging.annotation.VisibleForAnimation