Update titles and summaries of the Date and time settings page
Design doc: go/dd-android-settings-time-2024 This change covers Part 1, which consists of adding user-friendly summary under each toggle and rewording titles. Bug: 296835792 Test: on-device and atest Flag: EXEMPT resource only update Change-Id: I0b685743599880fc1c4ad680eca9c36e4e64d0ff
This commit is contained in:
@@ -27,6 +27,8 @@ import android.app.time.TimeConfiguration;
|
||||
import android.app.time.TimeManager;
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.preference.Preference;
|
||||
|
||||
import com.android.internal.annotations.VisibleForTesting;
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.core.TogglePreferenceController;
|
||||
@@ -76,6 +78,17 @@ public class AutoTimePreferenceController extends TogglePreferenceController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateState(Preference preference) {
|
||||
super.updateState(preference);
|
||||
refreshSummary(preference);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CharSequence getSummary() {
|
||||
return mContext.getString(R.string.date_time_auto_summary);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isChecked() {
|
||||
return isEnabled();
|
||||
|
||||
Reference in New Issue
Block a user