@@ -2612,23 +2612,23 @@ private void reloadSetAutoTimeRequiredUi() {
2612
2612
private void reloadSetAutoTimeUi () {
2613
2613
try {
2614
2614
boolean isAutoTime = (Boolean ) ReflectionUtil .invoke (mDevicePolicyManager ,
2615
- "getAutoTime " , new Class <?>[]{ComponentName .class },
2615
+ "getAutoTimeEnabled " , new Class <?>[]{ComponentName .class },
2616
2616
mAdminComponentName );
2617
2617
mSetAutoTimePreference .setChecked (isAutoTime );
2618
2618
} catch (ReflectionIsTemporaryException e ) {
2619
- Log .e (TAG , "Error invoking getAutoTime " , e );
2619
+ Log .e (TAG , "Error invoking getAutoTimeEnabled " , e );
2620
2620
}
2621
2621
}
2622
2622
2623
2623
@ TargetApi (Util .R_VERSION_CODE )
2624
2624
private void reloadSetAutoTimeZoneUi () {
2625
2625
try {
2626
2626
boolean isAutoTimeZone = (Boolean ) ReflectionUtil .invoke (mDevicePolicyManager ,
2627
- "getAutoTimeZone " , new Class <?>[]{ComponentName .class },
2627
+ "getAutoTimeZoneEnabled " , new Class <?>[]{ComponentName .class },
2628
2628
mAdminComponentName );
2629
2629
mSetAutoTimeZonePreference .setChecked (isAutoTimeZone );
2630
2630
} catch (ReflectionIsTemporaryException e ) {
2631
- Log .e (TAG , "Error invoking getAutoTimeZone " , e );
2631
+ Log .e (TAG , "Error invoking getAutoTimeZoneEnabled " , e );
2632
2632
}
2633
2633
}
2634
2634
@@ -4072,11 +4072,11 @@ abstract static class ManageLockTaskListCallback {
4072
4072
4073
4073
private void setAutoTimeEnabled (boolean enabled ) {
4074
4074
try {
4075
- ReflectionUtil .invoke (mDevicePolicyManager , "setAutoTime " ,
4075
+ ReflectionUtil .invoke (mDevicePolicyManager , "setAutoTimeEnabled " ,
4076
4076
new Class <?>[]{ComponentName .class , boolean .class },
4077
4077
mAdminComponentName , enabled );
4078
4078
} catch (ReflectionIsTemporaryException e ) {
4079
- Log .e (TAG , "Error invoking setAutoTime " , e );
4079
+ Log .e (TAG , "Error invoking setAutoTimeEnabled " , e );
4080
4080
// Prior to R, auto time is controlled by a global setting
4081
4081
mDevicePolicyManager .setGlobalSetting (mAdminComponentName ,
4082
4082
Settings .Global .AUTO_TIME , enabled ? "1" : "0" );
@@ -4085,11 +4085,11 @@ private void setAutoTimeEnabled(boolean enabled) {
4085
4085
4086
4086
private void setAutoTimeZoneEnabled (boolean enabled ) {
4087
4087
try {
4088
- ReflectionUtil .invoke (mDevicePolicyManager , "setAutoTimeZone " ,
4088
+ ReflectionUtil .invoke (mDevicePolicyManager , "setAutoTimeZoneEnabled " ,
4089
4089
new Class <?>[]{ComponentName .class , boolean .class },
4090
4090
mAdminComponentName , enabled );
4091
4091
} catch (ReflectionIsTemporaryException e ) {
4092
- Log .e (TAG , "Error invoking setAutoTimeZone " , e );
4092
+ Log .e (TAG , "Error invoking setAutoTimeZoneEnabled " , e );
4093
4093
// Prior to R, auto timezone is controlled by a global setting
4094
4094
mDevicePolicyManager .setGlobalSetting (mAdminComponentName ,
4095
4095
Settings .Global .AUTO_TIME_ZONE , enabled ? "1" : "0" );
0 commit comments