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

Commit 35010056 authored by Jack He's avatar Jack He Committed by Automerger Merge Worker
Browse files

Merge "hap: Fix missing null device checks" am: cfc4b2f5 am: 1374a0e0 am:...

Merge "hap: Fix missing null device checks" am: cfc4b2f5 am: 1374a0e0 am: 9701c928 am: 5182d84a

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Bluetooth/+/2054086



Change-Id: I6535723ff9ea56d839b93cc80faf6d3b350284a7
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents d9a1e649 5182d84a
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -644,6 +644,7 @@ public final class BluetoothHapClient implements BluetoothProfile, AutoCloseable
    public boolean setConnectionPolicy(@NonNull BluetoothDevice device,
    public boolean setConnectionPolicy(@NonNull BluetoothDevice device,
            @ConnectionPolicy int connectionPolicy) {
            @ConnectionPolicy int connectionPolicy) {
        if (DBG) log("setConnectionPolicy(" + device + ", " + connectionPolicy + ")");
        if (DBG) log("setConnectionPolicy(" + device + ", " + connectionPolicy + ")");
        Objects.requireNonNull(device, "BluetoothDevice cannot be null");
        final IBluetoothHapClient service = getService();
        final IBluetoothHapClient service = getService();
        final boolean defaultValue = false;
        final boolean defaultValue = false;
        if (service == null) {
        if (service == null) {
@@ -673,7 +674,8 @@ public final class BluetoothHapClient implements BluetoothProfile, AutoCloseable
     * {@link #CONNECTION_POLICY_UNKNOWN}
     * {@link #CONNECTION_POLICY_UNKNOWN}
     *
     *
     * @param device Bluetooth device
     * @param device Bluetooth device
     * @return connection policy of the device
     * @return connection policy of the device or {@link #CONNECTION_POLICY_FORBIDDEN} if device is
     *         null
     * @hide
     * @hide
     */
     */
    @SystemApi
    @SystemApi