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

Commit 6d16eb3a authored by Jakub Pawlowski's avatar Jakub Pawlowski Committed by Automerger Merge Worker
Browse files

Merge "MCP: Do not reject requests immediately for unauthorized devices" am: f52fe22d

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

Change-Id: Icf785bd173460c2901060d2ba8e42c4ea41d536d
parents 580c589f f52fe22d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -129,10 +129,11 @@ public class McpService extends ProfileService {
    }

    public void onDeviceUnauthorized(BluetoothDevice device) {
        setDeviceAuthorized(device, false);
        Log.w(TAG, "onDeviceUnauthorized - authorization notification not implemented yet ");
    }

    public void setDeviceAuthorized(BluetoothDevice device, boolean isAuthorized) {
        Log.i(TAG, "setDeviceAuthorized(): device: " + device + ", isAuthorized: " + isAuthorized);
        int authorization = isAuthorized ? BluetoothDevice.ACCESS_ALLOWED
                : BluetoothDevice.ACCESS_REJECTED;
        mDeviceAuthorizations.put(device, authorization);