Loading framework/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -95,6 +95,7 @@ java_sdk_library { javacflags: [ "-Xep:InlineMeSuggester:OFF", // The @InlineMe annotation is not available "-Xep:AndroidFrameworkBluetoothPermission:ERROR", "-Xep:AndroidFrameworkCompatChange:ERROR", "-Xep:AndroidFrameworkEfficientParcelable:ERROR", "-Xep:AndroidFrameworkEfficientStrings:ERROR", Loading framework/java/android/bluetooth/BluetoothA2dp.java +4 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import android.annotation.FlaggedApi; import android.annotation.IntDef; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.RequiresNoPermission; import android.annotation.RequiresPermission; import android.annotation.SdkConstant; import android.annotation.SdkConstant.SdkConstantType; Loading Loading @@ -287,12 +288,14 @@ public final class BluetoothA2dp implements BluetoothProfile { /** @hide */ @Override @RequiresNoPermission public void onServiceConnected(IBinder service) { mService = IBluetoothA2dp.Stub.asInterface(service); } /** @hide */ @Override @RequiresNoPermission public void onServiceDisconnected() { mService = null; } Loading @@ -303,6 +306,7 @@ public final class BluetoothA2dp implements BluetoothProfile { /** @hide */ @Override @RequiresNoPermission public BluetoothAdapter getAdapter() { return mAdapter; } Loading framework/java/android/bluetooth/BluetoothA2dpSink.java +4 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import static android.Manifest.permission.BLUETOOTH_CONNECT; import static android.Manifest.permission.BLUETOOTH_PRIVILEGED; import android.annotation.NonNull; import android.annotation.RequiresNoPermission; import android.annotation.RequiresPermission; import android.annotation.SdkConstant; import android.annotation.SdkConstant.SdkConstantType; Loading Loading @@ -94,12 +95,14 @@ public final class BluetoothA2dpSink implements BluetoothProfile { /** @hide */ @Override @RequiresNoPermission public void onServiceConnected(IBinder service) { mService = IBluetoothA2dpSink.Stub.asInterface(service); } /** @hide */ @Override @RequiresNoPermission public void onServiceDisconnected() { mService = null; } Loading @@ -110,6 +113,7 @@ public final class BluetoothA2dpSink implements BluetoothProfile { /** @hide */ @Override @RequiresNoPermission public BluetoothAdapter getAdapter() { return mAdapter; } Loading framework/java/android/bluetooth/BluetoothAdapter.java +36 −25 Original line number Diff line number Diff line Loading @@ -285,8 +285,7 @@ public final class BluetoothAdapter { */ @SystemApi @RequiresNoPermission @NonNull public static String nameForState(@InternalAdapterState int state) { public static @NonNull String nameForState(@InternalAdapterState int state) { switch (state) { case STATE_OFF: return "OFF"; Loading Loading @@ -1005,6 +1004,7 @@ public final class BluetoothAdapter { } @Override @RequiresNoPermission public void onBluetoothActivityEnergyInfoAvailable(BluetoothActivityEnergyInfo info) { Executor executor; OnBluetoothActivityEnergyInfoCallback callback; Loading Loading @@ -1033,6 +1033,7 @@ public final class BluetoothAdapter { } /** Framework only method that is called when the service can't be reached. */ @RequiresNoPermission public void onError(int errorCode) { Executor executor; OnBluetoothActivityEnergyInfoCallback callback; Loading Loading @@ -1325,11 +1326,8 @@ public final class BluetoothAdapter { * @hide */ @SystemApi @RequiresPermission( allOf = { BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED, }) @RequiresBluetoothConnectPermission @RequiresPermission(allOf = {BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED}) public @Nullable DistanceMeasurementManager getDistanceMeasurementManager() { if (!getLeAccess()) { return null; Loading Loading @@ -1846,6 +1844,7 @@ public final class BluetoothAdapter { * @hide */ @SystemApi @RequiresBluetoothConnectPermission @RequiresPermission(BLUETOOTH_CONNECT) public @NonNull List<ParcelUuid> getUuidsList() { List<ParcelUuid> defaultValue = new ArrayList<>(); Loading Loading @@ -2315,11 +2314,8 @@ public final class BluetoothAdapter { * @hide */ @SystemApi @RequiresPermission( allOf = { BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED, }) @RequiresBluetoothConnectPermission @RequiresPermission(allOf = {BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED}) public @NonNull List<BluetoothDevice> getActiveDevices(@ActiveDeviceProfile int profile) { if (profile != BluetoothProfile.HEADSET && profile != BluetoothProfile.A2DP Loading Loading @@ -2680,11 +2676,8 @@ public final class BluetoothAdapter { * @hide */ @SystemApi @RequiresPermission( allOf = { BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED, }) @RequiresBluetoothConnectPermission @RequiresPermission(allOf = {BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED}) public @LeFeatureReturnValues int isDistanceMeasurementSupported() { if (!getLeAccess()) { return BluetoothStatusCodes.ERROR_BLUETOOTH_NOT_ENABLED; Loading Loading @@ -2774,7 +2767,7 @@ public final class BluetoothAdapter { * @return true if there are hw entries available for matching beacons * @hide */ @RequiresBluetoothConnectPermission @RequiresBluetoothScanPermission @RequiresPermission(BLUETOOTH_SCAN) public boolean isHardwareTrackingFiltersAvailable() { if (!getLeAccess()) { Loading Loading @@ -3026,6 +3019,7 @@ public final class BluetoothAdapter { new IpcDataCache.QueryHandler<>() { @SuppressLint("AndroidFrameworkRequiresPermission") @Override @RequiresNoPermission public Integer apply( Pair<IBluetooth, Pair<AttributionSource, Integer>> pairQuery) { IBluetooth service = pairQuery.first; Loading Loading @@ -3650,6 +3644,7 @@ public final class BluetoothAdapter { * @hide */ @SuppressLint("AndroidFrameworkRequiresPermission") // Call control is not exposed to 3p app @RequiresNoPermission public void closeProfileProxy(@NonNull BluetoothProfile proxy) { if (proxy instanceof BluetoothGatt gatt) { gatt.close(); Loading Loading @@ -3701,6 +3696,7 @@ public final class BluetoothAdapter { private static final IBluetoothManagerCallback sManagerCallback = new IBluetoothManagerCallback.Stub() { @RequiresNoPermission public void onBluetoothServiceUp(IBinder bluetoothService) { if (DBG) { Log.d(TAG, "onBluetoothServiceUp: " + bluetoothService); Loading @@ -3722,6 +3718,7 @@ public final class BluetoothAdapter { } } @RequiresNoPermission public void onBluetoothServiceDown() { if (DBG) { Log.d(TAG, "onBluetoothServiceDown"); Loading @@ -3743,6 +3740,7 @@ public final class BluetoothAdapter { } } @RequiresNoPermission public void onBluetoothOn() { if (DBG) { Log.d(TAG, "onBluetoothOn"); Loading @@ -3763,6 +3761,7 @@ public final class BluetoothAdapter { } } @RequiresNoPermission public void onBluetoothOff() { if (DBG) { Log.d(TAG, "onBluetoothOff"); Loading @@ -3783,6 +3782,7 @@ public final class BluetoothAdapter { } } @RequiresNoPermission public void onBluetoothAdapterStateChange(int newState) { sAdapterState = newState; } Loading @@ -3791,6 +3791,7 @@ public final class BluetoothAdapter { private final IBluetoothManagerCallback mManagerCallback = new IBluetoothManagerCallback.Stub() { @SuppressLint("AndroidFrameworkRequiresPermission") // Internal callback @RequiresNoPermission public void onBluetoothServiceUp(@NonNull IBinder bluetoothService) { requireNonNull(bluetoothService, "bluetoothService cannot be null"); mServiceLock.writeLock().lock(); Loading Loading @@ -3829,6 +3830,7 @@ public final class BluetoothAdapter { } } @RequiresNoPermission public void onBluetoothServiceDown() { mServiceLock.writeLock().lock(); try { Loading @@ -3847,6 +3849,7 @@ public final class BluetoothAdapter { } } @RequiresNoPermission public void onBluetoothOn() { mMainHandler.post( () -> { Loading @@ -3868,6 +3871,7 @@ public final class BluetoothAdapter { }); } @RequiresNoPermission public void onBluetoothOff() { mMainHandler.post( () -> { Loading @@ -3880,6 +3884,7 @@ public final class BluetoothAdapter { }); } @RequiresNoPermission public void onBluetoothAdapterStateChange(int newState) { // Nothing to do, this is entirely handled by sManagerCallback. } Loading Loading @@ -4142,6 +4147,7 @@ public final class BluetoothAdapter { * * @hide */ @RequiresNoPermission public @Nullable IBluetoothGatt getBluetoothGatt() { mServiceLock.readLock().lock(); try { Loading @@ -4161,6 +4167,7 @@ public final class BluetoothAdapter { * * @hide */ @RequiresNoPermission public @Nullable IBluetoothScan getBluetoothScan() { mServiceLock.readLock().lock(); try { Loading Loading @@ -4687,6 +4694,7 @@ public final class BluetoothAdapter { private final IBluetoothConnectionCallback mBluetoothConnectionCallback = new IBluetoothConnectionCallback.Stub() { @Override @RequiresNoPermission public void onDeviceConnected(BluetoothDevice device) { Attributable.setAttributionSource(device, mAttributionSource); mBluetoothConnectionCallbackWrapper.forEach( Loading @@ -4694,6 +4702,7 @@ public final class BluetoothAdapter { } @Override @RequiresNoPermission public void onDeviceDisconnected(BluetoothDevice device, int hciReason) { Attributable.setAttributionSource(device, mAttributionSource); mBluetoothConnectionCallbackWrapper.forEach( Loading Loading @@ -4877,6 +4886,7 @@ public final class BluetoothAdapter { * @hide */ @SystemApi @RequiresBluetoothConnectPermission @RequiresPermission(allOf = {BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED}) @SetPreferredAudioProfilesReturnValues public int setPreferredAudioProfiles( Loading Loading @@ -4960,9 +4970,9 @@ public final class BluetoothAdapter { * @hide */ @SystemApi @RequiresBluetoothConnectPermission @RequiresPermission(allOf = {BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED}) @NonNull public Bundle getPreferredAudioProfiles(@NonNull BluetoothDevice device) { public @NonNull Bundle getPreferredAudioProfiles(@NonNull BluetoothDevice device) { if (DBG) Log.d(TAG, "getPreferredAudioProfiles(" + device + ")"); requireNonNull(device, "device cannot be null"); if (!BluetoothAdapter.checkBluetoothAddress(device.getAddress())) { Loading Loading @@ -5013,6 +5023,7 @@ public final class BluetoothAdapter { * @hide */ @SystemApi @RequiresBluetoothConnectPermission @RequiresPermission(allOf = {BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED}) @NotifyActiveDeviceChangeAppliedReturnValues public int notifyActiveDeviceChangeApplied(@NonNull BluetoothDevice device) { Loading Loading @@ -5042,6 +5053,7 @@ public final class BluetoothAdapter { private final IBluetoothPreferredAudioProfilesCallback mPreferredAudioProfilesChangedCallback = new IBluetoothPreferredAudioProfilesCallback.Stub() { @Override @RequiresNoPermission public void onPreferredAudioProfilesChanged( BluetoothDevice device, Bundle preferredAudioProfiles, int status) { mAudioProfilesCallbackWrapper.forEach( Loading Loading @@ -5191,10 +5203,9 @@ public final class BluetoothAdapter { private final IBluetoothQualityReportReadyCallback mBluetoothQualityReportReadyCallback = new IBluetoothQualityReportReadyCallback.Stub() { @Override @RequiresNoPermission public void onBluetoothQualityReportReady( BluetoothDevice device, BluetoothQualityReport report, int status) { BluetoothDevice device, BluetoothQualityReport report, int status) { mQualityCallbackWrapper.forEach( (cb) -> cb.onBluetoothQualityReportReady(device, report, status)); } Loading framework/java/android/bluetooth/BluetoothAvrcpController.java +4 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package android.bluetooth; import static android.Manifest.permission.BLUETOOTH_CONNECT; import android.annotation.RequiresNoPermission; import android.annotation.RequiresPermission; import android.annotation.SdkConstant; import android.annotation.SdkConstant.SdkConstantType; Loading Loading @@ -105,12 +106,14 @@ public final class BluetoothAvrcpController implements BluetoothProfile { /** @hide */ @Override @RequiresNoPermission public void onServiceConnected(IBinder service) { mService = IBluetoothAvrcpController.Stub.asInterface(service); } /** @hide */ @Override @RequiresNoPermission public void onServiceDisconnected() { mService = null; } Loading @@ -121,6 +124,7 @@ public final class BluetoothAvrcpController implements BluetoothProfile { /** @hide */ @Override @RequiresNoPermission public BluetoothAdapter getAdapter() { return mAdapter; } Loading Loading
framework/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -95,6 +95,7 @@ java_sdk_library { javacflags: [ "-Xep:InlineMeSuggester:OFF", // The @InlineMe annotation is not available "-Xep:AndroidFrameworkBluetoothPermission:ERROR", "-Xep:AndroidFrameworkCompatChange:ERROR", "-Xep:AndroidFrameworkEfficientParcelable:ERROR", "-Xep:AndroidFrameworkEfficientStrings:ERROR", Loading
framework/java/android/bluetooth/BluetoothA2dp.java +4 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import android.annotation.FlaggedApi; import android.annotation.IntDef; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.RequiresNoPermission; import android.annotation.RequiresPermission; import android.annotation.SdkConstant; import android.annotation.SdkConstant.SdkConstantType; Loading Loading @@ -287,12 +288,14 @@ public final class BluetoothA2dp implements BluetoothProfile { /** @hide */ @Override @RequiresNoPermission public void onServiceConnected(IBinder service) { mService = IBluetoothA2dp.Stub.asInterface(service); } /** @hide */ @Override @RequiresNoPermission public void onServiceDisconnected() { mService = null; } Loading @@ -303,6 +306,7 @@ public final class BluetoothA2dp implements BluetoothProfile { /** @hide */ @Override @RequiresNoPermission public BluetoothAdapter getAdapter() { return mAdapter; } Loading
framework/java/android/bluetooth/BluetoothA2dpSink.java +4 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import static android.Manifest.permission.BLUETOOTH_CONNECT; import static android.Manifest.permission.BLUETOOTH_PRIVILEGED; import android.annotation.NonNull; import android.annotation.RequiresNoPermission; import android.annotation.RequiresPermission; import android.annotation.SdkConstant; import android.annotation.SdkConstant.SdkConstantType; Loading Loading @@ -94,12 +95,14 @@ public final class BluetoothA2dpSink implements BluetoothProfile { /** @hide */ @Override @RequiresNoPermission public void onServiceConnected(IBinder service) { mService = IBluetoothA2dpSink.Stub.asInterface(service); } /** @hide */ @Override @RequiresNoPermission public void onServiceDisconnected() { mService = null; } Loading @@ -110,6 +113,7 @@ public final class BluetoothA2dpSink implements BluetoothProfile { /** @hide */ @Override @RequiresNoPermission public BluetoothAdapter getAdapter() { return mAdapter; } Loading
framework/java/android/bluetooth/BluetoothAdapter.java +36 −25 Original line number Diff line number Diff line Loading @@ -285,8 +285,7 @@ public final class BluetoothAdapter { */ @SystemApi @RequiresNoPermission @NonNull public static String nameForState(@InternalAdapterState int state) { public static @NonNull String nameForState(@InternalAdapterState int state) { switch (state) { case STATE_OFF: return "OFF"; Loading Loading @@ -1005,6 +1004,7 @@ public final class BluetoothAdapter { } @Override @RequiresNoPermission public void onBluetoothActivityEnergyInfoAvailable(BluetoothActivityEnergyInfo info) { Executor executor; OnBluetoothActivityEnergyInfoCallback callback; Loading Loading @@ -1033,6 +1033,7 @@ public final class BluetoothAdapter { } /** Framework only method that is called when the service can't be reached. */ @RequiresNoPermission public void onError(int errorCode) { Executor executor; OnBluetoothActivityEnergyInfoCallback callback; Loading Loading @@ -1325,11 +1326,8 @@ public final class BluetoothAdapter { * @hide */ @SystemApi @RequiresPermission( allOf = { BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED, }) @RequiresBluetoothConnectPermission @RequiresPermission(allOf = {BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED}) public @Nullable DistanceMeasurementManager getDistanceMeasurementManager() { if (!getLeAccess()) { return null; Loading Loading @@ -1846,6 +1844,7 @@ public final class BluetoothAdapter { * @hide */ @SystemApi @RequiresBluetoothConnectPermission @RequiresPermission(BLUETOOTH_CONNECT) public @NonNull List<ParcelUuid> getUuidsList() { List<ParcelUuid> defaultValue = new ArrayList<>(); Loading Loading @@ -2315,11 +2314,8 @@ public final class BluetoothAdapter { * @hide */ @SystemApi @RequiresPermission( allOf = { BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED, }) @RequiresBluetoothConnectPermission @RequiresPermission(allOf = {BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED}) public @NonNull List<BluetoothDevice> getActiveDevices(@ActiveDeviceProfile int profile) { if (profile != BluetoothProfile.HEADSET && profile != BluetoothProfile.A2DP Loading Loading @@ -2680,11 +2676,8 @@ public final class BluetoothAdapter { * @hide */ @SystemApi @RequiresPermission( allOf = { BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED, }) @RequiresBluetoothConnectPermission @RequiresPermission(allOf = {BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED}) public @LeFeatureReturnValues int isDistanceMeasurementSupported() { if (!getLeAccess()) { return BluetoothStatusCodes.ERROR_BLUETOOTH_NOT_ENABLED; Loading Loading @@ -2774,7 +2767,7 @@ public final class BluetoothAdapter { * @return true if there are hw entries available for matching beacons * @hide */ @RequiresBluetoothConnectPermission @RequiresBluetoothScanPermission @RequiresPermission(BLUETOOTH_SCAN) public boolean isHardwareTrackingFiltersAvailable() { if (!getLeAccess()) { Loading Loading @@ -3026,6 +3019,7 @@ public final class BluetoothAdapter { new IpcDataCache.QueryHandler<>() { @SuppressLint("AndroidFrameworkRequiresPermission") @Override @RequiresNoPermission public Integer apply( Pair<IBluetooth, Pair<AttributionSource, Integer>> pairQuery) { IBluetooth service = pairQuery.first; Loading Loading @@ -3650,6 +3644,7 @@ public final class BluetoothAdapter { * @hide */ @SuppressLint("AndroidFrameworkRequiresPermission") // Call control is not exposed to 3p app @RequiresNoPermission public void closeProfileProxy(@NonNull BluetoothProfile proxy) { if (proxy instanceof BluetoothGatt gatt) { gatt.close(); Loading Loading @@ -3701,6 +3696,7 @@ public final class BluetoothAdapter { private static final IBluetoothManagerCallback sManagerCallback = new IBluetoothManagerCallback.Stub() { @RequiresNoPermission public void onBluetoothServiceUp(IBinder bluetoothService) { if (DBG) { Log.d(TAG, "onBluetoothServiceUp: " + bluetoothService); Loading @@ -3722,6 +3718,7 @@ public final class BluetoothAdapter { } } @RequiresNoPermission public void onBluetoothServiceDown() { if (DBG) { Log.d(TAG, "onBluetoothServiceDown"); Loading @@ -3743,6 +3740,7 @@ public final class BluetoothAdapter { } } @RequiresNoPermission public void onBluetoothOn() { if (DBG) { Log.d(TAG, "onBluetoothOn"); Loading @@ -3763,6 +3761,7 @@ public final class BluetoothAdapter { } } @RequiresNoPermission public void onBluetoothOff() { if (DBG) { Log.d(TAG, "onBluetoothOff"); Loading @@ -3783,6 +3782,7 @@ public final class BluetoothAdapter { } } @RequiresNoPermission public void onBluetoothAdapterStateChange(int newState) { sAdapterState = newState; } Loading @@ -3791,6 +3791,7 @@ public final class BluetoothAdapter { private final IBluetoothManagerCallback mManagerCallback = new IBluetoothManagerCallback.Stub() { @SuppressLint("AndroidFrameworkRequiresPermission") // Internal callback @RequiresNoPermission public void onBluetoothServiceUp(@NonNull IBinder bluetoothService) { requireNonNull(bluetoothService, "bluetoothService cannot be null"); mServiceLock.writeLock().lock(); Loading Loading @@ -3829,6 +3830,7 @@ public final class BluetoothAdapter { } } @RequiresNoPermission public void onBluetoothServiceDown() { mServiceLock.writeLock().lock(); try { Loading @@ -3847,6 +3849,7 @@ public final class BluetoothAdapter { } } @RequiresNoPermission public void onBluetoothOn() { mMainHandler.post( () -> { Loading @@ -3868,6 +3871,7 @@ public final class BluetoothAdapter { }); } @RequiresNoPermission public void onBluetoothOff() { mMainHandler.post( () -> { Loading @@ -3880,6 +3884,7 @@ public final class BluetoothAdapter { }); } @RequiresNoPermission public void onBluetoothAdapterStateChange(int newState) { // Nothing to do, this is entirely handled by sManagerCallback. } Loading Loading @@ -4142,6 +4147,7 @@ public final class BluetoothAdapter { * * @hide */ @RequiresNoPermission public @Nullable IBluetoothGatt getBluetoothGatt() { mServiceLock.readLock().lock(); try { Loading @@ -4161,6 +4167,7 @@ public final class BluetoothAdapter { * * @hide */ @RequiresNoPermission public @Nullable IBluetoothScan getBluetoothScan() { mServiceLock.readLock().lock(); try { Loading Loading @@ -4687,6 +4694,7 @@ public final class BluetoothAdapter { private final IBluetoothConnectionCallback mBluetoothConnectionCallback = new IBluetoothConnectionCallback.Stub() { @Override @RequiresNoPermission public void onDeviceConnected(BluetoothDevice device) { Attributable.setAttributionSource(device, mAttributionSource); mBluetoothConnectionCallbackWrapper.forEach( Loading @@ -4694,6 +4702,7 @@ public final class BluetoothAdapter { } @Override @RequiresNoPermission public void onDeviceDisconnected(BluetoothDevice device, int hciReason) { Attributable.setAttributionSource(device, mAttributionSource); mBluetoothConnectionCallbackWrapper.forEach( Loading Loading @@ -4877,6 +4886,7 @@ public final class BluetoothAdapter { * @hide */ @SystemApi @RequiresBluetoothConnectPermission @RequiresPermission(allOf = {BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED}) @SetPreferredAudioProfilesReturnValues public int setPreferredAudioProfiles( Loading Loading @@ -4960,9 +4970,9 @@ public final class BluetoothAdapter { * @hide */ @SystemApi @RequiresBluetoothConnectPermission @RequiresPermission(allOf = {BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED}) @NonNull public Bundle getPreferredAudioProfiles(@NonNull BluetoothDevice device) { public @NonNull Bundle getPreferredAudioProfiles(@NonNull BluetoothDevice device) { if (DBG) Log.d(TAG, "getPreferredAudioProfiles(" + device + ")"); requireNonNull(device, "device cannot be null"); if (!BluetoothAdapter.checkBluetoothAddress(device.getAddress())) { Loading Loading @@ -5013,6 +5023,7 @@ public final class BluetoothAdapter { * @hide */ @SystemApi @RequiresBluetoothConnectPermission @RequiresPermission(allOf = {BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED}) @NotifyActiveDeviceChangeAppliedReturnValues public int notifyActiveDeviceChangeApplied(@NonNull BluetoothDevice device) { Loading Loading @@ -5042,6 +5053,7 @@ public final class BluetoothAdapter { private final IBluetoothPreferredAudioProfilesCallback mPreferredAudioProfilesChangedCallback = new IBluetoothPreferredAudioProfilesCallback.Stub() { @Override @RequiresNoPermission public void onPreferredAudioProfilesChanged( BluetoothDevice device, Bundle preferredAudioProfiles, int status) { mAudioProfilesCallbackWrapper.forEach( Loading Loading @@ -5191,10 +5203,9 @@ public final class BluetoothAdapter { private final IBluetoothQualityReportReadyCallback mBluetoothQualityReportReadyCallback = new IBluetoothQualityReportReadyCallback.Stub() { @Override @RequiresNoPermission public void onBluetoothQualityReportReady( BluetoothDevice device, BluetoothQualityReport report, int status) { BluetoothDevice device, BluetoothQualityReport report, int status) { mQualityCallbackWrapper.forEach( (cb) -> cb.onBluetoothQualityReportReady(device, report, status)); } Loading
framework/java/android/bluetooth/BluetoothAvrcpController.java +4 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package android.bluetooth; import static android.Manifest.permission.BLUETOOTH_CONNECT; import android.annotation.RequiresNoPermission; import android.annotation.RequiresPermission; import android.annotation.SdkConstant; import android.annotation.SdkConstant.SdkConstantType; Loading Loading @@ -105,12 +106,14 @@ public final class BluetoothAvrcpController implements BluetoothProfile { /** @hide */ @Override @RequiresNoPermission public void onServiceConnected(IBinder service) { mService = IBluetoothAvrcpController.Stub.asInterface(service); } /** @hide */ @Override @RequiresNoPermission public void onServiceDisconnected() { mService = null; } Loading @@ -121,6 +124,7 @@ public final class BluetoothAvrcpController implements BluetoothProfile { /** @hide */ @Override @RequiresNoPermission public BluetoothAdapter getAdapter() { return mAdapter; } Loading