@@ -2578,23 +2578,23 @@ private void reloadSetAutoTimeRequiredUi() {
2578
2578
private void reloadSetAutoTimeUi () {
2579
2579
try {
2580
2580
boolean isAutoTime = (Boolean ) ReflectionUtil .invoke (mDevicePolicyManager ,
2581
- "getAutoTime " , new Class <?>[]{ComponentName .class },
2581
+ "getAutoTimeEnabled " , new Class <?>[]{ComponentName .class },
2582
2582
mAdminComponentName );
2583
2583
mSetAutoTimePreference .setChecked (isAutoTime );
2584
2584
} catch (ReflectionIsTemporaryException e ) {
2585
- Log .e (TAG , "Error invoking getAutoTime " , e );
2585
+ Log .e (TAG , "Error invoking getAutoTimeEnabled " , e );
2586
2586
}
2587
2587
}
2588
2588
2589
2589
@ TargetApi (Util .R_VERSION_CODE )
2590
2590
private void reloadSetAutoTimeZoneUi () {
2591
2591
try {
2592
2592
boolean isAutoTimeZone = (Boolean ) ReflectionUtil .invoke (mDevicePolicyManager ,
2593
- "getAutoTimeZone " , new Class <?>[]{ComponentName .class },
2593
+ "getAutoTimeZoneEnabled " , new Class <?>[]{ComponentName .class },
2594
2594
mAdminComponentName );
2595
2595
mSetAutoTimeZonePreference .setChecked (isAutoTimeZone );
2596
2596
} catch (ReflectionIsTemporaryException e ) {
2597
- Log .e (TAG , "Error invoking getAutoTimeZone " , e );
2597
+ Log .e (TAG , "Error invoking getAutoTimeZoneEnabled " , e );
2598
2598
}
2599
2599
}
2600
2600
@@ -4038,11 +4038,11 @@ abstract static class ManageLockTaskListCallback {
4038
4038
4039
4039
private void setAutoTimeEnabled (boolean enabled ) {
4040
4040
try {
4041
- ReflectionUtil .invoke (mDevicePolicyManager , "setAutoTime " ,
4041
+ ReflectionUtil .invoke (mDevicePolicyManager , "setAutoTimeEnabled " ,
4042
4042
new Class <?>[]{ComponentName .class , boolean .class },
4043
4043
mAdminComponentName , enabled );
4044
4044
} catch (ReflectionIsTemporaryException e ) {
4045
- Log .e (TAG , "Error invoking setAutoTime " , e );
4045
+ Log .e (TAG , "Error invoking setAutoTimeEnabled " , e );
4046
4046
// Prior to R, auto time is controlled by a global setting
4047
4047
mDevicePolicyManager .setGlobalSetting (mAdminComponentName ,
4048
4048
Settings .Global .AUTO_TIME , enabled ? "1" : "0" );
@@ -4051,11 +4051,11 @@ private void setAutoTimeEnabled(boolean enabled) {
4051
4051
4052
4052
private void setAutoTimeZoneEnabled (boolean enabled ) {
4053
4053
try {
4054
- ReflectionUtil .invoke (mDevicePolicyManager , "setAutoTimeZone " ,
4054
+ ReflectionUtil .invoke (mDevicePolicyManager , "setAutoTimeZoneEnabled " ,
4055
4055
new Class <?>[]{ComponentName .class , boolean .class },
4056
4056
mAdminComponentName , enabled );
4057
4057
} catch (ReflectionIsTemporaryException e ) {
4058
- Log .e (TAG , "Error invoking setAutoTimeZone " , e );
4058
+ Log .e (TAG , "Error invoking setAutoTimeZoneEnabled " , e );
4059
4059
// Prior to R, auto timezone is controlled by a global setting
4060
4060
mDevicePolicyManager .setGlobalSetting (mAdminComponentName ,
4061
4061
Settings .Global .AUTO_TIME_ZONE , enabled ? "1" : "0" );
0 commit comments