Commit d488a0e3 authored by Isaac Katzenelson's avatar Isaac Katzenelson
Browse files

Show vibrate selection in settings

Bug: 2767775 Display right summary description based
Change-Id: I3b1d9784011ff28cc5b6264038690fa3e395e5c3
     on the selection for Vibrate options
parent 89af189b
......@@ -453,8 +453,6 @@
<string name="preferences_alerts_title">Notifications</string>
<!-- Settings dialog label that specifies when the phone should vibrate -->
<string name="preferences_alerts_vibrateWhen_title">Vibrate</string>
<!-- Settings screen, setting summary text -->
<string name="preferences_alerts_vibrateWhen_summary">Also vibrate for reminders</string>
<!-- Title of ringtone selector dialog -->
<string name="preferences_alerts_ringtone_title">Select ringtone</string>
<!-- Title of check box label to enable or disable pop-up notifications -->
......
......@@ -68,7 +68,6 @@
android:layout="?android:attr/preferenceLayoutChild"
android:key="preferences_alerts_vibrateWhen"
android:title="@string/preferences_alerts_vibrateWhen_title"
android:summary="@string/preferences_alerts_vibrateWhen_summary"
android:entries="@array/prefEntries_alerts_vibrateWhen"
android:entryValues="@array/prefValues_alerts_vibrateWhen"
android:defaultValue="@string/prefDefault_alerts_vibrateWhen"
......
......@@ -142,6 +142,8 @@ public class GeneralPreferences extends PreferenceFragment implements
PreferenceCategory mAlertGroup = (PreferenceCategory) preferenceScreen
.findPreference(KEY_ALERTS_CATEGORY);
mAlertGroup.removePreference(mVibrateWhen);
} else {
mVibrateWhen.setSummary(mVibrateWhen.getEntry());
}
mRingtone = (RingtonePreference) preferenceScreen.findPreference(KEY_ALERTS_RINGTONE);
......@@ -191,6 +193,8 @@ public class GeneralPreferences extends PreferenceFragment implements
mDefaultReminder.setOnPreferenceChangeListener(listener);
mRingtone.setOnPreferenceChangeListener(listener);
mHideDeclined.setOnPreferenceChangeListener(listener);
mVibrateWhen.setOnPreferenceChangeListener(listener);
}
@Override
......@@ -247,6 +251,9 @@ public class GeneralPreferences extends PreferenceFragment implements
} else if (preference == mRingtone) {
// TODO update this after b/3417832 is fixed
return true;
} else if (preference == mVibrateWhen) {
mVibrateWhen.setValue((String)newValue);
mVibrateWhen.setSummary(mVibrateWhen.getEntry());
} else {
return true;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment