Skip to content

Commit 3cca843

Browse files
author
Rubin Xu
committed
Upgrade TestDPC SDK to R
Bug: 152203329 Test: ./gradlew assemble Change-Id: I28fa76e3ff2d54e9daf739f2c4205a4c18bc4989
1 parent e47e297 commit 3cca843

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ext {
1313
}
1414

1515
android {
16-
compileSdkVersion 'android-29'
16+
compileSdkVersion 'android-R'
1717
buildToolsVersion "28.0.0"
1818

1919
defaultConfig {

app/src/main/java/com/afwsamples/testdpc/policy/PolicyManagementFragment.java

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2575,15 +2575,8 @@ private void reloadEnableBackupServiceUi() {
25752575
//@TargetApi(VERSION_CODES.R)
25762576
private void reloadCommonCriteriaModeUi() {
25772577
if (mCommonCriteriaModePreference.isEnabled()) {
2578-
try {
2579-
mCommonCriteriaModePreference.setChecked(
2580-
(Boolean) ReflectionUtil.invoke(mDevicePolicyManager,
2581-
"isCommonCriteriaModeEnabled",
2582-
new Class<?>[]{ComponentName.class},
2583-
mAdminComponentName));
2584-
} catch (ReflectionIsTemporaryException e) {
2585-
Log.e(TAG, "Error invoking isCommonCriteriaModeEnabled", e);
2586-
}
2578+
mCommonCriteriaModePreference.setChecked(
2579+
mDevicePolicyManager.isCommonCriteriaModeEnabled(mAdminComponentName));
25872580
}
25882581
}
25892582

0 commit comments

Comments
 (0)