summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2016-08-23 13:25:58 -0700
committerAdam Cohen <adamcohen@google.com>2016-08-24 00:46:01 +0000
commit92cb84d4e5c613d3a0e894f7675abb2f47b49c3c (patch)
tree7ed413ec477f3dcc2cae846f1647f7491afb17da /src
parentef0c537925369192cd84b0c4e3df29691c455d83 (diff)
downloadandroid_packages_apps_Trebuchet-92cb84d4e5c613d3a0e894f7675abb2f47b49c3c.tar.gz
android_packages_apps_Trebuchet-92cb84d4e5c613d3a0e894f7675abb2f47b49c3c.tar.bz2
android_packages_apps_Trebuchet-92cb84d4e5c613d3a0e894f7675abb2f47b49c3c.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 (cherry picked from commit cbfe71dba38af1d1cd2d2372b649537d7d94610b)
Diffstat (limited to 'src')
-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 6a63110b1..60e07f9b6 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;
}