BT keeps on asking me if I want to allow car to do stuff

We can remember it as a non persist global value when user click no.
This value won't be saved when power down.
We will restore the permission choice
when we are disconnected with the remote device.
So the "no" choice selected by user will only take effect
until we are disconnected with the remote device.

bug:11176511
Change-Id: Ic0c0829587cf7a812b5fa96fbd381921f67c186f
This commit is contained in:
Zhihai Xu
2013-10-11 12:15:19 -07:00
parent 6e96aff554
commit 9998639a65
2 changed files with 30 additions and 3 deletions

View File

@@ -197,7 +197,7 @@ public class BluetoothPermissionActivity extends AlertActivity implements
private void onNegative() {
if (DEBUG) Log.d(TAG, "onNegative");
savePermissionChoice(mRequestType, CachedBluetoothDevice.ACCESS_UNKNOWN);
savePermissionChoice(mRequestType, CachedBluetoothDevice.ACCESS_REJECTED);
sendIntentToReceiver(BluetoothDevice.ACTION_CONNECTION_ACCESS_REPLY, false,
null, false // dummy value, no effect since last param is null
);