summaryrefslogtreecommitdiffstats
path: root/packages/SettingsProvider
diff options
context:
space:
mode:
authorAmith Yamasani <yamasani@google.com>2013-09-11 17:22:35 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-09-11 17:22:35 -0700
commitb5dec6a606bee5b5724352d90ee60b95f33773fb (patch)
tree8ddd9bc707eb7a0ccfc3eba3fb82e0b42a196594 /packages/SettingsProvider
parent7c3c23114b08f656b08c86d1c4ea8e1b366f5207 (diff)
parentdd9157ce314f3b8d20f6b65a6f9dbf00acbe7ea1 (diff)
downloadframeworks_base-b5dec6a606bee5b5724352d90ee60b95f33773fb.zip
frameworks_base-b5dec6a606bee5b5724352d90ee60b95f33773fb.tar.gz
frameworks_base-b5dec6a606bee5b5724352d90ee60b95f33773fb.tar.bz2
am dd9157ce: am b926d484: Merge "Handle the case where the restore environment doesn\'t have the ringtone" into klp-dev
* commit 'dd9157ce314f3b8d20f6b65a6f9dbf00acbe7ea1': Handle the case where the restore environment doesn't have the ringtone
Diffstat (limited to 'packages/SettingsProvider')
-rw-r--r--packages/SettingsProvider/src/com/android/providers/settings/SettingsHelper.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsHelper.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsHelper.java
index 080290c..dd7a828 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsHelper.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsHelper.java
@@ -104,6 +104,10 @@ public class SettingsHelper {
} else {
Uri canonicalUri = Uri.parse(value);
ringtoneUri = mContext.getContentResolver().uncanonicalize(canonicalUri);
+ if (ringtoneUri == null) {
+ // Unrecognized or invalid Uri, don't restore
+ return;
+ }
}
final int ringtoneType = Settings.System.RINGTONE.equals(name)
? RingtoneManager.TYPE_RINGTONE : RingtoneManager.TYPE_NOTIFICATION;