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

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

Issue 2706763002: bluetooth: Increase min api for Android (Closed)
Patch Set: Increase min API for other classes Created 3 years, 8 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 05f4483769eb197a514158640a3b69a6e38e2114..52f1991b480d5490aaf2d526f09ded3bd6849f44 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
@@ -23,7 +23,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";
@@ -108,7 +108,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