summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndrew Lee <anwlee@google.com>2015-01-26 22:09:14 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-01-26 22:09:14 +0000
commit53abf3276ae2ba32b6f34a91001943c0d0b621b9 (patch)
tree017b634da24cd948a1035ecdad374d64974e1fa3 /src
parent682bc4f174ed3939119e01d04122a6fb196f3b42 (diff)
parentf300ae67ec39a6ebaf09aad574c35f98d1a84d89 (diff)
downloadandroid_packages_apps_PhoneCommon-53abf3276ae2ba32b6f34a91001943c0d0b621b9.tar.gz
android_packages_apps_PhoneCommon-53abf3276ae2ba32b6f34a91001943c0d0b621b9.tar.bz2
android_packages_apps_PhoneCommon-53abf3276ae2ba32b6f34a91001943c0d0b621b9.zip
am f300ae67: am 2b2bcb0f: am 895849b2: Return default notification uri if none found.
* commit 'f300ae67ec39a6ebaf09aad574c35f98d1a84d89': Return default notification uri if none found.
Diffstat (limited to 'src')
-rw-r--r--src/com/android/phone/common/util/SettingsUtil.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/com/android/phone/common/util/SettingsUtil.java b/src/com/android/phone/common/util/SettingsUtil.java
index 05f2384..e473947 100644
--- a/src/com/android/phone/common/util/SettingsUtil.java
+++ b/src/com/android/phone/common/util/SettingsUtil.java
@@ -36,6 +36,9 @@ import java.lang.CharSequence;
import java.lang.String;
public class SettingsUtil {
+ private static final String DEFAULT_NOTIFICATION_URI_STRING =
+ Settings.System.DEFAULT_NOTIFICATION_URI.toString();
+
/**
* Queries for a ringtone name, and sets the name using a handler.
* This is a method was originally copied from com.android.settings.SoundSettings.
@@ -57,12 +60,12 @@ 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(key, null);
+ String uriString = prefs.getString(key, DEFAULT_NOTIFICATION_URI_STRING);
if (TextUtils.isEmpty(uriString)) {
// silent ringtone
ringtoneUri = null;
} else {
- if (uriString.equals(Settings.System.DEFAULT_NOTIFICATION_URI.toString())) {
+ if (uriString.equals(DEFAULT_NOTIFICATION_URI_STRING)) {
// If it turns out that the voicemail notification is set to the system
// default notification, we retrieve the actual URI to prevent it from showing
// up as "Unknown Ringtone".