Skip to content

Commit 0184ce9

Browse files
author
Amith Yamasani
committed
Undo a previous change that's causing multi-user issues
Surgical hack for getting Settings to run multiple instances without causing other system services/providers from doing the same. Change-Id: Ic5dab61976a04c3012235299ba55edfcd8273dbb
1 parent c96ebd8 commit 0184ce9

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

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

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1794,16 +1794,14 @@ final void updateLruProcessLocked(ProcessRecord app,
17941794

17951795
final ProcessRecord getProcessRecordLocked(
17961796
String processName, int uid) {
1797-
if (uid == Process.SYSTEM_UID) {
1798-
SparseArray<ProcessRecord> procs = mProcessNames.getMap().get(processName);
1799-
if (procs == null) return null;
1800-
int N = procs.size();
1801-
for (int i = 0; i < N; i++) {
1802-
if (UserId.isSameUser(procs.keyAt(i), uid)) {
1803-
return procs.valueAt(i);
1804-
}
1805-
}
1806-
return null;
1797+
// Temporary hack to make Settings run per user
1798+
if (uid == Process.SYSTEM_UID && !processName.equals("com.android.settings")) {
1799+
// The system gets to run in any process. If there are multiple
1800+
// processes with the same uid, just pick the first (this
1801+
// should never happen).
1802+
SparseArray<ProcessRecord> procs = mProcessNames.getMap().get(
1803+
processName);
1804+
return procs != null ? procs.valueAt(0) : null;
18071805
}
18081806
// uid = applyUserId(uid);
18091807
ProcessRecord proc = mProcessNames.get(processName, uid);

0 commit comments

Comments
 (0)