From 810c6d2117aeec7ca749e707b2e3a297eb8a265e Mon Sep 17 00:00:00 2001 From: Zongheng Wang Date: Thu, 5 Sep 2019 13:44:28 -0700 Subject: [PATCH] Set default phonebook access to ACCESS_REJECTED when user didn't choose one When there's no users' choice to tell us whether to share their phonebook information to the Bluetooth device, set the phonebook access permission to ACCESS_REJECTED. Bug: 138529441 Test: Manual test Change-Id: Iefabeb731b941f09fe1272ac7b7cd2feba75c8df --- .../settingslib/bluetooth/CachedBluetoothDevice.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java index 84f5a04c6c259..98db7c8fb59c4 100644 --- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java +++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java @@ -27,6 +27,7 @@ import android.content.SharedPreferences; import android.os.ParcelUuid; import android.os.SystemClock; import android.text.TextUtils; +import android.util.EventLog; import android.util.Log; import androidx.annotation.VisibleForTesting; @@ -799,10 +800,9 @@ public class CachedBluetoothDevice implements Comparable == BluetoothClass.Device.AUDIO_VIDEO_HANDSFREE || mDevice.getBluetoothClass().getDeviceClass() == BluetoothClass.Device.AUDIO_VIDEO_WEARABLE_HEADSET) { - mDevice.setPhonebookAccessPermission(BluetoothDevice.ACCESS_ALLOWED); - } else { - mDevice.setPhonebookAccessPermission(BluetoothDevice.ACCESS_REJECTED); + EventLog.writeEvent(0x534e4554, "138529441", -1, ""); } + mDevice.setPhonebookAccessPermission(BluetoothDevice.ACCESS_REJECTED); } } }