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
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 @@
         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 @@
 
             // 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;
                 }