diff --git a/res/values/strings.xml b/res/values/strings.xml index 5b6321a3d86..e1948d4efdd 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -8931,25 +8931,28 @@ Hide - Hotspot is on + Hotspot - Portable Wi-Fi hotspot %1$s is active, Wi-Fi for this device is turned off. + %1$s on Airplane mode is on - When airplane mode is turned on, Wi\u2011Fi, Bluetooth, and mobile network are turned off. Wi\u2011Fi and Bluetooth can be turned back on. + Networks unavailable Do Not Disturb is on + + Impacts what you hear and see + Battery Saver is on - Battery Saver turns off some device features and restricts apps + Features restricted Mobile data is off @@ -8958,10 +8961,10 @@ Internet is available only via Wi-Fi - Data Saver is on + Data Saver - Background data is only available via Wi-Fi. This may affect some apps or services when Wi-Fi is not available. + Features restricted Work profile is off @@ -8976,22 +8979,22 @@ Device is muted - Phone is muted + Phone muted - Calls and notifications will be muted + For calls & notifications Device is set to vibrate - Phone is set to vibrate + Vibration only Calls and notifications will vibrate device - Calls and notifications will vibrate phone + For calls & notifications Set Night Light schedule @@ -9003,7 +9006,7 @@ Night Light is on - Screen is tinted amber. This may help you fall asleep. + Screen tinted amber %1$d diff --git a/src/com/android/settings/homepage/contextualcards/conditional/DndConditionCardController.java b/src/com/android/settings/homepage/contextualcards/conditional/DndConditionCardController.java index 706b50e8be1..cf91157b8fe 100644 --- a/src/com/android/settings/homepage/contextualcards/conditional/DndConditionCardController.java +++ b/src/com/android/settings/homepage/contextualcards/conditional/DndConditionCardController.java @@ -98,25 +98,12 @@ public class DndConditionCardController implements ConditionalCardController { .setName(mAppContext.getPackageName() + "/" + mAppContext.getText(R.string.condition_zen_title)) .setTitleText(mAppContext.getText(R.string.condition_zen_title).toString()) - .setSummaryText(getSummary().toString()) + .setSummaryText(mAppContext.getText(R.string.condition_zen_summary).toString()) .setIconDrawable(mAppContext.getDrawable(R.drawable.ic_do_not_disturb_on_24dp)) .setIsHalfWidth(true) .build(); } - public CharSequence getSummary() { - final int zen = mNotificationManager.getZenMode(); - final ZenModeConfig config; - boolean zenModeEnabled = zen != Settings.Global.ZEN_MODE_OFF; - if (zenModeEnabled) { - config = mNotificationManager.getZenModeConfig(); - } else { - config = null; - } - return ZenModeConfig.getDescription(mAppContext, zen != Settings.Global.ZEN_MODE_OFF, - config, true); - } - public class Receiver extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) {