summaryrefslogtreecommitdiffstats
path: root/src/com/android
diff options
context:
space:
mode:
authorAndrew Lee <anwlee@google.com>2014-12-03 20:35:04 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-12-03 20:35:05 +0000
commita9047c31bdff35349ea88cb3fc6c88cb1d54f9c3 (patch)
treeeb2c66c4b91f731aa9ccb0383ef86855aa318439 /src/com/android
parent0a39f81cf69cf66db5cced018e7606c084657883 (diff)
parentc11bd1b0ac01d0bd3497d1e47e70e53792036e5a (diff)
downloadpackages_apps_PhoneCommon-a9047c31bdff35349ea88cb3fc6c88cb1d54f9c3.tar.gz
packages_apps_PhoneCommon-a9047c31bdff35349ea88cb3fc6c88cb1d54f9c3.tar.bz2
packages_apps_PhoneCommon-a9047c31bdff35349ea88cb3fc6c88cb1d54f9c3.zip
Merge "Use string SharedPreferences key for update ringtone." into lmp-mr1-dev
Diffstat (limited to 'src/com/android')
-rw-r--r--src/com/android/phone/common/util/SettingsUtil.java10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/com/android/phone/common/util/SettingsUtil.java b/src/com/android/phone/common/util/SettingsUtil.java
index 6a5bd1c..859c1a5 100644
--- a/src/com/android/phone/common/util/SettingsUtil.java
+++ b/src/com/android/phone/common/util/SettingsUtil.java
@@ -58,15 +58,11 @@ public class SettingsUtil {
* @param context The application context.
* @param handler The handler, which takes the name of the ringtone as a String as a parameter.
* @param type The type of sound.
- * @param preference The preference being updated.
+ * @param key The key to the shared preferences entry being updated.
* @param msg An integer identifying the message sent to the handler.
*/
public static void updateRingtoneName(
- Context context, Handler handler, int type, Preference preference, int msg) {
- if (preference == null) {
- return;
- }
-
+ Context context, Handler handler, int type, String key, int msg) {
final Uri ringtoneUri;
boolean defaultRingtone = false;
if (type == RingtoneManager.TYPE_RINGTONE) {
@@ -76,7 +72,7 @@ public class SettingsUtil {
} else {
final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
// For voicemail notifications, we use the value saved in Phone's shared preferences.
- String uriString = prefs.getString(preference.getKey(), null);
+ String uriString = prefs.getString(key, null);
if (TextUtils.isEmpty(uriString)) {
// silent ringtone
ringtoneUri = null;