summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZongheng Wang <wangzongheng@google.com>2019-09-05 13:44:28 -0700
committerandroid-build-team Robot <android-build-team-robot@google.com>2019-09-20 02:56:29 +0000
commita57034dfe0afd6d7e6877520fcaa1728e6be90a1 (patch)
tree70a727f9774f9161b66b78466b5ed6b2c8fe0051
parent1302073b4c9469fb088294819298f0800593780f (diff)
downloadandroid_frameworks_base-a57034dfe0afd6d7e6877520fcaa1728e6be90a1.tar.gz
android_frameworks_base-a57034dfe0afd6d7e6877520fcaa1728e6be90a1.tar.bz2
android_frameworks_base-a57034dfe0afd6d7e6877520fcaa1728e6be90a1.zip
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 Merged-In: Iefabeb731b941f09fe1272ac7b7cd2feba75c8df (cherry picked from commit 810c6d2117aeec7ca749e707b2e3a297eb8a265e) (cherry picked from commit efdcff245255575bcdb8adc65aef7ba9f8fd1725)
-rw-r--r--packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java6
1 files 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 9a95288a69a..8f164f1592d 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;
@@ -804,10 +805,9 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice>
== 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);
}
}
}