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

Commit 467a831a authored by Michael Wright's avatar Michael Wright Committed by Android (Google) Code Review
Browse files

Merge "Uncanonicalize URIs before comparing them." into pi-dev

parents aa028760 f38efd12
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package android.os;

import android.annotation.Nullable;
import android.content.ContentResolver;
import android.content.Context;
import android.hardware.vibrator.V1_0.EffectStrength;
import android.hardware.vibrator.V1_2.Effect;
@@ -275,7 +276,12 @@ public abstract class VibrationEffect implements Parcelable {
            if (uris[i] == null) {
                continue;
            }
            if (Uri.parse(uris[i]).equals(uri)) {
            ContentResolver cr = context.getContentResolver();
            Uri mappedUri = cr.uncanonicalize(Uri.parse(uris[i]));
            if (mappedUri == null) {
                continue;
            }
            if (mappedUri.equals(uri)) {
                return get(RINGTONES[i]);
            }
        }