mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-12-12 09:24:26 -05:00
202033c013
This adds 3 expat patches for n-asb-2022-09 from https://github.com/syphyr/android_external_expat/commits/cm-14.1 and also applies 2 of them to 15.1 Signed-off-by: Tad <tad@spotco.us>
41 lines
1.5 KiB
Diff
41 lines
1.5 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Arc Wang <arcwang@google.com>
|
|
Date: Mon, 16 May 2022 14:36:19 +0800
|
|
Subject: [PATCH] Fix Settings crash when setting a null ringtone
|
|
|
|
Ringtone picker may callback a null ringtone Uri
|
|
if users select None.
|
|
|
|
This change pass null ringtone Uri to RingtoneManager
|
|
and return.
|
|
|
|
Bug: 232502532
|
|
Bug: 221041256
|
|
Test: maunal
|
|
Settings - Sound & Vibration -> Phone ringtone
|
|
-> My Sounds -> None
|
|
Change-Id: I044b680871472a3c272f6264c4ef272df542112e
|
|
Merged-In: I044b680871472a3c272f6264c4ef272df542112e
|
|
(cherry picked from commit d94b73b3041614a5ff57c7745f50f235bf6c7783)
|
|
Merged-In: I044b680871472a3c272f6264c4ef272df542112e
|
|
---
|
|
src/com/android/settings/DefaultRingtonePreference.java | 5 +++++
|
|
1 file changed, 5 insertions(+)
|
|
|
|
diff --git a/src/com/android/settings/DefaultRingtonePreference.java b/src/com/android/settings/DefaultRingtonePreference.java
|
|
index 3333016565..75c527fa31 100644
|
|
--- a/src/com/android/settings/DefaultRingtonePreference.java
|
|
+++ b/src/com/android/settings/DefaultRingtonePreference.java
|
|
@@ -44,6 +44,11 @@ public class DefaultRingtonePreference extends RingtonePreference {
|
|
|
|
@Override
|
|
protected void onSaveRingtone(Uri ringtoneUri) {
|
|
+ if (ringtoneUri == null) {
|
|
+ setActualDefaultRingtoneUri(ringtoneUri);
|
|
+ return;
|
|
+ }
|
|
+
|
|
String mimeType = getContext().getContentResolver().getType(ringtoneUri);
|
|
if (mimeType == null) {
|
|
Log.e(TAG, "onSaveRingtone for URI:" + ringtoneUri
|