mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-12-24 15:09:34 -05:00
082bc48c32
https://review.lineageos.org/q/topic:P_asb_2022-05 https://review.lineageos.org/q/topic:P_asb_2022-06 https://review.lineageos.org/q/topic:P_asb_2022-07 https://review.lineageos.org/q/topic:P_asb_2022-08 https://review.lineageos.org/q/topic:P_asb_2022-09 https://review.lineageos.org/q/topic:P_asb_2022-10 https://review.lineageos.org/q/topic:P_asb_2022-11 https://review.lineageos.org/q/topic:P_asb_2022-12 https://review.lineageos.org/q/topic:P_asb_2023-01 https://review.lineageos.org/q/topic:P_asb_2023-02 https://review.lineageos.org/q/topic:P_asb_2023-03 https://review.lineageos.org/q/topic:P_asb_2023-04 https://review.lineageos.org/q/topic:P_asb_2023-05 https://review.lineageos.org/q/topic:P_asb_2023-06 https://review.lineageos.org/q/topic:P_asb_2023-07 accounted for via manifest change: https://review.lineageos.org/c/LineageOS/android_external_freetype/+/361250 https://review.lineageos.org/q/topic:P_asb_2023-08 accounted for via manifest change: https://review.lineageos.org/c/LineageOS/android_external_freetype/+/364606 accounted for via patches: https://review.lineageos.org/c/LineageOS/android_system_ca-certificates/+/365328 https://review.lineageos.org/q/topic:P_asb_2023-09 https://review.lineageos.org/q/topic:P_asb_2023-10 https://review.lineageos.org/q/topic:P_asb_2023-11 accounted for via patches: https://review.lineageos.org/c/LineageOS/android_system_ca-certificates/+/374916 https://review.lineageos.org/q/topic:P_asb_2023-12 https://review.lineageos.org/q/topic:P_asb_2024-01 https://review.lineageos.org/q/topic:P_asb_2024-02 https://review.lineageos.org/q/topic:P_asb_2024-03 https://review.lineageos.org/q/topic:P_asb_2024-04 Signed-off-by: Tavi <tavi@divested.dev>
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 751eb8c8e7c..226cde693b1 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
|