Settings: Fix ordering for interruptions alarm warning.

And update the string to the latest.

Bug:16662819
Change-Id: I42b38ab4721180babfd816a34a1fb1c368546cca
This commit is contained in:
John Spurlock
2014-07-30 12:33:04 -04:00
parent c8a1db1912
commit 8ef00dfe4b
3 changed files with 7 additions and 8 deletions

View File

@@ -5798,7 +5798,7 @@
<string name="zen_mode_from_starred">Starred contacts only</string> <string name="zen_mode_from_starred">Starred contacts only</string>
<!-- [CHAR LIMIT=80] Zen mode settings: Reminder text about alarms --> <!-- [CHAR LIMIT=80] Zen mode settings: Reminder text about alarms -->
<string name="zen_mode_alarm_info">Alarms and other personal reminders are priority interruptions</string> <string name="zen_mode_alarm_info">Alarms and other personal reminders are always priority</string>
<!-- [CHAR LIMIT=20] Zen mode settings: When option --> <!-- [CHAR LIMIT=20] Zen mode settings: When option -->
<string name="zen_mode_when">Automatically turn on</string> <string name="zen_mode_when">Automatically turn on</string>

View File

@@ -43,6 +43,11 @@
android:switchTextOff="" android:switchTextOff=""
android:switchTextOn="" /> android:switchTextOn="" />
<com.android.settings.notification.DropDownPreference
android:key="starred"
android:title="@string/zen_mode_from"
android:persistent="false" />
<Preference <Preference
android:key="alarm_info" android:key="alarm_info"
android:title="" android:title=""

View File

@@ -153,8 +153,6 @@ public class ZenModeSettings extends SettingsPreferenceFragment implements Index
final PreferenceCategory important = final PreferenceCategory important =
(PreferenceCategory) root.findPreference(KEY_IMPORTANT); (PreferenceCategory) root.findPreference(KEY_IMPORTANT);
final Preference alarmInfo = important.findPreference(KEY_ALARM_INFO);
important.removePreference(alarmInfo);
mCalls = (SwitchPreference) important.findPreference(KEY_CALLS); mCalls = (SwitchPreference) important.findPreference(KEY_CALLS);
if (Utils.isVoiceCapable(mContext)) { if (Utils.isVoiceCapable(mContext)) {
@@ -189,9 +187,7 @@ public class ZenModeSettings extends SettingsPreferenceFragment implements Index
} }
}); });
mStarred = new DropDownPreference(mContext); mStarred = (DropDownPreference) important.findPreference(KEY_STARRED);
mStarred.setKey(KEY_STARRED);
mStarred.setTitle(R.string.zen_mode_from);
mStarred.setDropDownWidth(R.dimen.zen_mode_dropdown_width); mStarred.setDropDownWidth(R.dimen.zen_mode_dropdown_width);
mStarred.addItem(R.string.zen_mode_from_anyone, ZenModeConfig.SOURCE_ANYONE); mStarred.addItem(R.string.zen_mode_from_anyone, ZenModeConfig.SOURCE_ANYONE);
mStarred.addItem(R.string.zen_mode_from_starred, ZenModeConfig.SOURCE_STAR); mStarred.addItem(R.string.zen_mode_from_starred, ZenModeConfig.SOURCE_STAR);
@@ -211,8 +207,6 @@ public class ZenModeSettings extends SettingsPreferenceFragment implements Index
}); });
important.addPreference(mStarred); important.addPreference(mStarred);
important.addPreference(alarmInfo);
final PreferenceCategory downtime = (PreferenceCategory) root.findPreference(KEY_DOWNTIME); final PreferenceCategory downtime = (PreferenceCategory) root.findPreference(KEY_DOWNTIME);
mDays = downtime.findPreference(KEY_DAYS); mDays = downtime.findPreference(KEY_DAYS);