mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-10-01 01:35:54 -04: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>
48 lines
2.0 KiB
Diff
48 lines
2.0 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Brian Delwiche <delwiche@google.com>
|
|
Date: Tue, 8 Nov 2022 23:32:46 +0000
|
|
Subject: [PATCH] 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: Ia6a08e7092c2084e1816b782317c13254e78719b
|
|
(cherry picked from commit 90dc6fcdcba6c0c2b0f9bdaad28457a81c9af4ba)
|
|
Merged-In: Ia6a08e7092c2084e1816b782317c13254e78719b
|
|
---
|
|
src/com/android/bluetooth/opp/BluetoothOppUtility.java | 5 +++--
|
|
1 file changed, 3 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/src/com/android/bluetooth/opp/BluetoothOppUtility.java b/src/com/android/bluetooth/opp/BluetoothOppUtility.java
|
|
index d6211d701..a002c1829 100644
|
|
--- a/src/com/android/bluetooth/opp/BluetoothOppUtility.java
|
|
+++ b/src/com/android/bluetooth/opp/BluetoothOppUtility.java
|
|
@@ -58,6 +58,7 @@ import java.math.RoundingMode;
|
|
import java.text.DecimalFormat;
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
+import java.util.Objects;
|
|
import java.util.concurrent.ConcurrentHashMap;
|
|
|
|
/**
|
|
@@ -73,10 +74,10 @@ public class BluetoothOppUtility {
|
|
|
|
public static boolean isBluetoothShareUri(Uri uri) {
|
|
if (uri.toString().startsWith(BluetoothShare.CONTENT_URI.toString())
|
|
- && !uri.getAuthority().equals(BluetoothShare.CONTENT_URI.getAuthority())) {
|
|
+ && !Objects.equals(uri.getAuthority(), 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) {
|