am d5f23384: allow automation of holo reference images
# Via Keun young Park
* commit 'd5f23384e54836245383e433e60f91f22a336f47':
allow automation of holo reference images
diff --git a/tests/tests/holo/AndroidManifest.xml b/tests/tests/holo/AndroidManifest.xml
index ea53a73..cbb5a53 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"
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"
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();
+ }
}
}