Skip to content

Commit 2480bc1

Browse files
Dianne HackbornAndroid (Google) Code Review
authored andcommitted
Merge "Fix issue #7232952: Settings crash on tapping on Downloaded apps on a secondary user" into jb-mr1-dev
2 parents 7bb89cf + c7ba771 commit 2480bc1

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

services/java/com/android/server/ServiceWatcher.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ private void bindToPackage(String packageName, int version) {
170170
}
171171
if (D) Log.d(mTag, "binding " + packageName + " (version " + version + ")");
172172
mContext.bindService(intent, this, Context.BIND_AUTO_CREATE | Context.BIND_NOT_FOREGROUND
173-
| Context.BIND_ALLOW_OOM_MANAGEMENT);
173+
| Context.BIND_ALLOW_OOM_MANAGEMENT | Context.BIND_NOT_VISIBLE);
174174
}
175175

176176
private boolean isSignatureMatch(Signature[] signatures) {

services/java/com/android/server/am/ActivityManagerService.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11514,8 +11514,9 @@ private final int broadcastIntentLocked(ProcessRecord callerApp,
1151411514
* Prevent non-system code (defined here to be non-persistent
1151511515
* processes) from sending protected broadcasts.
1151611516
*/
11517-
if (callingUid == Process.SYSTEM_UID || callingUid == Process.PHONE_UID
11518-
|| callingUid == Process.SHELL_UID || callingUid == Process.BLUETOOTH_UID ||
11517+
int callingAppId = UserHandle.getAppId(callingUid);
11518+
if (callingAppId == Process.SYSTEM_UID || callingAppId == Process.PHONE_UID
11519+
|| callingAppId == Process.SHELL_UID || callingAppId == Process.BLUETOOTH_UID ||
1151911520
callingUid == 0) {
1152011521
// Always okay.
1152111522
} else if (callerApp == null || !callerApp.persistent) {

0 commit comments

Comments
 (0)