diff options
author | John Spurlock <jspurlock@google.com> | 2014-07-22 16:31:00 -0400 |
---|---|---|
committer | John Spurlock <jspurlock@google.com> | 2014-07-22 19:51:40 -0400 |
commit | 54612391878a2300fc44ea3f4befc171b3d5e737 (patch) | |
tree | 98ac9c5d0bb71458ec6a35c4f59d9128b533a066 /src/com/android/settings/notification/ZenModeSettings.java | |
parent | e65bb4927faf8e353c73b58648e51a8081615dcf (diff) | |
download | packages_apps_Settings-54612391878a2300fc44ea3f4befc171b3d5e737.zip packages_apps_Settings-54612391878a2300fc44ea3f4befc171b3d5e737.tar.gz packages_apps_Settings-54612391878a2300fc44ea3f4befc171b3d5e737.tar.bz2 |
Settings: Tweak zen alarm info string.
Use standard styling and remove the bit about timers.
Bug:16487906
Change-Id: I28b8ac61981a2e9956d41768ee1185dc5ad950f3
Diffstat (limited to 'src/com/android/settings/notification/ZenModeSettings.java')
-rw-r--r-- | src/com/android/settings/notification/ZenModeSettings.java | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/src/com/android/settings/notification/ZenModeSettings.java b/src/com/android/settings/notification/ZenModeSettings.java index 02bb85e..c8befa0 100644 --- a/src/com/android/settings/notification/ZenModeSettings.java +++ b/src/com/android/settings/notification/ZenModeSettings.java @@ -28,7 +28,6 @@ import android.content.DialogInterface.OnDismissListener; import android.content.pm.PackageManager; import android.content.res.Resources; import android.database.ContentObserver; -import android.graphics.Typeface; import android.net.Uri; import android.os.Bundle; import android.os.Handler; @@ -45,9 +44,6 @@ import android.service.notification.ZenModeConfig; import android.text.format.DateFormat; import android.util.Log; import android.util.SparseArray; -import android.view.View; -import android.view.ViewGroup; -import android.widget.TextView; import android.widget.TimePicker; import com.android.settings.R; @@ -72,6 +68,7 @@ public class ZenModeSettings extends SettingsPreferenceFragment implements Index private static final String KEY_CALLS = "phone_calls"; private static final String KEY_MESSAGES = "messages"; private static final String KEY_STARRED = "starred"; + private static final String KEY_ALARM_INFO = "alarm_info"; private static final String KEY_DOWNTIME = "downtime"; private static final String KEY_DAYS = "days"; @@ -110,6 +107,7 @@ public class ZenModeSettings extends SettingsPreferenceFragment implements Index } rt.put(R.string.zen_mode_messages, KEY_MESSAGES); rt.put(R.string.zen_mode_from_starred, KEY_STARRED); + rt.put(R.string.zen_mode_alarm_info, KEY_ALARM_INFO); rt.put(R.string.zen_mode_downtime_category, KEY_DOWNTIME); rt.put(R.string.zen_mode_downtime_days, KEY_DAYS); rt.put(R.string.zen_mode_start_time, KEY_START_TIME); @@ -141,8 +139,6 @@ public class ZenModeSettings extends SettingsPreferenceFragment implements Index super.onCreate(savedInstanceState); mContext = getActivity(); mPM = mContext.getPackageManager(); - final Resources res = mContext.getResources(); - final int padding = res.getDimensionPixelSize(R.dimen.content_margin_left); addPreferencesFromResource(R.xml.zen_mode_settings); final PreferenceScreen root = getPreferenceScreen(); @@ -157,6 +153,8 @@ 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)) { @@ -213,18 +211,6 @@ public class ZenModeSettings extends SettingsPreferenceFragment implements Index }); important.addPreference(mStarred); - final Preference alarmInfo = new Preference(mContext) { - @Override - public View getView(View convertView, ViewGroup parent) { - final TextView tv = new TextView(mContext); - tv.setTypeface(Typeface.create(Typeface.DEFAULT, Typeface.ITALIC)); - tv.setPadding(padding, padding, padding, padding); - tv.setText(R.string.zen_mode_alarm_info); - return tv; - } - }; - alarmInfo.setPersistent(false); - alarmInfo.setSelectable(false); important.addPreference(alarmInfo); final PreferenceCategory downtime = (PreferenceCategory) root.findPreference(KEY_DOWNTIME); |