[SettingsProvider] fix server-side Readable maxTargetSdk check

I must have used the wrong autocomplete from Intellij. Previous tests were not able to catch this because we have the same check on the client side.

BUG: 172838801
BUG: 211711793
Test: atest android.appsecurity.cts.ReadableSettingsFieldsTest
Change-Id: Ia3e4541564d9928ff04fa95564bb9e043d49e8ee
This commit is contained in:
Songchun Fan
2021-12-28 19:40:59 +00:00
parent 553429ae39
commit 85034c770f

View File

@@ -2117,7 +2117,7 @@ public class SettingsProvider extends ContentProvider {
}
if ((ai.flags & ApplicationInfo.FLAG_TEST_ONLY) == 0) {
// Skip checking readable annotations for test_only apps
checkReadableAnnotation(settingsType, settingName, ai.targetSandboxVersion);
checkReadableAnnotation(settingsType, settingName, ai.targetSdkVersion);
}
/**
* some settings need additional permission check, this is to have a matching security