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

Commit d1da071b authored by Alex Dadukin's avatar Alex Dadukin Committed by Automerger Merge Worker
Browse files

Merge "Extend BluetoothRouteController interface with selectRoute method" into...

Merge "Extend BluetoothRouteController interface with selectRoute method" into udc-dev am: e6ad497d am: 05a0891b

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/21556501



Change-Id: I429a0ddaf56e9f526e47234eed3286392e6b9a02
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents a0af9696 05a0891b
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -142,6 +142,12 @@ class AudioPoliciesBluetoothRouteController implements BluetoothRouteController
        mContext.unregisterReceiver(mDeviceStateChangedReceiver);
    }

    @Override
    public boolean selectRoute(String deviceAddress) {
        // Temporary no-op.
        return false;
    }

    /**
     * Transfers to a given bluetooth route.
     * The dedicated BT device with the route would be activated.
+17 −0
Original line number Diff line number Diff line
@@ -68,6 +68,17 @@ import java.util.Objects;
     */
    void stop();


    /**
     * Selects the route with the given {@code deviceAddress}.
     *
     * @param deviceAddress The physical address of the device to select. May be null to unselect
     *                      the currently selected device.
     * @return Whether the selection succeeds. If the selection fails, the state of the instance
     * remains unaltered.
     */
    boolean selectRoute(@Nullable String deviceAddress);

    /**
     * Transfers Bluetooth output to the given route.
     *
@@ -144,6 +155,12 @@ import java.util.Objects;
            // no op
        }

        @Override
        public boolean selectRoute(String deviceAddress) {
            // no op
            return false;
        }

        @Override
        public void transferTo(String routeId) {
            // no op
+6 −0
Original line number Diff line number Diff line
@@ -132,6 +132,12 @@ class LegacyBluetoothRouteController implements BluetoothRouteController {
        mContext.unregisterReceiver(mDeviceStateChangedReceiver);
    }

    @Override
    public boolean selectRoute(String deviceAddress) {
        // No-op as the class decides if a route is selected based on Bluetooth events.
        return false;
    }

    /**
     * Transfers to a given bluetooth route.
     * The dedicated BT device with the route would be activated.