summaryrefslogtreecommitdiffstats
path: root/policy
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2011-12-05 17:42:41 -0800
committerDianne Hackborn <hackbod@google.com>2011-12-05 17:42:41 -0800
commitf5b8671c340f189c50b41c53622f979b6d5e0a57 (patch)
treefe81dca6cd70d011c62a036b3fc0f940cc71bf23 /policy
parent003c15d72ccd3856d5abfe6d66a2a40d0eca85bc (diff)
downloadframeworks_base-f5b8671c340f189c50b41c53622f979b6d5e0a57.zip
frameworks_base-f5b8671c340f189c50b41c53622f979b6d5e0a57.tar.gz
frameworks_base-f5b8671c340f189c50b41c53622f979b6d5e0a57.tar.bz2
Fix issue #5714517: App shortcuts can result in bad task intents
New API to let you build an Intent whose base configuration is correct, but has an additional "selector" to pick out the specific app that you would like launched. Change-Id: Ide9db6dc60e2844b7696cfe09b28337fe7dd63db
Diffstat (limited to 'policy')
-rwxr-xr-xpolicy/src/com/android/internal/policy/impl/PhoneWindowManager.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
index f6bf213..46463ab 100755
--- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
@@ -1638,8 +1638,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
if (down && repeatCount == 0) {
String category = sApplicationLaunchKeyCategories.get(keyCode);
if (category != null) {
- Intent intent = new Intent(Intent.ACTION_MAIN);
- intent.addCategory(category);
+ Intent intent = Intent.makeMainSelectorActivity(Intent.ACTION_MAIN, category);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
try {
mContext.startActivity(intent);