Fix android.os CTS tests.
InstrumentationCtsTestRunner is magic, and I made it unhappy. Switch
it back, and use explicit package names when running PFD tests.
Bug: 10668465
Change-Id: Ic5bafebcf6c2828cd281f9121c8f87170a831f58
diff --git a/tests/tests/os/Android.mk b/tests/tests/os/Android.mk
index a5d5d74..f43043b 100644
--- a/tests/tests/os/Android.mk
+++ b/tests/tests/os/Android.mk
@@ -21,6 +21,8 @@
# and when built explicitly put it in the data partition
LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
+LOCAL_PROGUARD_ENABLED := disabled
+
LOCAL_JAVA_LIBRARIES := android.test.runner
LOCAL_STATIC_JAVA_LIBRARIES := ctstestrunner guava
diff --git a/tests/tests/os/AndroidManifest.xml b/tests/tests/os/AndroidManifest.xml
index 168d318..2418132 100644
--- a/tests/tests/os/AndroidManifest.xml
+++ b/tests/tests/os/AndroidManifest.xml
@@ -25,16 +25,17 @@
<application>
<service
android:name="android.os.cts.ParcelFileDescriptorPeer$Red"
- android:process=":red" />
+ android:process=":red"
+ android:exported="true" />
<service
android:name="android.os.cts.ParcelFileDescriptorPeer$Blue"
- android:process=":blue" />
+ android:process=":blue"
+ android:exported="true" />
<uses-library android:name="android.test.runner" />
</application>
<instrumentation android:name="android.test.InstrumentationCtsTestRunner"
- android:targetPackage="com.android.cts.os"
+ android:targetPackage="com.android.cts.stub"
android:label="CTS tests of android.os"/>
</manifest>
-
diff --git a/tests/tests/os/src/android/os/cts/ParcelFileDescriptorProcessTest.java b/tests/tests/os/src/android/os/cts/ParcelFileDescriptorProcessTest.java
index d7d3a15..679a35c 100644
--- a/tests/tests/os/src/android/os/cts/ParcelFileDescriptorProcessTest.java
+++ b/tests/tests/os/src/android/os/cts/ParcelFileDescriptorProcessTest.java
@@ -87,8 +87,12 @@
final Context context = getContext();
// Bring up both remote processes and wire them to each other
- redIntent = new Intent(context, ParcelFileDescriptorPeer.Red.class);
- blueIntent = new Intent(context, ParcelFileDescriptorPeer.Blue.class);
+ redIntent = new Intent();
+ redIntent.setComponent(new ComponentName(
+ "com.android.cts.os", "android.os.cts.ParcelFileDescriptorPeer$Red"));
+ blueIntent = new Intent();
+ blueIntent.setComponent(new ComponentName(
+ "com.android.cts.os", "android.os.cts.ParcelFileDescriptorPeer$Blue"));
redConn = new PeerConnection();
blueConn = new PeerConnection();
context.startService(redIntent);