Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2905)

Unified Diff: device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothDevice.java

Issue 2706763002: bluetooth: Increase min api for Android (Closed)
Patch Set: bluetooth: Set min version to M Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothDevice.java
diff --git a/device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothDevice.java b/device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothDevice.java
index ebe9f07ecc17dd9bfd3766920daa0b82ac47fb17..3d1b4444db2eef1c0f101fdcb59b1850e849e8d4 100644
--- a/device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothDevice.java
+++ b/device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothDevice.java
@@ -24,7 +24,7 @@ import java.util.HashMap;
* Lifetime is controlled by device::BluetoothDeviceAndroid.
*/
@JNINamespace("device")
-@TargetApi(Build.VERSION_CODES.LOLLIPOP)
+@TargetApi(Build.VERSION_CODES.M)
final class ChromeBluetoothDevice {
private static final String TAG = "Bluetooth";
@@ -109,7 +109,9 @@ final class ChromeBluetoothDevice {
// autoConnect set to false as under experimentation using autoConnect failed to complete
// connections.
mBluetoothGatt =
- mDevice.connectGatt(context, false /* autoConnect */, mBluetoothGattCallbackImpl);
+ mDevice.connectGatt(context, false /* autoConnect */, mBluetoothGattCallbackImpl,
+ // Prefer LE for dual-mode devices due to lower energy consumption.
+ BluetoothDevice.TRANSPORT_LE);
}
// Implements BluetoothDeviceAndroid::DisconnectGatt.

Powered by Google App Engine
This is Rietveld 408576698