File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
app/src/main/java/com/afwsamples/testdpc/policy Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -2527,8 +2527,11 @@ private void reloadSetAutoTimeRequiredUi() {
2527
2527
2528
2528
@ TargetApi (Util .R_VERSION_CODE )
2529
2529
private void reloadSetAutoTimeUi () {
2530
- boolean isOrgOwned = Util .SDK_INT >= VERSION_CODES .R &&
2531
- mDevicePolicyManager .isOrganizationOwnedDeviceWithManagedProfile ();
2530
+ if (Util .SDK_INT < VERSION_CODES .R ) {
2531
+ return ;
2532
+ }
2533
+ boolean isOrgOwned =
2534
+ mDevicePolicyManager .isOrganizationOwnedDeviceWithManagedProfile ();
2532
2535
2533
2536
if (mDevicePolicyManager .isDeviceOwnerApp (mPackageName )
2534
2537
|| (mDevicePolicyManager .isProfileOwnerApp (mPackageName )
@@ -2540,8 +2543,11 @@ private void reloadSetAutoTimeUi() {
2540
2543
2541
2544
@ TargetApi (Util .R_VERSION_CODE )
2542
2545
private void reloadSetAutoTimeZoneUi () {
2543
- boolean isOrgOwned = Util .SDK_INT >= VERSION_CODES .R &&
2544
- mDevicePolicyManager .isOrganizationOwnedDeviceWithManagedProfile ();
2546
+ if (Util .SDK_INT < VERSION_CODES .R ) {
2547
+ return ;
2548
+ }
2549
+ boolean isOrgOwned =
2550
+ mDevicePolicyManager .isOrganizationOwnedDeviceWithManagedProfile ();
2545
2551
2546
2552
if (mDevicePolicyManager .isDeviceOwnerApp (mPackageName )
2547
2553
|| (mDevicePolicyManager .isProfileOwnerApp (mPackageName )
You can’t perform that action at this time.
0 commit comments