summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Dianne Hackborn <hackbod@google.com> 2012-09-27 00:53:07 -0700
committer Android (Google) Code Review <android-gerrit@google.com> 2012-09-27 00:53:08 -0700
commit2480bc12a525a55ebff453dbf6ca95258b9f23cf (patch)
tree6a7e4c8116753b5d79b218ddcce1f786fa3d2c09
parent7bb89cf1632da6dc236e6603c4245301500eeb39 (diff)
parentc7ba771a4584d624e66167d018fed7727a819032 (diff)
Merge "Fix issue #7232952: Settings crash on tapping on Downloaded apps on a secondary user" into jb-mr1-dev
-rw-r--r--services/java/com/android/server/ServiceWatcher.java2
-rw-r--r--services/java/com/android/server/am/ActivityManagerService.java5
2 files changed, 4 insertions, 3 deletions
diff --git a/services/java/com/android/server/ServiceWatcher.java b/services/java/com/android/server/ServiceWatcher.java
index 0dfaa0576c1d..e99949b38c02 100644
--- a/services/java/com/android/server/ServiceWatcher.java
+++ b/services/java/com/android/server/ServiceWatcher.java
@@ -170,7 +170,7 @@ public class ServiceWatcher implements ServiceConnection {
}
if (D) Log.d(mTag, "binding " + packageName + " (version " + version + ")");
mContext.bindService(intent, this, Context.BIND_AUTO_CREATE | Context.BIND_NOT_FOREGROUND
- | Context.BIND_ALLOW_OOM_MANAGEMENT);
+ | Context.BIND_ALLOW_OOM_MANAGEMENT | Context.BIND_NOT_VISIBLE);
}
private boolean isSignatureMatch(Signature[] signatures) {
diff --git a/services/java/com/android/server/am/ActivityManagerService.java b/services/java/com/android/server/am/ActivityManagerService.java
index 370d4270fb15..02212453b635 100644
--- a/services/java/com/android/server/am/ActivityManagerService.java
+++ b/services/java/com/android/server/am/ActivityManagerService.java
@@ -11514,8 +11514,9 @@ public final class ActivityManagerService extends ActivityManagerNative
* Prevent non-system code (defined here to be non-persistent
* processes) from sending protected broadcasts.
*/
- if (callingUid == Process.SYSTEM_UID || callingUid == Process.PHONE_UID
- || callingUid == Process.SHELL_UID || callingUid == Process.BLUETOOTH_UID ||
+ int callingAppId = UserHandle.getAppId(callingUid);
+ if (callingAppId == Process.SYSTEM_UID || callingAppId == Process.PHONE_UID
+ || callingAppId == Process.SHELL_UID || callingAppId == Process.BLUETOOTH_UID ||
callingUid == 0) {
// Always okay.
} else if (callerApp == null || !callerApp.persistent) {