summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--api/current.txt1
-rw-r--r--core/java/android/content/pm/ResolveInfo.java15
-rw-r--r--packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java6
-rwxr-xr-xservices/java/com/android/server/am/ActivityStack.java5
-rw-r--r--services/java/com/android/server/pm/PackageManagerService.java11
5 files changed, 32 insertions, 6 deletions
diff --git a/api/current.txt b/api/current.txt
index df5429d..ff1c44e 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -6769,6 +6769,7 @@ package android.content.pm {
public class ResolveInfo implements android.os.Parcelable {
ctor public ResolveInfo();
+ ctor public ResolveInfo(android.content.pm.ResolveInfo);
method public int describeContents();
method public void dump(android.util.Printer, java.lang.String);
method public final int getIconResource();
diff --git a/core/java/android/content/pm/ResolveInfo.java b/core/java/android/content/pm/ResolveInfo.java
index e3749b4..07117fe 100644
--- a/core/java/android/content/pm/ResolveInfo.java
+++ b/core/java/android/content/pm/ResolveInfo.java
@@ -230,6 +230,21 @@ public class ResolveInfo implements Parcelable {
public ResolveInfo() {
}
+ public ResolveInfo(ResolveInfo orig) {
+ activityInfo = orig.activityInfo;
+ serviceInfo = orig.serviceInfo;
+ filter = orig.filter;
+ priority = orig.priority;
+ preferredOrder = orig.preferredOrder;
+ match = orig.match;
+ specificIndex = orig.specificIndex;
+ labelRes = orig.labelRes;
+ nonLocalizedLabel = orig.nonLocalizedLabel;
+ icon = orig.icon;
+ resolvePackageName = orig.resolvePackageName;
+ system = orig.system;
+ }
+
public String toString() {
ComponentInfo ci = activityInfo != null ? activityInfo : serviceInfo;
return "ResolveInfo{"
diff --git a/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java b/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java
index 0caa671..5296ae9 100644
--- a/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java
@@ -538,12 +538,14 @@ public class RecentsPanelView extends FrameLayout implements OnItemClickListener
}
private void updateUiElements() {
- final int items = mRecentTaskDescriptions.size();
+ final int items = mRecentTaskDescriptions != null
+ ? mRecentTaskDescriptions.size() : 0;
mRecentsContainer.setVisibility(items > 0 ? View.VISIBLE : View.GONE);
// Set description for accessibility
- int numRecentApps = mRecentTaskDescriptions.size();
+ int numRecentApps = mRecentTaskDescriptions != null
+ ? mRecentTaskDescriptions.size() : 0;
String recentAppsAccessibilityDescription;
if (numRecentApps == 0) {
recentAppsAccessibilityDescription =
diff --git a/services/java/com/android/server/am/ActivityStack.java b/services/java/com/android/server/am/ActivityStack.java
index 05ff379..81c67a3 100755
--- a/services/java/com/android/server/am/ActivityStack.java
+++ b/services/java/com/android/server/am/ActivityStack.java
@@ -4387,6 +4387,8 @@ final class ActivityStack {
while (j < NA) {
ActivityRecord ar = mHistory.get(j);
if (!ar.finishing && ar.task.taskId == taskId) {
+ thumbs.root = ar;
+ thumbs.rootIndex = j;
holder = ar.thumbHolder;
if (holder != null) {
thumbs.mainThumbnail = holder.lastThumbnail;
@@ -4401,9 +4403,6 @@ final class ActivityStack {
return thumbs;
}
- thumbs.root = mHistory.get(j);
- thumbs.rootIndex = j;
-
ArrayList<TaskAccessInfo.SubTask> subtasks = new ArrayList<TaskAccessInfo.SubTask>();
thumbs.subtasks = subtasks;
while (j < NA) {
diff --git a/services/java/com/android/server/pm/PackageManagerService.java b/services/java/com/android/server/pm/PackageManagerService.java
index 3f2387b..89c0efa 100644
--- a/services/java/com/android/server/pm/PackageManagerService.java
+++ b/services/java/com/android/server/pm/PackageManagerService.java
@@ -2488,6 +2488,15 @@ public class PackageManagerService extends IPackageManager.Stub {
if (ri != null) {
return ri;
}
+ if (userId != 0) {
+ ri = new ResolveInfo(mResolveInfo);
+ ri.activityInfo = new ActivityInfo(ri.activityInfo);
+ ri.activityInfo.applicationInfo = new ApplicationInfo(
+ ri.activityInfo.applicationInfo);
+ ri.activityInfo.applicationInfo.uid = UserHandle.getUid(userId,
+ UserHandle.getAppId(ri.activityInfo.applicationInfo.uid));
+ return ri;
+ }
return mResolveInfo;
}
}
@@ -3668,7 +3677,7 @@ public class PackageManagerService extends IPackageManager.Stub {
mResolveActivity.applicationInfo = mAndroidApplication;
mResolveActivity.name = ResolverActivity.class.getName();
mResolveActivity.packageName = mAndroidApplication.packageName;
- mResolveActivity.processName = mAndroidApplication.processName;
+ mResolveActivity.processName = "system:ui";
mResolveActivity.launchMode = ActivityInfo.LAUNCH_MULTIPLE;
mResolveActivity.flags = ActivityInfo.FLAG_EXCLUDE_FROM_RECENTS;
mResolveActivity.theme = com.android.internal.R.style.Theme_Holo_Dialog_Alert;