Always save message permission choice
For current design, message sharing option only display when mapPermisson != CachedBluetoothDevice.ACCESS_UNKNOWN. MAP permisson only saved when user reject requset twice or accept request, if user just reject once, permission will be ACCESS_UNKNOWN and message sharing option will not display. This patch remove the check of MessageRejectionCount and always save message permission choice. Bug: 120291728 Test: reject message access request and check device details page Change-Id: I071491d3c4134ed348e195f054b6557e397cdd6a
This commit is contained in:
@@ -199,20 +199,7 @@ public class BluetoothPermissionActivity extends AlertActivity implements
|
||||
|
||||
private void onNegative() {
|
||||
if (DEBUG) Log.d(TAG, "onNegative");
|
||||
|
||||
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);
|
||||
sendReplyIntentToReceiver(false, true);
|
||||
}
|
||||
|
||||
private void sendReplyIntentToReceiver(final boolean allowed, final boolean always) {
|
||||
|
Reference in New Issue
Block a user