Make ProcessRecord.isolated more robust.

There will be additional cases beyond isolated services where the UID of
the process is different from the UID of the defining package.
Explicitly check for the isolated UID range.

Bug: 215012578
Test: N/A
Change-Id: I39c351f10876ffc2bdb7680bfab9ebf8bddc8153
This commit is contained in:
Martijn Coenen
2022-01-17 19:57:05 +01:00
committed by Nikita Ioffe
parent 174211109c
commit a42d1cf2ac

View File

@@ -513,7 +513,7 @@ class ProcessRecord implements WindowProcessListener {
}
}
processInfo = procInfo;
isolated = _info.uid != _uid;
isolated = Process.isIsolated(_uid);
appZygote = (UserHandle.getAppId(_uid) >= Process.FIRST_APP_ZYGOTE_ISOLATED_UID
&& UserHandle.getAppId(_uid) <= Process.LAST_APP_ZYGOTE_ISOLATED_UID);
uid = _uid;