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

Commit 1180281d authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Framework: remove obsolete lint and fix remaining" into main

parents e19ccd24 e4b8109a
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -29,9 +29,3 @@ BroadcastBehavior: android.bluetooth.BluetoothDevice#ACTION_PAIRING_REQUEST:
    Field 'ACTION_PAIRING_REQUEST' is missing @BroadcastBehavior
BroadcastBehavior: android.bluetooth.BluetoothDevice#ACTION_UUID:
    Field 'ACTION_UUID' is missing @BroadcastBehavior


RequiresPermission: android.bluetooth.BluetoothAdapter#getAddress():
    Method 'getAddress' documentation mentions permissions without declaring @RequiresPermission
RequiresPermission: android.bluetooth.BluetoothDevice#setAlias(String):
    Method 'setAlias' documentation mentions permissions already declared by @RequiresPermission
+1 −1
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@ package android.bluetooth {
    method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public int isOptionalCodecsSupported(@NonNull android.bluetooth.BluetoothDevice);
    method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public void setAvrcpAbsoluteVolume(int);
    method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public boolean setBufferLengthMillis(int, int);
    method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public void setCodecConfigPreference(@NonNull android.bluetooth.BluetoothDevice, @NonNull android.bluetooth.BluetoothCodecConfig);
    method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}, conditional=true) public void setCodecConfigPreference(@NonNull android.bluetooth.BluetoothDevice, @NonNull android.bluetooth.BluetoothCodecConfig);
    method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public boolean setConnectionPolicy(@NonNull android.bluetooth.BluetoothDevice, int);
    method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public void setOptionalCodecsEnabled(@NonNull android.bluetooth.BluetoothDevice, int);
    field @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public static final String ACTION_ACTIVE_DEVICE_CHANGED = "android.bluetooth.a2dp.profile.action.ACTIVE_DEVICE_CHANGED";
+0 −28
Original line number Diff line number Diff line
@@ -43,31 +43,3 @@ BroadcastBehavior: android.bluetooth.BluetoothDevice#ACTION_SWITCH_BUFFER_SIZE:
    Field 'ACTION_SWITCH_BUFFER_SIZE' is missing @BroadcastBehavior
BroadcastBehavior: android.bluetooth.BluetoothDevice#ACTION_UUID:
    Field 'ACTION_UUID' is missing @BroadcastBehavior


RequiresPermission: android.bluetooth.BluetoothA2dp#setCodecConfigPreference(android.bluetooth.BluetoothDevice, android.bluetooth.BluetoothCodecConfig):
    Method 'setCodecConfigPreference' documentation mentions permissions already declared by @RequiresPermission
RequiresPermission: android.bluetooth.BluetoothAdapter#getAddress():
    Method 'getAddress' documentation mentions permissions without declaring @RequiresPermission
RequiresPermission: android.bluetooth.BluetoothDevice#setAlias(String):
    Method 'setAlias' documentation mentions permissions already declared by @RequiresPermission


UnflaggedApi: android.bluetooth.BluetoothHapClient#PRESET_INDEX_UNAVAILABLE:
    New API must be flagged with @FlaggedApi: field android.bluetooth.BluetoothHapClient.PRESET_INDEX_UNAVAILABLE
UnflaggedApi: android.bluetooth.BluetoothHapClient#getActivePresetIndex(android.bluetooth.BluetoothDevice):
    New API must be flagged with @FlaggedApi: method android.bluetooth.BluetoothHapClient.getActivePresetIndex(android.bluetooth.BluetoothDevice)
UnflaggedApi: android.bluetooth.BluetoothHapClient#getHapGroup(android.bluetooth.BluetoothDevice):
    New API must be flagged with @FlaggedApi: method android.bluetooth.BluetoothHapClient.getHapGroup(android.bluetooth.BluetoothDevice)
UnflaggedApi: android.bluetooth.BluetoothHapClient#getPresetInfo(android.bluetooth.BluetoothDevice, int):
    New API must be flagged with @FlaggedApi: method android.bluetooth.BluetoothHapClient.getPresetInfo(android.bluetooth.BluetoothDevice,int)
UnflaggedApi: android.bluetooth.BluetoothHapClient#switchToNextPreset(android.bluetooth.BluetoothDevice):
    New API must be flagged with @FlaggedApi: method android.bluetooth.BluetoothHapClient.switchToNextPreset(android.bluetooth.BluetoothDevice)
UnflaggedApi: android.bluetooth.BluetoothHapClient#switchToNextPresetForGroup(int):
    New API must be flagged with @FlaggedApi: method android.bluetooth.BluetoothHapClient.switchToNextPresetForGroup(int)
UnflaggedApi: android.bluetooth.BluetoothHapClient#switchToPreviousPreset(android.bluetooth.BluetoothDevice):
    New API must be flagged with @FlaggedApi: method android.bluetooth.BluetoothHapClient.switchToPreviousPreset(android.bluetooth.BluetoothDevice)
UnflaggedApi: android.bluetooth.BluetoothHapClient#switchToPreviousPresetForGroup(int):
    New API must be flagged with @FlaggedApi: method android.bluetooth.BluetoothHapClient.switchToPreviousPresetForGroup(int)
UnflaggedApi: android.bluetooth.BluetoothUuid#MFI_HAS:
    New API must be flagged with @FlaggedApi: field android.bluetooth.BluetoothUuid.MFI_HAS
+7 −6
Original line number Diff line number Diff line
@@ -757,8 +757,11 @@ public final class BluetoothA2dp implements BluetoothProfile {
    /**
     * Sets the codec configuration preference.
     *
     * <p>For apps without the {@link android.Manifest.permission.BLUETOOTH_PRIVILEGED} permission a
     * {@link android.companion.CompanionDeviceManager} association is required.
     * <p>This method requires the calling app to have the {@link
     * android.Manifest.permission#BLUETOOTH_CONNECT} permission. Additionally, an app must either
     * have the {@link android.Manifest.permission#BLUETOOTH_PRIVILEGED} or be associated with the
     * Companion Device manager (see {@link android.companion.CompanionDeviceManager#associate(
     * AssociationRequest, android.companion.CompanionDeviceManager.Callback, Handler)})
     *
     * @param device the remote Bluetooth device.
     * @param codecConfig the codec configuration preference
@@ -768,10 +771,8 @@ public final class BluetoothA2dp implements BluetoothProfile {
    @RequiresLegacyBluetoothPermission
    @RequiresBluetoothConnectPermission
    @RequiresPermission(
            allOf = {
                BLUETOOTH_CONNECT,
                BLUETOOTH_PRIVILEGED,
            })
            allOf = {BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED},
            conditional = true)
    public void setCodecConfigPreference(
            @NonNull BluetoothDevice device, @NonNull BluetoothCodecConfig codecConfig) {
        if (DBG) Log.d(TAG, "setCodecConfigPreference(" + device + ")");
+5 −6
Original line number Diff line number Diff line
@@ -1715,12 +1715,11 @@ public final class BluetoothDevice implements Parcelable, Attributable {
     * overwrites the previously stored alias. The new alias is saved in local storage so that the
     * change is preserved over power cycles.
     *
     * <p>This method requires the calling app to be associated with Companion Device Manager (see
     * {@link android.companion.CompanionDeviceManager#associate(AssociationRequest,
     * android.companion.CompanionDeviceManager.Callback, Handler)}) and have the {@link
     * android.Manifest.permission#BLUETOOTH_CONNECT} permission. Alternatively, if the caller has
     * the {@link android.Manifest.permission#BLUETOOTH_PRIVILEGED} permission, they can bypass the
     * Companion Device Manager association requirement.
     * <p>This method requires the calling app to have the {@link
     * android.Manifest.permission#BLUETOOTH_CONNECT} permission. Additionally, an app must either
     * have the {@link android.Manifest.permission#BLUETOOTH_PRIVILEGED} or be associated with the
     * Companion Device manager (see {@link android.companion.CompanionDeviceManager#associate(
     * AssociationRequest, android.companion.CompanionDeviceManager.Callback, Handler)})
     *
     * @param alias is the new locally modifiable name for the remote Bluetooth device which must be
     *     the empty string. If null, we clear the alias.