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

Commit 3932a341 authored by jasonwshsu's avatar jasonwshsu
Browse files

Remove unused private API

Root Cause: We already change it to formal call in U-QPR, no need to access the workaround solution

Solution: Remove unused APIs getDevieSideInternal(), getDeviceModeInternal()

Bug: 264478242
Test: m Bluetooth | to ensure no crash
Change-Id: I6e2a72de4169d9781468e0bea0cfca38da7cb4f8
parent 6f893001
Loading
Loading
Loading
Loading
+0 −32
Original line number Diff line number Diff line
@@ -931,38 +931,6 @@ public final class BluetoothHearingAid implements BluetoothProfile {
        return result;
    }

    /**
     * Get the side of the device.
     *
     * <p>TODO(b/231901542): Used by internal only to improve hearing aids experience in short-term.
     * Need to change to formal call in next bluetooth release.
     *
     * @param device Bluetooth device.
     * @return SIDE_LEFT or SIDE_RIGHT
     */
    @RequiresLegacyBluetoothPermission
    @RequiresBluetoothConnectPermission
    @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT)
    private int getDeviceSideInternal(BluetoothDevice device) {
        return getDeviceSide(device);
    }

    /**
     * Get the mode of the device.
     *
     * <p>TODO(b/231901542): Used by internal only to improve hearing aids experience in short-term.
     * Need to change to formal call in next bluetooth release.
     *
     * @param device Bluetooth device
     * @return MODE_MONAURAL or MODE_BINAURAL
     */
    @RequiresLegacyBluetoothPermission
    @RequiresBluetoothConnectPermission
    @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT)
    private int getDeviceModeInternal(BluetoothDevice device) {
        return getDeviceMode(device);
    }

    private boolean isEnabled() {
        if (mAdapter.getState() == BluetoothAdapter.STATE_ON) return true;
        return false;