Refinements for DND settings
- Adding headers - Remove collapsed 'advanced - correcting label for main toggle - fix underline Test: manual Fixes: 179210702 Fixes: 173910494 Change-Id: Iec67639a12c7e93dcf19d415108e7d2c1fcb93d4
This commit is contained in:
@@ -8247,6 +8247,9 @@
|
|||||||
<!-- Do not disturb settings, main screen, field, duration setting where user can specify how
|
<!-- Do not disturb settings, main screen, field, duration setting where user can specify how
|
||||||
long dnd will last when toggling dnd on from qs) [CHAR LIMIT=100] -->
|
long dnd will last when toggling dnd on from qs) [CHAR LIMIT=100] -->
|
||||||
<string name="zen_category_duration">Duration for Quick Settings</string>
|
<string name="zen_category_duration">Duration for Quick Settings</string>
|
||||||
|
<!-- Do not disturb settings, main screen, category header describing settings that do not
|
||||||
|
fit in another group [CHAR LIMIT=100] -->
|
||||||
|
<string name="zen_settings_general">General</string>
|
||||||
|
|
||||||
<!-- Do not disturb settings, sound and vibrations screen footer [CHAR LIMIT=NONE]-->
|
<!-- Do not disturb settings, sound and vibrations screen footer [CHAR LIMIT=NONE]-->
|
||||||
<string name="zen_sound_footer">When Do Not Disturb is on, sound and vibration will be muted, except for the items you allow above.</string>
|
<string name="zen_sound_footer">When Do Not Disturb is on, sound and vibration will be muted, except for the items you allow above.</string>
|
||||||
@@ -12808,7 +12811,9 @@
|
|||||||
<!-- Title for battery saver main switch preferences. [CHAR LIMIT=50] -->
|
<!-- Title for battery saver main switch preferences. [CHAR LIMIT=50] -->
|
||||||
<string name="battery_saver_main_switch_title">Use battery saver</string>
|
<string name="battery_saver_main_switch_title">Use battery saver</string>
|
||||||
<!-- Title for Do Not Disturb main switch preferences. [CHAR LIMIT=50] -->
|
<!-- Title for Do Not Disturb main switch preferences. [CHAR LIMIT=50] -->
|
||||||
<string name="do_not_disturb_main_switch_title">Use Do Not Disturb</string>
|
<string name="do_not_disturb_main_switch_title_on">Turn off now</string>
|
||||||
|
<!-- Title for Do Not Disturb main switch preferences. [CHAR LIMIT=50] -->
|
||||||
|
<string name="do_not_disturb_main_switch_title_off">Turn on now</string>
|
||||||
<!-- Title for Night Light main switch preferences. [CHAR LIMIT=50] -->
|
<!-- Title for Night Light main switch preferences. [CHAR LIMIT=50] -->
|
||||||
<string name="night_light_main_switch_title">Use Night Light</string>
|
<string name="night_light_main_switch_title">Use Night Light</string>
|
||||||
<!-- Title for NFC main switch preferences. [CHAR LIMIT=50] -->
|
<!-- Title for NFC main switch preferences. [CHAR LIMIT=50] -->
|
||||||
|
@@ -23,7 +23,6 @@
|
|||||||
<!-- Turn on DND button -->
|
<!-- Turn on DND button -->
|
||||||
<com.android.settingslib.widget.MainSwitchPreference
|
<com.android.settingslib.widget.MainSwitchPreference
|
||||||
android:key="zen_mode_toggle"
|
android:key="zen_mode_toggle"
|
||||||
android:title="@string/do_not_disturb_main_switch_title"
|
|
||||||
settings:keywords="@string/keywords_zen_mode_settings"/>
|
settings:keywords="@string/keywords_zen_mode_settings"/>
|
||||||
|
|
||||||
<PreferenceCategory
|
<PreferenceCategory
|
||||||
@@ -49,15 +48,18 @@
|
|||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
|
|
||||||
<!-- Automatic rules -->
|
<!-- Automatic rules -->
|
||||||
|
<PreferenceCategory
|
||||||
|
android:key="zen_mode_settings_schedule"
|
||||||
|
android:title="@string/zen_category_schedule">
|
||||||
<Preference
|
<Preference
|
||||||
android:key="zen_mode_automation_settings"
|
android:key="zen_mode_automation_settings"
|
||||||
android:title="@string/zen_category_schedule"
|
android:title="@string/zen_category_schedule"
|
||||||
settings:allowDividerAbove="true"
|
|
||||||
android:fragment="com.android.settings.notification.zen.ZenModeAutomationSettings"/>
|
android:fragment="com.android.settings.notification.zen.ZenModeAutomationSettings"/>
|
||||||
|
</PreferenceCategory>
|
||||||
|
|
||||||
<PreferenceCategory
|
<PreferenceCategory
|
||||||
android:key="zen_mode_settings_advanced"
|
android:title="@string/zen_settings_general"
|
||||||
settings:initialExpandedChildrenCount="0">
|
android:key="zen_mode_settings_advanced">
|
||||||
|
|
||||||
<!-- DND duration settings -->
|
<!-- DND duration settings -->
|
||||||
<com.android.settings.notification.zen.ZenDurationDialogPreference
|
<com.android.settings.notification.zen.ZenDurationDialogPreference
|
||||||
|
@@ -25,6 +25,7 @@ import androidx.fragment.app.FragmentManager;
|
|||||||
import androidx.preference.Preference;
|
import androidx.preference.Preference;
|
||||||
import androidx.preference.PreferenceScreen;
|
import androidx.preference.PreferenceScreen;
|
||||||
|
|
||||||
|
import com.android.settings.R;
|
||||||
import com.android.settings.core.PreferenceControllerMixin;
|
import com.android.settings.core.PreferenceControllerMixin;
|
||||||
import com.android.settings.dashboard.DashboardFragment;
|
import com.android.settings.dashboard.DashboardFragment;
|
||||||
import com.android.settings.notification.SettingsEnableZenModeDialog;
|
import com.android.settings.notification.SettingsEnableZenModeDialog;
|
||||||
@@ -90,9 +91,11 @@ public class ZenModeButtonPreferenceController extends AbstractZenModePreference
|
|||||||
case Settings.Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS:
|
case Settings.Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS:
|
||||||
case Settings.Global.ZEN_MODE_NO_INTERRUPTIONS:
|
case Settings.Global.ZEN_MODE_NO_INTERRUPTIONS:
|
||||||
mPreference.updateStatus(true);
|
mPreference.updateStatus(true);
|
||||||
|
mPreference.setTitle(R.string.do_not_disturb_main_switch_title_on);
|
||||||
break;
|
break;
|
||||||
case Settings.Global.ZEN_MODE_OFF:
|
case Settings.Global.ZEN_MODE_OFF:
|
||||||
default:
|
default:
|
||||||
|
mPreference.setTitle(R.string.do_not_disturb_main_switch_title_off);
|
||||||
mPreference.updateStatus(false);
|
mPreference.updateStatus(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user