Loading packages/SystemUI/res/values/strings.xml +4 −0 Original line number Diff line number Diff line Loading @@ -670,6 +670,10 @@ <string name="quick_settings_dark_mode_secondary_label_on_at">On at <xliff:g id="time" example="10 pm">%s</xliff:g></string> <!-- QuickSettings: Secondary text for when the Dark theme or some other tile will be on until some user-selected time. [CHAR LIMIT=20] --> <string name="quick_settings_dark_mode_secondary_label_until">Until <xliff:g id="time" example="7 am">%s</xliff:g></string> <!-- QuickSettings: Secondary text for when the Dark theme will be enabled at bedtime. [CHAR LIMIT=40] --> <string name="quick_settings_dark_mode_secondary_label_on_at_bedtime">On at bedtime</string> <!-- QuickSettings: Secondary text for when the Dark theme or some other tile will be on until bedtime ends. [CHAR LIMIT=40] --> <string name="quick_settings_dark_mode_secondary_label_until_bedtime_ends">Until bedtime ends</string> <!-- QuickSettings: NFC tile [CHAR LIMIT=NONE] --> <string name="quick_settings_nfc_label">NFC</string> Loading packages/SystemUI/src/com/android/systemui/qs/tiles/UiModeNightTile.java +19 −9 Original line number Diff line number Diff line Loading @@ -129,7 +129,10 @@ public class UiModeNightTile extends QSTileImpl<QSTile.BooleanState> implements ? R.string.quick_settings_dark_mode_secondary_label_until_sunrise : R.string.quick_settings_dark_mode_secondary_label_on_at_sunset); } else if (uiMode == UiModeManager.MODE_NIGHT_CUSTOM) { final boolean use24HourFormat = android.text.format.DateFormat.is24HourFormat(mContext); int nightModeCustomType = mUiModeManager.getNightModeCustomType(); if (nightModeCustomType == UiModeManager.MODE_NIGHT_CUSTOM_TYPE_SCHEDULE) { final boolean use24HourFormat = android.text.format.DateFormat.is24HourFormat( mContext); final LocalTime time; if (nightMode) { time = mUiModeManager.getCustomNightModeEnd(); Loading @@ -140,6 +143,13 @@ public class UiModeNightTile extends QSTileImpl<QSTile.BooleanState> implements ? R.string.quick_settings_dark_mode_secondary_label_until : R.string.quick_settings_dark_mode_secondary_label_on_at, use24HourFormat ? time.toString() : formatter.format(time)); } else if (nightModeCustomType == UiModeManager.MODE_NIGHT_CUSTOM_TYPE_BEDTIME) { state.secondaryLabel = mContext.getResources().getString(nightMode ? R.string.quick_settings_dark_mode_secondary_label_until_bedtime_ends : R.string.quick_settings_dark_mode_secondary_label_on_at_bedtime); } else { state.secondaryLabel = null; } } else { state.secondaryLabel = null; } Loading Loading
packages/SystemUI/res/values/strings.xml +4 −0 Original line number Diff line number Diff line Loading @@ -670,6 +670,10 @@ <string name="quick_settings_dark_mode_secondary_label_on_at">On at <xliff:g id="time" example="10 pm">%s</xliff:g></string> <!-- QuickSettings: Secondary text for when the Dark theme or some other tile will be on until some user-selected time. [CHAR LIMIT=20] --> <string name="quick_settings_dark_mode_secondary_label_until">Until <xliff:g id="time" example="7 am">%s</xliff:g></string> <!-- QuickSettings: Secondary text for when the Dark theme will be enabled at bedtime. [CHAR LIMIT=40] --> <string name="quick_settings_dark_mode_secondary_label_on_at_bedtime">On at bedtime</string> <!-- QuickSettings: Secondary text for when the Dark theme or some other tile will be on until bedtime ends. [CHAR LIMIT=40] --> <string name="quick_settings_dark_mode_secondary_label_until_bedtime_ends">Until bedtime ends</string> <!-- QuickSettings: NFC tile [CHAR LIMIT=NONE] --> <string name="quick_settings_nfc_label">NFC</string> Loading
packages/SystemUI/src/com/android/systemui/qs/tiles/UiModeNightTile.java +19 −9 Original line number Diff line number Diff line Loading @@ -129,7 +129,10 @@ public class UiModeNightTile extends QSTileImpl<QSTile.BooleanState> implements ? R.string.quick_settings_dark_mode_secondary_label_until_sunrise : R.string.quick_settings_dark_mode_secondary_label_on_at_sunset); } else if (uiMode == UiModeManager.MODE_NIGHT_CUSTOM) { final boolean use24HourFormat = android.text.format.DateFormat.is24HourFormat(mContext); int nightModeCustomType = mUiModeManager.getNightModeCustomType(); if (nightModeCustomType == UiModeManager.MODE_NIGHT_CUSTOM_TYPE_SCHEDULE) { final boolean use24HourFormat = android.text.format.DateFormat.is24HourFormat( mContext); final LocalTime time; if (nightMode) { time = mUiModeManager.getCustomNightModeEnd(); Loading @@ -140,6 +143,13 @@ public class UiModeNightTile extends QSTileImpl<QSTile.BooleanState> implements ? R.string.quick_settings_dark_mode_secondary_label_until : R.string.quick_settings_dark_mode_secondary_label_on_at, use24HourFormat ? time.toString() : formatter.format(time)); } else if (nightModeCustomType == UiModeManager.MODE_NIGHT_CUSTOM_TYPE_BEDTIME) { state.secondaryLabel = mContext.getResources().getString(nightMode ? R.string.quick_settings_dark_mode_secondary_label_until_bedtime_ends : R.string.quick_settings_dark_mode_secondary_label_on_at_bedtime); } else { state.secondaryLabel = null; } } else { state.secondaryLabel = null; } Loading