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

Commit 807fd1cf authored by Jakub Pawlowski's avatar Jakub Pawlowski
Browse files

Bluetooth: fix comments on Volume Control Profile review

Bug: 150670922
Test: compilation
Merged-In: I72b36b77aa97aa9501d13ecdfe0b9b7f49bcce2c
Change-Id: I72b36b77aa97aa9501d13ecdfe0b9b7f49bcce2c
(cherry picked from commit dc508912)
parent 276d1cec
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -214,7 +214,9 @@ public interface BluetoothProfile {
    /**
    /**
     * Volume Control profile
     * Volume Control profile
     *
     *
     * @hide
     */
     */
    @SystemApi
    int VOLUME_CONTROL = 23;
    int VOLUME_CONTROL = 23;


    /**
    /**
+0 −42
Original line number Original line Diff line number Diff line
@@ -113,7 +113,6 @@ public final class BluetoothVolumeControl implements BluetoothProfile, AutoClose
        close();
        close();
    }
    }


    /*package*/
    @RequiresPermission(Manifest.permission.BLUETOOTH_PRIVILEGED)
    @RequiresPermission(Manifest.permission.BLUETOOTH_PRIVILEGED)
    public void close() {
    public void close() {
        mProfileConnector.disconnect();
        mProfileConnector.disconnect();
@@ -230,27 +229,6 @@ public final class BluetoothVolumeControl implements BluetoothProfile, AutoClose
        }
        }
    }
    }


    /**
     * Set priority of the profile
     *
     * <p> The device should already be paired.
     * Priority can be one of {@link #PRIORITY_ON} or {@link #PRIORITY_OFF},
     *
     * @param device Paired bluetooth device
     * @param priority
     * @return true if priority is set, false on error
     * @hide
     */
    @RequiresBluetoothConnectPermission
    @RequiresPermission(allOf = {
            android.Manifest.permission.BLUETOOTH_CONNECT,
            android.Manifest.permission.BLUETOOTH_PRIVILEGED,
    })
    public boolean setPriority(BluetoothDevice device, int priority) {
        if (DBG) log("setPriority(" + device + ", " + priority + ")");
        return setConnectionPolicy(device, BluetoothAdapter.priorityToConnectionPolicy(priority));
    }

    /**
    /**
     * Set connection policy of the profile
     * Set connection policy of the profile
     *
     *
@@ -289,26 +267,6 @@ public final class BluetoothVolumeControl implements BluetoothProfile, AutoClose
        return false;
        return false;
    }
    }


    /**
     * Get the priority of the profile.
     *
     * <p> The priority can be any of:
     * {@link #PRIORITY_OFF}, {@link #PRIORITY_ON}, {@link #PRIORITY_UNDEFINED}
     *
     * @param device Bluetooth device
     * @return priority of the device
     * @hide
     */
    @RequiresBluetoothConnectPermission
    @RequiresPermission(allOf = {
            android.Manifest.permission.BLUETOOTH_CONNECT,
            android.Manifest.permission.BLUETOOTH_PRIVILEGED,
    })
    public int getPriority(BluetoothDevice device) {
        if (VDBG) log("getPriority(" + device + ")");
        return BluetoothAdapter.connectionPolicyToPriority(getConnectionPolicy(device));
    }

    /**
    /**
     * Get the connection policy of the profile.
     * Get the connection policy of the profile.
     *
     *