Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ce1dee8f authored by Tsung-Mao Fang's avatar Tsung-Mao Fang Committed by Evelyn Torres
Browse files

Fix can't change notification sound for work profile.

Use correct user id context to query the type,
so we won't get empty result unexpectedly.

If we get the null result, then we won't set sound sucessfully.

Bug: 233580016
Bug: 221041256
Test: Manual test and set work profile sound works.
Change-Id: I7f8fb737a7c6f77a380f3f075a5c89a1970e39ad
Merged-In: I7f8fb737a7c6f77a380f3f075a5c89a1970e39ad
(cherry picked from commit edf44161)
Merged-In: I7f8fb737a7c6f77a380f3f075a5c89a1970e39ad
parent 5cd3122c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -49,7 +49,7 @@ public class DefaultRingtonePreference extends RingtonePreference {
            return;
        }

        String mimeType = getContext().getContentResolver().getType(ringtoneUri);
        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?)");