diff options
| author | 2015-11-12 23:58:48 +0000 | |
|---|---|---|
| committer | 2015-11-12 23:58:48 +0000 | |
| commit | 4f822bbf2a1c44c9dc5668857aa8cf7f0e5969cc (patch) | |
| tree | 6288dc549ceb1992b8ca9f99b5d07de7a33c1f34 | |
| parent | 516ac154e16324d178fc1343293c4b1d5447ef2c (diff) | |
| parent | 5b6ad87630756751471f7224672328d955c8f2fb (diff) | |
Merge "Don\'t allow contact sharing by default for device not recognized as carkit." into mnc-dr-dev
am: 5b6ad87630
* commit '5b6ad87630756751471f7224672328d955c8f2fb':
  Don't allow contact sharing by default for device not recognized as carkit.
| -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 e4b1ed8604ec..d994841d64f9 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); +                }              }          }      } |