diff options
author | Sanket Padawe <sanketpadawe@google.com> | 2015-11-11 15:01:35 -0800 |
---|---|---|
committer | The Android Automerger <android-build@google.com> | 2015-12-01 17:41:35 -0800 |
commit | 463c543b770e47fd46e08178322866a5580ec297 (patch) | |
tree | 0a80f25390662cc0eaf6b569708bef2af9b3e16f | |
parent | 4d70bd7a928903b35c92619437c70bc382587b71 (diff) | |
download | frameworks_base-463c543b770e47fd46e08178322866a5580ec297.zip frameworks_base-463c543b770e47fd46e08178322866a5580ec297.tar.gz frameworks_base-463c543b770e47fd46e08178322866a5580ec297.tar.bz2 |
Don't allow contact sharing by default for device not recognized as carkit.
+ Don't allow contact sharing by default for devices not recognized
as carkit at pair time.
Bug: 23607427
Change-Id: If6babb10117ba7ee5008a4a29450a7cb981bea4a
-rw-r--r-- | packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java index e4b1ed8..d994841 100644 --- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java +++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java @@ -808,7 +808,12 @@ public final class CachedBluetoothDevice implements Comparable<CachedBluetoothDe // The pairing dialog now warns of phone-book access for paired devices. // No separate prompt is displayed after pairing. if (getPhonebookPermissionChoice() == CachedBluetoothDevice.ACCESS_UNKNOWN) { - setPhonebookPermissionChoice(CachedBluetoothDevice.ACCESS_ALLOWED); + if (mDevice.getBluetoothClass().getDeviceClass() + == BluetoothClass.Device.AUDIO_VIDEO_HANDSFREE) { + setPhonebookPermissionChoice(CachedBluetoothDevice.ACCESS_ALLOWED); + } else { + setPhonebookPermissionChoice(CachedBluetoothDevice.ACCESS_REJECTED); + } } } } |