diff options
author | Dianne Hackborn <hackbod@google.com> | 2010-04-06 20:24:15 -0700 |
---|---|---|
committer | Dianne Hackborn <hackbod@google.com> | 2010-04-06 20:24:15 -0700 |
commit | 3cce600614c2a2643ae9a38c6ed87c06c7bab0b6 (patch) | |
tree | 394f330634ab83a97b244fbd214d5edbbd44fa52 | |
parent | 7d8866f9ef026870d4735d6f2ede49525150e53e (diff) | |
download | base-3cce600614c2a2643ae9a38c6ed87c06c7bab0b6.tar.gz |
Fix issue #2574016: Preferred activity setting is not persistent
The recent tasks UI was trying to retrieve the current home activity
in the wrong way, causing it to be a different match of activities and
thus clearing any preferred activity that was set.
In the future we should look at what the package manager is doing here
and make it more robust in how it clears the list... but for now,
this is the safest thing.
Change-Id: Idc917dffa7d05d62671213414387e8bdb2e34bea
-rw-r--r-- | phone/com/android/internal/policy/impl/RecentApplicationsDialog.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/phone/com/android/internal/policy/impl/RecentApplicationsDialog.java b/phone/com/android/internal/policy/impl/RecentApplicationsDialog.java index 8287253..3a09185 100644 --- a/phone/com/android/internal/policy/impl/RecentApplicationsDialog.java +++ b/phone/com/android/internal/policy/impl/RecentApplicationsDialog.java @@ -173,9 +173,9 @@ public class RecentApplicationsDialog extends Dialog implements OnClickListener final List<ActivityManager.RecentTaskInfo> recentTasks = am.getRecentTasks(MAX_RECENT_TASKS, 0); - ResolveInfo homeInfo = pm.resolveActivity( - new Intent(Intent.ACTION_MAIN).addCategory(Intent.CATEGORY_HOME), - 0); + ActivityInfo homeInfo = + new Intent(Intent.ACTION_MAIN).addCategory(Intent.CATEGORY_HOME) + .resolveActivityInfo(pm, 0); IconUtilities iconUtilities = new IconUtilities(getContext()); @@ -197,9 +197,9 @@ public class RecentApplicationsDialog extends Dialog implements OnClickListener // Skip the current home activity. if (homeInfo != null) { - if (homeInfo.activityInfo.packageName.equals( + if (homeInfo.packageName.equals( intent.getComponent().getPackageName()) - && homeInfo.activityInfo.name.equals( + && homeInfo.name.equals( intent.getComponent().getClassName())) { continue; } |