diff options
author | Sanket Padawe <sanketpadawe@google.com> | 2015-11-12 23:53:25 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-11-12 23:53:25 +0000 |
commit | 5b6ad87630756751471f7224672328d955c8f2fb (patch) | |
tree | 2d410d6003b5945ba71cd57e716b5e963313f958 /packages/SettingsLib | |
parent | 37e78cf8f18523cda95926a85ae2b3678ffd7e5e (diff) | |
parent | 07533dbffff5551ad4c58852b5856f57d7da6801 (diff) | |
download | frameworks_base-5b6ad87630756751471f7224672328d955c8f2fb.zip frameworks_base-5b6ad87630756751471f7224672328d955c8f2fb.tar.gz frameworks_base-5b6ad87630756751471f7224672328d955c8f2fb.tar.bz2 |
Merge "Don't allow contact sharing by default for device not recognized as carkit." into mnc-dr-dev
Diffstat (limited to 'packages/SettingsLib')
-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); + } } } } |