Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5a685697 authored by Wei Wang's avatar Wei Wang
Browse files

Expose a few system APIs for BLE scan only mode.

Bug: 21562349
Change-Id: Ifc58efcf01edac5b4f9e5266adb966e7bc492209
parent 52c012b4
Loading
Loading
Loading
Loading
+15 −11
Original line number Diff line number Diff line
@@ -410,6 +410,7 @@ public final class BluetoothAdapter {
     * Broadcast Action: The Bluetooth adapter state has changed in LE only mode.
     * @hide
     */
    @SystemApi
    public static final String ACTION_BLE_STATE_CHANGED =
        "android.bluetooth.adapter.action.BLE_STATE_CHANGED";

@@ -620,6 +621,7 @@ public final class BluetoothAdapter {
     * @return true if the local Bluetooth LE adapter is turned on
     * @hide
     */
    @SystemApi
    public boolean isLeEnabled() {
       final int state = getLeState();
       if (state == BluetoothAdapter.STATE_ON) {
@@ -680,6 +682,7 @@ public final class BluetoothAdapter {
     *         immediate error
     * @hide
     */
    @SystemApi
    public boolean disableBLE() {
        if (!isBleScanAlwaysAvailable()) return false;

@@ -742,6 +745,7 @@ public final class BluetoothAdapter {
     *         immediate error
     * @hide
     */
    @SystemApi
    public boolean enableBLE() {
        if (!isBleScanAlwaysAvailable()) return false;