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

Commit f52fe22d authored by Jakub Pawlowski's avatar Jakub Pawlowski Committed by Gerrit Code Review
Browse files

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

parents 37f0e0b4 532a482f
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -128,10 +128,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);