summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/LauncherModel.java
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2016-08-23 13:25:58 -0700
committerSunny Goyal <sunnygoyal@google.com>2016-08-23 13:27:38 -0700
commitcbfe71dba38af1d1cd2d2372b649537d7d94610b (patch)
treed66650874f2067e6919e818376c3ce96730b8fb9 /src/com/android/launcher3/LauncherModel.java
parent527c27c04e116b9697d959090b2e4fc5f941abfb (diff)
downloadandroid_packages_apps_Trebuchet-cbfe71dba38af1d1cd2d2372b649537d7d94610b.tar.gz
android_packages_apps_Trebuchet-cbfe71dba38af1d1cd2d2372b649537d7d94610b.tar.bz2
android_packages_apps_Trebuchet-cbfe71dba38af1d1cd2d2372b649537d7d94610b.zip
Checking for duplicate intent with proper source bounds.
Since we are doing a equality check on the intent, items which already have the bounds attached to the intent will not get matched, causing duplicate icons Bug: 27176189 Change-Id: Ia9ed9120b04e9c234304995aed13777a5773119e
Diffstat (limited to 'src/com/android/launcher3/LauncherModel.java')
-rw-r--r--src/com/android/launcher3/LauncherModel.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/com/android/launcher3/LauncherModel.java b/src/com/android/launcher3/LauncherModel.java
index d4223e1ff..1607a4a40 100644
--- a/src/com/android/launcher3/LauncherModel.java
+++ b/src/com/android/launcher3/LauncherModel.java
@@ -862,7 +862,9 @@ public class LauncherModel extends BroadcastReceiver
Intent targetIntent = info.promisedIntent == null
? info.intent : info.promisedIntent;
if (targetIntent != null && info.user.equals(user)) {
- String s = targetIntent.toUri(0);
+ Intent copyIntent = new Intent(targetIntent);
+ copyIntent.setSourceBounds(intent.getSourceBounds());
+ String s = copyIntent.toUri(0);
if (intentWithPkg.equals(s) || intentWithoutPkg.equals(s)) {
return true;
}