Add updateState to AutoTimeZonePreferenceController
The summary (i.e. description under the toggle title in Android settings) from AutoTimeZonePreferenceController is only used in wifi-only devices, like Tangor. We have found that since V, the summary was no longer displayed in the Date and time settings page. This fix brings the summary back. Bug: b/363176828 Test: tested on a Tangor tablet Flag: EXEMPT bugfix Change-Id: I1f118b8e1d5e0d8d1b0f5b515d79522b72fb4fa4
This commit is contained in:
@@ -27,6 +27,8 @@ import android.app.time.TimeZoneCapabilitiesAndConfig;
|
|||||||
import android.app.time.TimeZoneConfiguration;
|
import android.app.time.TimeZoneConfiguration;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
|
||||||
|
import androidx.preference.Preference;
|
||||||
|
|
||||||
import com.android.internal.annotations.VisibleForTesting;
|
import com.android.internal.annotations.VisibleForTesting;
|
||||||
import com.android.settings.R;
|
import com.android.settings.R;
|
||||||
import com.android.settings.core.TogglePreferenceController;
|
import com.android.settings.core.TogglePreferenceController;
|
||||||
@@ -115,6 +117,12 @@ public class AutoTimeZonePreferenceController extends TogglePreferenceController
|
|||||||
return R.string.menu_key_system;
|
return R.string.menu_key_system;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateState(Preference preference) {
|
||||||
|
super.updateState(preference);
|
||||||
|
refreshSummary(preference);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CharSequence getSummary() {
|
public CharSequence getSummary() {
|
||||||
// If auto time zone cannot enable telephony fallback and is capable of location, then auto
|
// If auto time zone cannot enable telephony fallback and is capable of location, then auto
|
||||||
|
Reference in New Issue
Block a user