From 10b21a605b4ca2b3d5ed45edfaa6b5f5e753f09d Mon Sep 17 00:00:00 2001 From: Chienyuan Date: Thu, 6 Dec 2018 19:19:21 +0800 Subject: [PATCH] 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 --- .../bluetooth/BluetoothPermissionActivity.java | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/src/com/android/settings/bluetooth/BluetoothPermissionActivity.java b/src/com/android/settings/bluetooth/BluetoothPermissionActivity.java index de8902a8ffa..19339cd60ec 100644 --- a/src/com/android/settings/bluetooth/BluetoothPermissionActivity.java +++ b/src/com/android/settings/bluetooth/BluetoothPermissionActivity.java @@ -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) {