summaryrefslogtreecommitdiff
path: root/tests/ActivityViewTest
diff options
context:
space:
mode:
authorDan Sandler <dsandler@android.com>2018-12-07 16:09:38 -0500
committerDaniel Sandler <dsandler@android.com>2019-01-02 16:37:38 +0000
commit787d064df5a7a67229effaaaa0e998fad24d5329 (patch)
tree91a6bc6a0cf3e75ef079dc42ad782f671ff766a3 /tests/ActivityViewTest
parentff709020ab39d1ae4ee1658e23b6aa78f9dfec4a (diff)
Add the current platform easter egg to the picker
It turns out to be very useful when debugging ActivityView. Test: this is the test Change-Id: I97274f28be2e83dd92f9bcb4e87efb099cc0cedc
Diffstat (limited to 'tests/ActivityViewTest')
-rw-r--r--tests/ActivityViewTest/src/com/google/android/test/activityview/ActivityViewActivity.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/ActivityViewTest/src/com/google/android/test/activityview/ActivityViewActivity.java b/tests/ActivityViewTest/src/com/google/android/test/activityview/ActivityViewActivity.java
index 1548d6ed8a03..f7c60fc73cb3 100644
--- a/tests/ActivityViewTest/src/com/google/android/test/activityview/ActivityViewActivity.java
+++ b/tests/ActivityViewTest/src/com/google/android/test/activityview/ActivityViewActivity.java
@@ -20,6 +20,7 @@ import android.app.Activity;
import android.app.ActivityView;
import android.content.Intent;
import android.os.Bundle;
+import android.os.Parcelable;
import android.widget.Button;
public class ActivityViewActivity extends Activity {
@@ -41,6 +42,10 @@ public class ActivityViewActivity extends Activity {
final Intent intent = Intent.makeMainActivity(null);
final Intent chooser = Intent.createChooser(intent,
"Pick an app to launch in ActivityView");
+ chooser.putExtra(Intent.EXTRA_INITIAL_INTENTS, new Parcelable[] {
+ new Intent(Intent.ACTION_MAIN)
+ .addCategory("com.android.internal.category.PLATLOGO")
+ });
if (intent.resolveActivity(getPackageManager()) != null) {
chooser.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK
| Intent.FLAG_ACTIVITY_MULTIPLE_TASK);