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

Commit 0dccb269 authored by Wei Wang's avatar Wei Wang Committed by Android (Google) Code Review
Browse files

Merge "Expose a few system APIs for BLE scan only mode." into mnc-dev

parents 7f9ee015 5a685697
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;