Merge "Always save message permission choice"
This commit is contained in:
committed by
Android (Google) Code Review
commit
029e9c5da2
@@ -199,20 +199,7 @@ public class BluetoothPermissionActivity extends AlertActivity implements
|
|||||||
|
|
||||||
private void onNegative() {
|
private void onNegative() {
|
||||||
if (DEBUG) Log.d(TAG, "onNegative");
|
if (DEBUG) Log.d(TAG, "onNegative");
|
||||||
|
sendReplyIntentToReceiver(false, true);
|
||||||
boolean always = true;
|
|
||||||
if (mRequestType == BluetoothDevice.REQUEST_TYPE_MESSAGE_ACCESS) {
|
|
||||||
LocalBluetoothManager bluetoothManager = Utils.getLocalBtManager(this);
|
|
||||||
CachedBluetoothDeviceManager cachedDeviceManager =
|
|
||||||
bluetoothManager.getCachedDeviceManager();
|
|
||||||
CachedBluetoothDevice cachedDevice = cachedDeviceManager.findDevice(mDevice);
|
|
||||||
if (cachedDevice == null) {
|
|
||||||
cachedDevice = cachedDeviceManager.addDevice(mDevice);
|
|
||||||
}
|
|
||||||
always = cachedDevice.checkAndIncreaseMessageRejectionCount();
|
|
||||||
}
|
|
||||||
|
|
||||||
sendReplyIntentToReceiver(false, always);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void sendReplyIntentToReceiver(final boolean allowed, final boolean always) {
|
private void sendReplyIntentToReceiver(final boolean allowed, final boolean always) {
|
||||||
|
|||||||
Reference in New Issue
Block a user