From 24bb66a1c5a435ab0c55b4a97e788bdc2595bf84 Mon Sep 17 00:00:00 2001 From: Sunny Goyal Date: Tue, 21 Mar 2017 15:12:01 -0700 Subject: Removing the profile extra from intent and using the profile id from the profile column The intent extra is not always correct as the profile id can change during backup restore. This allows us to use a consistant behavior everywhere. Change-Id: I004bd244204ca91758b1d42488e1fc13b0ccb998 --- src/com/android/launcher3/Utilities.java | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/com/android/launcher3/Utilities.java') diff --git a/src/com/android/launcher3/Utilities.java b/src/com/android/launcher3/Utilities.java index abc53673b..207a7d4af 100644 --- a/src/com/android/launcher3/Utilities.java +++ b/src/com/android/launcher3/Utilities.java @@ -468,13 +468,8 @@ public final class Utilities { && TextUtils.isEmpty(launchIntent.getDataString())) { // An app target can either have no extra or have ItemInfo.EXTRA_PROFILE. Bundle extras = launchIntent.getExtras(); - if (extras == null) { - return true; - } else { - Set keys = extras.keySet(); - return keys.size() == 1 && keys.contains(ItemInfo.EXTRA_PROFILE); - } - }; + return extras == null || extras.keySet().isEmpty(); + } return false; } -- cgit v1.2.3