summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher2/InstallShortcutReceiver.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/launcher2/InstallShortcutReceiver.java')
-rw-r--r--src/com/android/launcher2/InstallShortcutReceiver.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/com/android/launcher2/InstallShortcutReceiver.java b/src/com/android/launcher2/InstallShortcutReceiver.java
index eda82e0..66b3f5f 100644
--- a/src/com/android/launcher2/InstallShortcutReceiver.java
+++ b/src/com/android/launcher2/InstallShortcutReceiver.java
@@ -113,6 +113,10 @@ public class InstallShortcutReceiver extends BroadcastReceiver {
if (intent != null) {
if (intent.getAction() == null) {
intent.setAction(Intent.ACTION_VIEW);
+ } else if (intent.getAction().equals(Intent.ACTION_MAIN) &&
+ intent.getCategories().contains(Intent.CATEGORY_LAUNCHER)) {
+ intent.addFlags(
+ Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED);
}
// By default, we allow for duplicate entries (located in