summaryrefslogtreecommitdiff
path: root/framework/java/android/bluetooth/le/ScanSettings.java
diff options
context:
space:
mode:
authorJakub Pawlowski <jpawlowski@google.com>2017-04-12 08:51:22 -0700
committerJakub Pawlowski <jpawlowski@google.com>2017-04-12 10:57:03 -0700
commit9582b46a4b3b91c36295c9d771a9d5cc07fb10e8 (patch)
tree079c4b4b1416aeed49d0c90409cf39b76f1c9f6e /framework/java/android/bluetooth/le/ScanSettings.java
parent6acf2c8b4bee0aec004bc3dcf8643f4d9bb09a82 (diff)
Bluetooth 5 PHY simplification
Having PHY_LE_* constants defined in four different places, with one value being different than others is misleading. Leave just PHY_LE_* definitions in BluetoothDevice, and add PHY_LE*_MASK for the mask used in PHY update API. This patch also removes need to translate PHY value between PHY update request and event, as mask is used for request, and the value is returned in event. Bug: 30622771 Test: manual Change-Id: I897effa1204a024465d55501c83c542566c4d37c
Diffstat (limited to 'framework/java/android/bluetooth/le/ScanSettings.java')
-rw-r--r--framework/java/android/bluetooth/le/ScanSettings.java15
1 files changed, 3 insertions, 12 deletions
diff --git a/framework/java/android/bluetooth/le/ScanSettings.java b/framework/java/android/bluetooth/le/ScanSettings.java
index 69c9a8cece..36e48e9bd0 100644
--- a/framework/java/android/bluetooth/le/ScanSettings.java
+++ b/framework/java/android/bluetooth/le/ScanSettings.java
@@ -17,6 +17,7 @@
package android.bluetooth.le;
import android.annotation.SystemApi;
+import android.bluetooth.BluetoothDevice;
import android.os.Parcel;
import android.os.Parcelable;
@@ -123,16 +124,6 @@ public final class ScanSettings implements Parcelable {
public static final int SCAN_RESULT_TYPE_ABBREVIATED = 1;
/**
- * Use the Bluetooth LE 1Mbit PHY for scanning.
- */
- public static final int PHY_LE_1M = 1;
-
- /**
- * Use Bluetooth LE Coded PHY for scanning.
- */
- public static final int PHY_LE_CODED = 3;
-
- /**
* Use all supported PHYs for scanning.
* This will check the controller capabilities, and start
* the scan on 1Mbit and LE Coded PHYs if supported, or on
@@ -412,8 +403,8 @@ public final class ScanSettings implements Parcelable {
* Selecting an unsupported phy will result in failure to start scan.
*
* @param phy Can be one of
- * {@link ScanSettings#PHY_LE_1M},
- * {@link ScanSettings#PHY_LE_CODED} or
+ * {@link BluetoothDevice#PHY_LE_1M},
+ * {@link BluetoothDevice#PHY_LE_CODED} or
* {@link ScanSettings#PHY_LE_ALL_SUPPORTED}
*/
public Builder setPhy(int phy) {