diff options
author | Amith Yamasani <yamasani@google.com> | 2013-09-11 17:22:35 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2013-09-11 17:22:35 -0700 |
commit | b5dec6a606bee5b5724352d90ee60b95f33773fb (patch) | |
tree | 8ddd9bc707eb7a0ccfc3eba3fb82e0b42a196594 /packages/SettingsProvider | |
parent | 7c3c23114b08f656b08c86d1c4ea8e1b366f5207 (diff) | |
parent | dd9157ce314f3b8d20f6b65a6f9dbf00acbe7ea1 (diff) | |
download | frameworks_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.java | 4 |
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; |