am b926d484: Merge "Handle the case where the restore environment doesn\'t have the ringtone" into klp-dev
* commit 'b926d484a76eda4152ba46d3ef517517226ca699': Handle the case where the restore environment doesn't have the ringtone
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user