OSDN Git Service

Settings: Fix ordering for interruptions alarm warning.
authorJohn Spurlock <jspurlock@google.com>
Wed, 30 Jul 2014 16:33:04 +0000 (12:33 -0400)
committerJohn Spurlock <jspurlock@google.com>
Wed, 30 Jul 2014 16:33:04 +0000 (12:33 -0400)
And update the string to the latest.

Bug:16662819
Change-Id: I42b38ab4721180babfd816a34a1fb1c368546cca

res/values/strings.xml
res/xml/zen_mode_settings.xml
src/com/android/settings/notification/ZenModeSettings.java

index a18835a..b590026 100644 (file)
     <string name="zen_mode_from_starred">Starred contacts only</string>
 
     <!-- [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 -->
     <string name="zen_mode_when">Automatically turn on</string>
index a4084cb..aea4291 100644 (file)
             android:switchTextOff=""
             android:switchTextOn="" />
 
+        <com.android.settings.notification.DropDownPreference
+                android:key="starred"
+                android:title="@string/zen_mode_from"
+                android:persistent="false" />
+
         <Preference
             android:key="alarm_info"
             android:title=""
index c20b350..5e24b9d 100644 (file)
@@ -153,8 +153,6 @@ public class ZenModeSettings extends SettingsPreferenceFragment implements Index
 
         final PreferenceCategory important =
                 (PreferenceCategory) root.findPreference(KEY_IMPORTANT);
-        final Preference alarmInfo = important.findPreference(KEY_ALARM_INFO);
-        important.removePreference(alarmInfo);
 
         mCalls = (SwitchPreference) important.findPreference(KEY_CALLS);
         if (Utils.isVoiceCapable(mContext)) {
@@ -189,9 +187,7 @@ public class ZenModeSettings extends SettingsPreferenceFragment implements Index
             }
         });
 
-        mStarred = new DropDownPreference(mContext);
-        mStarred.setKey(KEY_STARRED);
-        mStarred.setTitle(R.string.zen_mode_from);
+        mStarred = (DropDownPreference) important.findPreference(KEY_STARRED);
         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_starred, ZenModeConfig.SOURCE_STAR);
@@ -211,8 +207,6 @@ public class ZenModeSettings extends SettingsPreferenceFragment implements Index
         });
         important.addPreference(mStarred);
 
-        important.addPreference(alarmInfo);
-
         final PreferenceCategory downtime = (PreferenceCategory) root.findPreference(KEY_DOWNTIME);
 
         mDays = downtime.findPreference(KEY_DAYS);