Add ChangeId for app data isolation.
Currently we are using DeviceConfig to set the target SDK level as an experiment to determine if this causes any significant problem for existing apps. So for now we just report the change, but once that is done we can switch to using this for targeting. Test: Boot device, see "Compat change id reported: 143937733; UID <various>; state: LOGGED". Bug: 147266020 Change-Id: Ic7f9468fa5b246c0d8e52a1b321c87e72933ca76
This commit is contained in:
@@ -339,6 +339,14 @@ public final class ProcessList {
|
||||
@EnabledAfter(targetSdkVersion = VersionCodes.Q)
|
||||
private static final long NATIVE_HEAP_POINTER_TAGGING = 135754954; // This is a bug id.
|
||||
|
||||
/**
|
||||
* Apps have no access to the private data directories of any other app, even if the other
|
||||
* app has made them world-readable.
|
||||
*/
|
||||
@ChangeId
|
||||
@EnabledAfter(targetSdkVersion = VersionCodes.Q)
|
||||
private static final long APP_DATA_DIRECTORY_ISOLATION = 143937733; // See b/143937733
|
||||
|
||||
ActivityManagerService mService = null;
|
||||
|
||||
// To kill process groups asynchronously
|
||||
@@ -2060,7 +2068,14 @@ public final class ProcessList {
|
||||
}
|
||||
final int minTargetSdk = DeviceConfig.getInt(DeviceConfig.NAMESPACE_ACTIVITY_MANAGER,
|
||||
ANDROID_APP_DATA_ISOLATION_MIN_SDK, Build.VERSION_CODES.R);
|
||||
return app.info.targetSdkVersion >= minTargetSdk;
|
||||
if (app.info.targetSdkVersion < minTargetSdk) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// TODO(b/147266020): Remove non-standard gating above & switch to isChangeEnabled.
|
||||
mPlatformCompat.reportChange(APP_DATA_DIRECTORY_ISOLATION, app.info);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private Map<String, Pair<String, Long>> getPackageAppDataInfoMap(PackageManagerInternal pmInt,
|
||||
|
||||
Reference in New Issue
Block a user