Merge changes from topic "presubmit-am-93b3a992dd6c4622a633bca394ada8e5-qt-dev" into qt-dev
* changes: [DO NOT MERGE] Fix can't change notification sound for work profile. [DO NOT MERGE] Fix Settings crash when setting a null ringtone
This commit is contained in:
@@ -46,7 +46,12 @@ public class DefaultRingtonePreference extends RingtonePreference {
|
||||
|
||||
@Override
|
||||
protected void onSaveRingtone(Uri ringtoneUri) {
|
||||
String mimeType = getContext().getContentResolver().getType(ringtoneUri);
|
||||
if (ringtoneUri == null) {
|
||||
setActualDefaultRingtoneUri(ringtoneUri);
|
||||
return;
|
||||
}
|
||||
|
||||
String mimeType = mUserContext.getContentResolver().getType(ringtoneUri);
|
||||
if (mimeType == null) {
|
||||
Log.e(TAG, "onSaveRingtone for URI:" + ringtoneUri
|
||||
+ " ignored: failure to find mimeType (no access from this context?)");
|
||||
|
Reference in New Issue
Block a user