Merge "[SettingsProvider] do not check @Readable for system/priv apps in the server" into sc-dev

This commit is contained in:
TreeHugger Robot
2021-03-11 20:17:56 +00:00
committed by Android (Google) Code Review

View File

@@ -1937,8 +1937,11 @@ public class SettingsProvider extends ContentProvider {
if (UserHandle.getAppId(Binder.getCallingUid()) < Process.FIRST_APPLICATION_UID) {
return;
}
checkReadableAnnotation(settingsType, settingName);
ApplicationInfo ai = getCallingApplicationInfoOrThrow();
if (ai.isSystemApp() || ai.isSignedWithPlatformKey()) {
return;
}
checkReadableAnnotation(settingsType, settingName);
if (!ai.isInstantApp()) {
return;
}