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.
This commit is contained in:
Sanket Padawe
2015-11-12 23:58:48 +00:00
committed by android-build-merger

View File

@@ -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);
}
}
}
}