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

Commit 8c312386 authored by Brian Delwiche's avatar Brian Delwiche Committed by Cherrypicker Worker
Browse files

Fix OPP comparison

isBluetoothShareUri_correctlyCheckUri (under
com.android.bluetooth.opp.BluetoothOppUtilityTest) is failing
on null input due to an incorrect comparison in
isBluetoothShareUri.  Change the comparison to one which can
cope with null input.

Bug: 257190999
Test: atest: BluetoothOppUtilityTest
Tag: #security
Ignore-AOSP-First: Security
Change-Id: I61118f22577de7b975fb0df8dac8583e91f7b8c7
(cherry picked from commit c9b53b95)
Merged-In: I61118f22577de7b975fb0df8dac8583e91f7b8c7
parent 16f28028
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -64,6 +64,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Objects;
import java.util.concurrent.ConcurrentHashMap;

/**
@@ -84,7 +85,7 @@ public class BluetoothOppUtility {
                && !uri.getAuthority().equals(BluetoothShare.CONTENT_URI.getAuthority())) {
            EventLog.writeEvent(0x534e4554, "225880741", -1, "");
        }
        return uri.getAuthority().equals(BluetoothShare.CONTENT_URI.getAuthority());
        return Objects.equals(uri.getAuthority(), BluetoothShare.CONTENT_URI.getAuthority());
    }

    public static BluetoothOppTransferInfo queryRecord(Context context, Uri uri) {