am 918a9c86: am d5f23384: allow automation of holo reference images
# Via Android Git Automerger (1) and Keun young Park (1)
* commit '918a9c8656bd66c580d9f26d32c81ae2bcfa6561':
allow automation of holo reference images
diff --git a/tests/tests/holo/AndroidManifest.xml b/tests/tests/holo/AndroidManifest.xml
index 7eb899c..4a03ba3 100644
--- a/tests/tests/holo/AndroidManifest.xml
+++ b/tests/tests/holo/AndroidManifest.xml
@@ -43,7 +43,12 @@
<activity android:name="android.holo.cts.ThemeTestActivity"
android:configChanges="keyboardHidden|orientation|screenSize|mcc|mnc"
android:screenOrientation="nosensor"
- android:theme="@android:style/Theme.Translucent.NoTitleBar" />
+ android:theme="@android:style/Theme.Translucent.NoTitleBar">
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ <category android:name="android.intent.category.DEFAULT" />
+ </intent-filter>
+ </activity>
<activity android:name="android.holo.cts.LayoutTestActivity"
android:configChanges="keyboardHidden|orientation|screenSize|mcc|mnc"
diff --git a/tests/tests/holo/src/android/holo/cts/ThemeTestActivity.java b/tests/tests/holo/src/android/holo/cts/ThemeTestActivity.java
index 08659df..74d74dc 100644
--- a/tests/tests/holo/src/android/holo/cts/ThemeTestActivity.java
+++ b/tests/tests/holo/src/android/holo/cts/ThemeTestActivity.java
@@ -109,6 +109,11 @@
startActivityForResult(intent, mRequestCode);
} else {
mResultFuture.set(mPendingResult);
+ if (mRequestCode == GENERATE_BITMAP_REQUEST_CODE) {
+ // finish with result so that generated bitmaps can be captured automatically
+ setResult(0);
+ finish();
+ }
}
}