diff options
author | Andrew Lee <anwlee@google.com> | 2014-12-03 20:35:04 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-12-03 20:35:05 +0000 |
commit | a9047c31bdff35349ea88cb3fc6c88cb1d54f9c3 (patch) | |
tree | eb2c66c4b91f731aa9ccb0383ef86855aa318439 /src/com/android | |
parent | 0a39f81cf69cf66db5cced018e7606c084657883 (diff) | |
parent | c11bd1b0ac01d0bd3497d1e47e70e53792036e5a (diff) | |
download | packages_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.java | 10 |
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; |