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

Commit dca61523 authored by Jaikumar Ganesh's avatar Jaikumar Ganesh
Browse files

Enforce permissions for Connection dialog intents.

Change-Id: I240985998b0d245aacb051e64b5fdaa335c9c06a
parent 00c1b603
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -243,7 +243,7 @@ public class BluetoothPbapService extends Service {
                    Intent timeoutIntent =
                    Intent timeoutIntent =
                        new Intent(BluetoothDevice.ACTION_CONNECTION_ACCESS_CANCEL);
                        new Intent(BluetoothDevice.ACTION_CONNECTION_ACCESS_CANCEL);
                    timeoutIntent.setClassName(ACCESS_AUTHORITY_PACKAGE, ACCESS_AUTHORITY_CLASS);
                    timeoutIntent.setClassName(ACCESS_AUTHORITY_PACKAGE, ACCESS_AUTHORITY_CLASS);
                    sendBroadcast(timeoutIntent);
                    sendBroadcast(timeoutIntent, BLUETOOTH_ADMIN_PERM);
                }
                }
                // Release all resources
                // Release all resources
                closeService();
                closeService();
@@ -545,7 +545,7 @@ public class BluetoothPbapService extends Service {
                        intent.putExtra(BluetoothDevice.EXTRA_PACKAGE_NAME, getPackageName());
                        intent.putExtra(BluetoothDevice.EXTRA_PACKAGE_NAME, getPackageName());
                        intent.putExtra(BluetoothDevice.EXTRA_CLASS_NAME,
                        intent.putExtra(BluetoothDevice.EXTRA_CLASS_NAME,
                                        BluetoothPbapReceiver.class.getName());
                                        BluetoothPbapReceiver.class.getName());
                        sendBroadcast(intent, BLUETOOTH_PERM);
                        sendBroadcast(intent, BLUETOOTH_ADMIN_PERM);
                        isWaitingAuthorization = true;
                        isWaitingAuthorization = true;


                        if (VERBOSE) Log.v(TAG, "waiting for authorization for connection from: "
                        if (VERBOSE) Log.v(TAG, "waiting for authorization for connection from: "