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

Commit edebddbc authored by Fyodor Kupolov's avatar Fyodor Kupolov
Browse files

Require ACCESS_COARSE_LOCATION for ACTION_FOUND broadcast

Receivers of ACTION_FOUND intent are now required to have
ACCESS_COARSE_LOCATION permission.

Bug: 21852542
Change-Id: Ia3bca7e9cd117536a3eb4f4d1fe405604b2ff40f
parent 0e178e61
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -313,11 +313,13 @@ final class RemoteDevices {
        Intent intent = new Intent(BluetoothDevice.ACTION_FOUND);
        intent.putExtra(BluetoothDevice.EXTRA_DEVICE, device);
        intent.putExtra(BluetoothDevice.EXTRA_CLASS,
                new BluetoothClass(Integer.valueOf(deviceProp.mBluetoothClass)));
                new BluetoothClass(deviceProp.mBluetoothClass));
        intent.putExtra(BluetoothDevice.EXTRA_RSSI, deviceProp.mRssi);
        intent.putExtra(BluetoothDevice.EXTRA_NAME, deviceProp.mName);

        mAdapterService.sendBroadcast(intent, mAdapterService.BLUETOOTH_PERM);
        mAdapterService.sendBroadcastMultiplePermissions(intent,
                new String[] {AdapterService.BLUETOOTH_PERM,
                        android.Manifest.permission.ACCESS_COARSE_LOCATION});
    }

    void aclStateChangeCallback(int status, byte[] address, int newState) {