Loading framework/java/android/bluetooth/BluetoothAdapter.java +2 −2 Original line number Diff line number Diff line Loading @@ -4243,14 +4243,14 @@ public final class BluetoothAdapter { IBluetooth.Stub.asInterface( mManagerService.registerAdapter(sManagerCallback)); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); throw e.rethrowFromSystemServer(); } } else { try { mManagerService.unregisterAdapter(sManagerCallback); sService = null; } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); throw e.rethrowFromSystemServer(); } } sServiceRegistered = wantRegistered; Loading framework/java/android/bluetooth/BluetoothCsipSetCoordinator.java +9 −9 Original line number Diff line number Diff line Loading @@ -294,7 +294,7 @@ public final class BluetoothCsipSetCoordinator implements BluetoothProfile, Auto final ParcelUuid ret = service.lockGroup(groupId, delegate, mAttributionSource); return ret == null ? null : ret.getUuid(); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable())); } } return null; Loading Loading @@ -323,7 +323,7 @@ public final class BluetoothCsipSetCoordinator implements BluetoothProfile, Auto service.unlockGroup(new ParcelUuid(lockUuid), mAttributionSource); return true; } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable())); } } return false; Loading @@ -350,7 +350,7 @@ public final class BluetoothCsipSetCoordinator implements BluetoothProfile, Auto try { return service.getGroupUuidMapByDevice(device, mAttributionSource); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable())); } } return new HashMap<>(); Loading @@ -375,7 +375,7 @@ public final class BluetoothCsipSetCoordinator implements BluetoothProfile, Auto try { return service.getAllGroupIds(uuid, mAttributionSource); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable())); } } return Collections.emptyList(); Loading @@ -395,7 +395,7 @@ public final class BluetoothCsipSetCoordinator implements BluetoothProfile, Auto try { return service.getConnectedDevices(mAttributionSource); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable())); } } return Collections.emptyList(); Loading @@ -416,7 +416,7 @@ public final class BluetoothCsipSetCoordinator implements BluetoothProfile, Auto try { return service.getDevicesMatchingConnectionStates(states, mAttributionSource); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable())); } } return Collections.emptyList(); Loading @@ -437,7 +437,7 @@ public final class BluetoothCsipSetCoordinator implements BluetoothProfile, Auto try { return service.getConnectionState(device, mAttributionSource); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable())); } } return BluetoothProfile.STATE_DISCONNECTED; Loading Loading @@ -472,7 +472,7 @@ public final class BluetoothCsipSetCoordinator implements BluetoothProfile, Auto try { return service.setConnectionPolicy(device, connectionPolicy, mAttributionSource); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable())); } } return false; Loading Loading @@ -501,7 +501,7 @@ public final class BluetoothCsipSetCoordinator implements BluetoothProfile, Auto try { return service.getConnectionPolicy(device, mAttributionSource); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable())); } } return BluetoothProfile.CONNECTION_POLICY_FORBIDDEN; Loading framework/java/android/bluetooth/BluetoothDevice.java +25 −125 Original line number Diff line number Diff line Loading @@ -280,11 +280,7 @@ public final class BluetoothDevice implements Parcelable, Attributable { */ @SuppressLint("ActionValue") @RequiresBluetoothConnectPermission @RequiresPermission( allOf = { BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED, }) @RequiresPermission(allOf = {BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED}) @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION) @SystemApi public static final String ACTION_SWITCH_BUFFER_SIZE = Loading @@ -308,11 +304,7 @@ public final class BluetoothDevice implements Parcelable, Attributable { */ @FlaggedApi(Flags.FLAG_KEY_MISSING_BROADCAST) @SuppressLint("ActionValue") @RequiresPermission( allOf = { BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED, }) @RequiresPermission(allOf = {BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED}) @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION) @SystemApi @BroadcastBehavior(includeBackground = true, protectedBroadcast = true) Loading Loading @@ -1590,11 +1582,7 @@ public final class BluetoothDevice implements Parcelable, Attributable { */ @SystemApi @RequiresBluetoothConnectPermission @RequiresPermission( allOf = { BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED, }) @RequiresPermission(allOf = {BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED}) public @Nullable String getIdentityAddress() { if (DBG) log("getIdentityAddress()"); final IBluetooth service = getService(); Loading Loading @@ -1743,7 +1731,6 @@ public final class BluetoothDevice implements Parcelable, Attributable { return service.setRemoteAlias(this, alias, mAttributionSource); } catch (RemoteException e) { Log.e(TAG, "", e); throw e.rethrowAsRuntimeException(); } } return BluetoothStatusCodes.ERROR_BLUETOOTH_NOT_ENABLED; Loading Loading @@ -2062,11 +2049,7 @@ public final class BluetoothDevice implements Parcelable, Attributable { * @hide */ @SystemApi @RequiresPermission( allOf = { BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED, }) @RequiresPermission(allOf = {BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED}) public boolean canBondWithoutDialog() { if (DBG) log("canBondWithoutDialog, device: " + this); final IBluetooth service = getService(); Loading @@ -2091,13 +2074,8 @@ public final class BluetoothDevice implements Parcelable, Attributable { * @hide */ @SystemApi @Nullable @RequiresPermission( allOf = { BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED, }) public String getPackageNameOfBondingApplication() { @RequiresPermission(allOf = {BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED}) public @Nullable String getPackageNameOfBondingApplication() { if (DBG) log("getPackageNameOfBondingApplication()"); final IBluetooth service = getService(); if (service == null || !isBluetoothEnabled()) { Loading Loading @@ -2140,12 +2118,7 @@ public final class BluetoothDevice implements Parcelable, Attributable { */ @SystemApi @RequiresBluetoothConnectPermission @RequiresPermission( allOf = { BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED, MODIFY_PHONE_STATE, }) @RequiresPermission(allOf = {BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED, MODIFY_PHONE_STATE}) public @ConnectionReturnValues int connect() { if (DBG) log("connect()"); if (!BluetoothAdapter.checkBluetoothAddress(getAddress())) { Loading @@ -2160,7 +2133,6 @@ public final class BluetoothDevice implements Parcelable, Attributable { return service.connectAllEnabledProfiles(this, mAttributionSource); } catch (RemoteException e) { Log.e(TAG, "", e); throw e.rethrowAsRuntimeException(); } } return BluetoothStatusCodes.ERROR_BLUETOOTH_NOT_ENABLED; Loading @@ -2183,11 +2155,7 @@ public final class BluetoothDevice implements Parcelable, Attributable { */ @SystemApi @RequiresBluetoothConnectPermission @RequiresPermission( allOf = { BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED, }) @RequiresPermission(allOf = {BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED}) public @ConnectionReturnValues int disconnect() { if (DBG) log("disconnect()"); if (!BluetoothAdapter.checkBluetoothAddress(getAddress())) { Loading @@ -2202,7 +2170,6 @@ public final class BluetoothDevice implements Parcelable, Attributable { return service.disconnectAllEnabledProfiles(this, mAttributionSource); } catch (RemoteException e) { Log.e(TAG, "", e); throw e.rethrowAsRuntimeException(); } } return BluetoothStatusCodes.ERROR_BLUETOOTH_NOT_ENABLED; Loading Loading @@ -2249,11 +2216,7 @@ public final class BluetoothDevice implements Parcelable, Attributable { * @hide */ @SystemApi @RequiresPermission( allOf = { BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED, }) @RequiresPermission(allOf = {BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED}) public int getConnectionHandle(@Transport int transport) { if (DBG) { log("getConnectionHandle()"); Loading Loading @@ -2404,10 +2367,7 @@ public final class BluetoothDevice implements Parcelable, Attributable { */ @SystemApi @RequiresPermission( allOf = { BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED, }, allOf = {BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED}, conditional = true) public boolean fetchUuidsWithSdp(@Transport int transport) { if (DBG) log("fetchUuidsWithSdp()"); Loading Loading @@ -2508,11 +2468,7 @@ public final class BluetoothDevice implements Parcelable, Attributable { * * @return true confirmation has been sent out false for error */ @RequiresPermission( allOf = { BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED, }) @RequiresPermission(allOf = {BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED}) public boolean setPairingConfirmation(boolean confirm) { if (DBG) log("setPairingConfirmation()"); final IBluetooth service = getService(); Loading Loading @@ -2585,11 +2541,7 @@ public final class BluetoothDevice implements Parcelable, Attributable { * @hide */ @SystemApi @RequiresPermission( allOf = { BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED, }) @RequiresPermission(allOf = {BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED}) public boolean setSilenceMode(boolean silence) { if (DBG) log("setSilenceMode()"); final IBluetooth service = getService(); Loading @@ -2613,11 +2565,7 @@ public final class BluetoothDevice implements Parcelable, Attributable { * @hide */ @SystemApi @RequiresPermission( allOf = { BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED, }) @RequiresPermission(allOf = {BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED}) public boolean isInSilenceMode() { if (DBG) log("isInSilenceMode()"); final IBluetooth service = getService(); Loading @@ -2642,11 +2590,7 @@ public final class BluetoothDevice implements Parcelable, Attributable { * @hide */ @SystemApi @RequiresPermission( allOf = { BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED, }) @RequiresPermission(allOf = {BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED}) public boolean setPhonebookAccessPermission(@AccessPermission int value) { if (DBG) log("setPhonebookAccessPermission()"); final IBluetooth service = getService(); Loading Loading @@ -2699,11 +2643,7 @@ public final class BluetoothDevice implements Parcelable, Attributable { * @hide */ @SystemApi @RequiresPermission( allOf = { BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED, }) @RequiresPermission(allOf = {BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED}) public boolean setMessageAccessPermission(@AccessPermission int value) { // Validates param value is one of the accepted constants if (value != ACCESS_ALLOWED && value != ACCESS_REJECTED && value != ACCESS_UNKNOWN) { Loading Loading @@ -2760,11 +2700,7 @@ public final class BluetoothDevice implements Parcelable, Attributable { * @hide */ @SystemApi @RequiresPermission( allOf = { BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED, }) @RequiresPermission(allOf = {BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED}) public boolean setSimAccessPermission(int value) { if (DBG) log("setSimAccessPermission()"); final IBluetooth service = getService(); Loading Loading @@ -3270,11 +3206,7 @@ public final class BluetoothDevice implements Parcelable, Attributable { * @hide */ @SystemApi @RequiresPermission( allOf = { BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED, }) @RequiresPermission(allOf = {BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED}) public boolean setMetadata(@MetadataKey int key, @NonNull byte[] value) { if (DBG) log("setMetadata()"); final IBluetooth service = getService(); Loading Loading @@ -3302,13 +3234,8 @@ public final class BluetoothDevice implements Parcelable, Attributable { * @hide */ @SystemApi @Nullable @RequiresPermission( allOf = { BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED, }) public byte[] getMetadata(@MetadataKey int key) { @RequiresPermission(allOf = {BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED}) public @Nullable byte[] getMetadata(@MetadataKey int key) { if (DBG) log("getMetadata()"); final IBluetooth service = getService(); if (service == null || !isBluetoothEnabled()) { Loading Loading @@ -3378,11 +3305,7 @@ public final class BluetoothDevice implements Parcelable, Attributable { */ @SystemApi @RequiresBluetoothConnectPermission @RequiresPermission( allOf = { BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED, }) @RequiresPermission(allOf = {BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED}) public @AudioPolicyRemoteSupport int isRequestAudioPolicyAsSinkSupported() { if (DBG) log("isRequestAudioPolicyAsSinkSupported()"); final IBluetooth service = getService(); Loading @@ -3394,7 +3317,6 @@ public final class BluetoothDevice implements Parcelable, Attributable { return service.isRequestAudioPolicyAsSinkSupported(this, mAttributionSource); } catch (RemoteException e) { Log.e(TAG, "", e); throw e.rethrowAsRuntimeException(); } } return BluetoothStatusCodes.FEATURE_NOT_CONFIGURED; Loading @@ -3417,11 +3339,7 @@ public final class BluetoothDevice implements Parcelable, Attributable { */ @SystemApi @RequiresBluetoothConnectPermission @RequiresPermission( allOf = { BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED, }) @RequiresPermission(allOf = {BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED}) public @AudioPolicyReturnValues int requestAudioPolicyAsSink( @NonNull BluetoothSinkAudioPolicy policies) { if (DBG) log("requestAudioPolicyAsSink"); Loading Loading @@ -3459,11 +3377,7 @@ public final class BluetoothDevice implements Parcelable, Attributable { */ @SystemApi @RequiresBluetoothConnectPermission @RequiresPermission( allOf = { BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED, }) @RequiresPermission(allOf = {BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED}) public @Nullable BluetoothSinkAudioPolicy getRequestedAudioPolicyAsSink() { if (DBG) log("getRequestedAudioPolicyAsSink"); final IBluetooth service = getService(); Loading @@ -3490,11 +3404,7 @@ public final class BluetoothDevice implements Parcelable, Attributable { */ @SystemApi @RequiresBluetoothConnectPermission @RequiresPermission( allOf = { BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED, }) @RequiresPermission(allOf = {BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED}) public boolean setLowLatencyAudioAllowed(boolean allowed) { if (DBG) log("setLowLatencyAudioAllowed(" + allowed + ")"); final IBluetooth service = getService(); Loading Loading @@ -3554,11 +3464,7 @@ public final class BluetoothDevice implements Parcelable, Attributable { @FlaggedApi(Flags.FLAG_METADATA_API_INACTIVE_AUDIO_DEVICE_UPON_CONNECTION) @SystemApi @RequiresBluetoothConnectPermission @RequiresPermission( allOf = { BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED, }) @RequiresPermission(allOf = {BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED}) public @SetActiveAudioDevicePolicyReturnValues int setActiveAudioDevicePolicy( @ActiveAudioDevicePolicy int activeAudioDevicePolicy) { if (DBG) log("setActiveAudioDevicePolicy(" + activeAudioDevicePolicy + ")"); Loading @@ -3576,7 +3482,6 @@ public final class BluetoothDevice implements Parcelable, Attributable { this, activeAudioDevicePolicy, mAttributionSource); } catch (RemoteException e) { Log.e(TAG, "", e); throw e.rethrowAsRuntimeException(); } } return BluetoothStatusCodes.ERROR_BLUETOOTH_NOT_ENABLED; Loading @@ -3591,11 +3496,7 @@ public final class BluetoothDevice implements Parcelable, Attributable { @FlaggedApi(Flags.FLAG_METADATA_API_INACTIVE_AUDIO_DEVICE_UPON_CONNECTION) @SystemApi @RequiresBluetoothConnectPermission @RequiresPermission( allOf = { BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED, }) @RequiresPermission(allOf = {BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED}) public @ActiveAudioDevicePolicy int getActiveAudioDevicePolicy() { if (DBG) log("getActiveAudioDevicePolicy"); final IBluetooth service = getService(); Loading @@ -3607,7 +3508,6 @@ public final class BluetoothDevice implements Parcelable, Attributable { return service.getActiveAudioDevicePolicy(this, mAttributionSource); } catch (RemoteException e) { Log.e(TAG, "", e); throw e.rethrowAsRuntimeException(); } } return ACTIVE_AUDIO_DEVICE_POLICY_DEFAULT; Loading framework/java/android/bluetooth/BluetoothHapClient.java +19 −19 Original line number Diff line number Diff line Loading @@ -589,7 +589,7 @@ public final class BluetoothHapClient implements BluetoothProfile, AutoCloseable try { return service.setConnectionPolicy(device, connectionPolicy, mAttributionSource); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable())); } } return false; Loading Loading @@ -617,7 +617,7 @@ public final class BluetoothHapClient implements BluetoothProfile, AutoCloseable try { return service.getConnectionPolicy(device, mAttributionSource); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable())); } } return BluetoothProfile.CONNECTION_POLICY_FORBIDDEN; Loading @@ -641,7 +641,7 @@ public final class BluetoothHapClient implements BluetoothProfile, AutoCloseable return Attributable.setAttributionSource( service.getConnectedDevices(mAttributionSource), mAttributionSource); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable())); } } return Collections.emptyList(); Loading @@ -667,7 +667,7 @@ public final class BluetoothHapClient implements BluetoothProfile, AutoCloseable service.getDevicesMatchingConnectionStates(states, mAttributionSource), mAttributionSource); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable())); } } return Collections.emptyList(); Loading @@ -691,7 +691,7 @@ public final class BluetoothHapClient implements BluetoothProfile, AutoCloseable try { return service.getConnectionState(device, mAttributionSource); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable())); } } return BluetoothProfile.STATE_DISCONNECTED; Loading Loading @@ -727,7 +727,7 @@ public final class BluetoothHapClient implements BluetoothProfile, AutoCloseable try { return service.getHapGroup(device, mAttributionSource); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable())); } } return BluetoothCsipSetCoordinator.GROUP_ID_INVALID; Loading @@ -752,7 +752,7 @@ public final class BluetoothHapClient implements BluetoothProfile, AutoCloseable try { return service.getActivePresetIndex(device, mAttributionSource); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable())); } } return PRESET_INDEX_UNAVAILABLE; Loading @@ -777,7 +777,7 @@ public final class BluetoothHapClient implements BluetoothProfile, AutoCloseable try { return service.getActivePresetInfo(device, mAttributionSource); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable())); } } Loading Loading @@ -806,7 +806,7 @@ public final class BluetoothHapClient implements BluetoothProfile, AutoCloseable try { service.selectPreset(device, presetIndex, mAttributionSource); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable())); } } } Loading Loading @@ -837,7 +837,7 @@ public final class BluetoothHapClient implements BluetoothProfile, AutoCloseable try { service.selectPresetForGroup(groupId, presetIndex, mAttributionSource); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable())); } } } Loading @@ -863,7 +863,7 @@ public final class BluetoothHapClient implements BluetoothProfile, AutoCloseable try { service.switchToNextPreset(device, mAttributionSource); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable())); } } } Loading Loading @@ -892,7 +892,7 @@ public final class BluetoothHapClient implements BluetoothProfile, AutoCloseable try { service.switchToNextPresetForGroup(groupId, mAttributionSource); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable())); } } } Loading @@ -918,7 +918,7 @@ public final class BluetoothHapClient implements BluetoothProfile, AutoCloseable try { service.switchToPreviousPreset(device, mAttributionSource); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable())); } } } Loading Loading @@ -947,7 +947,7 @@ public final class BluetoothHapClient implements BluetoothProfile, AutoCloseable try { service.switchToPreviousPresetForGroup(groupId, mAttributionSource); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable())); } } } Loading @@ -973,7 +973,7 @@ public final class BluetoothHapClient implements BluetoothProfile, AutoCloseable try { return service.getPresetInfo(device, presetIndex, mAttributionSource); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable())); } } return null; Loading @@ -997,7 +997,7 @@ public final class BluetoothHapClient implements BluetoothProfile, AutoCloseable try { return service.getAllPresetInfo(device, mAttributionSource); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable())); } } return Collections.emptyList(); Loading @@ -1020,7 +1020,7 @@ public final class BluetoothHapClient implements BluetoothProfile, AutoCloseable try { return service.getFeatures(device, mAttributionSource); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable())); } } return 0x00; Loading Loading @@ -1126,7 +1126,7 @@ public final class BluetoothHapClient implements BluetoothProfile, AutoCloseable try { service.setPresetName(device, presetIndex, name, mAttributionSource); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable())); } } } Loading Loading @@ -1157,7 +1157,7 @@ public final class BluetoothHapClient implements BluetoothProfile, AutoCloseable try { service.setPresetNameForGroup(groupId, presetIndex, name, mAttributionSource); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable())); } } } Loading framework/java/android/bluetooth/BluetoothHeadsetClient.java +8 −45 File changed.Preview size limit exceeded, changes collapsed. Show changes Loading
framework/java/android/bluetooth/BluetoothAdapter.java +2 −2 Original line number Diff line number Diff line Loading @@ -4243,14 +4243,14 @@ public final class BluetoothAdapter { IBluetooth.Stub.asInterface( mManagerService.registerAdapter(sManagerCallback)); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); throw e.rethrowFromSystemServer(); } } else { try { mManagerService.unregisterAdapter(sManagerCallback); sService = null; } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); throw e.rethrowFromSystemServer(); } } sServiceRegistered = wantRegistered; Loading
framework/java/android/bluetooth/BluetoothCsipSetCoordinator.java +9 −9 Original line number Diff line number Diff line Loading @@ -294,7 +294,7 @@ public final class BluetoothCsipSetCoordinator implements BluetoothProfile, Auto final ParcelUuid ret = service.lockGroup(groupId, delegate, mAttributionSource); return ret == null ? null : ret.getUuid(); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable())); } } return null; Loading Loading @@ -323,7 +323,7 @@ public final class BluetoothCsipSetCoordinator implements BluetoothProfile, Auto service.unlockGroup(new ParcelUuid(lockUuid), mAttributionSource); return true; } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable())); } } return false; Loading @@ -350,7 +350,7 @@ public final class BluetoothCsipSetCoordinator implements BluetoothProfile, Auto try { return service.getGroupUuidMapByDevice(device, mAttributionSource); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable())); } } return new HashMap<>(); Loading @@ -375,7 +375,7 @@ public final class BluetoothCsipSetCoordinator implements BluetoothProfile, Auto try { return service.getAllGroupIds(uuid, mAttributionSource); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable())); } } return Collections.emptyList(); Loading @@ -395,7 +395,7 @@ public final class BluetoothCsipSetCoordinator implements BluetoothProfile, Auto try { return service.getConnectedDevices(mAttributionSource); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable())); } } return Collections.emptyList(); Loading @@ -416,7 +416,7 @@ public final class BluetoothCsipSetCoordinator implements BluetoothProfile, Auto try { return service.getDevicesMatchingConnectionStates(states, mAttributionSource); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable())); } } return Collections.emptyList(); Loading @@ -437,7 +437,7 @@ public final class BluetoothCsipSetCoordinator implements BluetoothProfile, Auto try { return service.getConnectionState(device, mAttributionSource); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable())); } } return BluetoothProfile.STATE_DISCONNECTED; Loading Loading @@ -472,7 +472,7 @@ public final class BluetoothCsipSetCoordinator implements BluetoothProfile, Auto try { return service.setConnectionPolicy(device, connectionPolicy, mAttributionSource); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable())); } } return false; Loading Loading @@ -501,7 +501,7 @@ public final class BluetoothCsipSetCoordinator implements BluetoothProfile, Auto try { return service.getConnectionPolicy(device, mAttributionSource); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable())); } } return BluetoothProfile.CONNECTION_POLICY_FORBIDDEN; Loading
framework/java/android/bluetooth/BluetoothDevice.java +25 −125 Original line number Diff line number Diff line Loading @@ -280,11 +280,7 @@ public final class BluetoothDevice implements Parcelable, Attributable { */ @SuppressLint("ActionValue") @RequiresBluetoothConnectPermission @RequiresPermission( allOf = { BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED, }) @RequiresPermission(allOf = {BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED}) @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION) @SystemApi public static final String ACTION_SWITCH_BUFFER_SIZE = Loading @@ -308,11 +304,7 @@ public final class BluetoothDevice implements Parcelable, Attributable { */ @FlaggedApi(Flags.FLAG_KEY_MISSING_BROADCAST) @SuppressLint("ActionValue") @RequiresPermission( allOf = { BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED, }) @RequiresPermission(allOf = {BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED}) @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION) @SystemApi @BroadcastBehavior(includeBackground = true, protectedBroadcast = true) Loading Loading @@ -1590,11 +1582,7 @@ public final class BluetoothDevice implements Parcelable, Attributable { */ @SystemApi @RequiresBluetoothConnectPermission @RequiresPermission( allOf = { BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED, }) @RequiresPermission(allOf = {BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED}) public @Nullable String getIdentityAddress() { if (DBG) log("getIdentityAddress()"); final IBluetooth service = getService(); Loading Loading @@ -1743,7 +1731,6 @@ public final class BluetoothDevice implements Parcelable, Attributable { return service.setRemoteAlias(this, alias, mAttributionSource); } catch (RemoteException e) { Log.e(TAG, "", e); throw e.rethrowAsRuntimeException(); } } return BluetoothStatusCodes.ERROR_BLUETOOTH_NOT_ENABLED; Loading Loading @@ -2062,11 +2049,7 @@ public final class BluetoothDevice implements Parcelable, Attributable { * @hide */ @SystemApi @RequiresPermission( allOf = { BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED, }) @RequiresPermission(allOf = {BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED}) public boolean canBondWithoutDialog() { if (DBG) log("canBondWithoutDialog, device: " + this); final IBluetooth service = getService(); Loading @@ -2091,13 +2074,8 @@ public final class BluetoothDevice implements Parcelable, Attributable { * @hide */ @SystemApi @Nullable @RequiresPermission( allOf = { BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED, }) public String getPackageNameOfBondingApplication() { @RequiresPermission(allOf = {BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED}) public @Nullable String getPackageNameOfBondingApplication() { if (DBG) log("getPackageNameOfBondingApplication()"); final IBluetooth service = getService(); if (service == null || !isBluetoothEnabled()) { Loading Loading @@ -2140,12 +2118,7 @@ public final class BluetoothDevice implements Parcelable, Attributable { */ @SystemApi @RequiresBluetoothConnectPermission @RequiresPermission( allOf = { BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED, MODIFY_PHONE_STATE, }) @RequiresPermission(allOf = {BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED, MODIFY_PHONE_STATE}) public @ConnectionReturnValues int connect() { if (DBG) log("connect()"); if (!BluetoothAdapter.checkBluetoothAddress(getAddress())) { Loading @@ -2160,7 +2133,6 @@ public final class BluetoothDevice implements Parcelable, Attributable { return service.connectAllEnabledProfiles(this, mAttributionSource); } catch (RemoteException e) { Log.e(TAG, "", e); throw e.rethrowAsRuntimeException(); } } return BluetoothStatusCodes.ERROR_BLUETOOTH_NOT_ENABLED; Loading @@ -2183,11 +2155,7 @@ public final class BluetoothDevice implements Parcelable, Attributable { */ @SystemApi @RequiresBluetoothConnectPermission @RequiresPermission( allOf = { BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED, }) @RequiresPermission(allOf = {BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED}) public @ConnectionReturnValues int disconnect() { if (DBG) log("disconnect()"); if (!BluetoothAdapter.checkBluetoothAddress(getAddress())) { Loading @@ -2202,7 +2170,6 @@ public final class BluetoothDevice implements Parcelable, Attributable { return service.disconnectAllEnabledProfiles(this, mAttributionSource); } catch (RemoteException e) { Log.e(TAG, "", e); throw e.rethrowAsRuntimeException(); } } return BluetoothStatusCodes.ERROR_BLUETOOTH_NOT_ENABLED; Loading Loading @@ -2249,11 +2216,7 @@ public final class BluetoothDevice implements Parcelable, Attributable { * @hide */ @SystemApi @RequiresPermission( allOf = { BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED, }) @RequiresPermission(allOf = {BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED}) public int getConnectionHandle(@Transport int transport) { if (DBG) { log("getConnectionHandle()"); Loading Loading @@ -2404,10 +2367,7 @@ public final class BluetoothDevice implements Parcelable, Attributable { */ @SystemApi @RequiresPermission( allOf = { BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED, }, allOf = {BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED}, conditional = true) public boolean fetchUuidsWithSdp(@Transport int transport) { if (DBG) log("fetchUuidsWithSdp()"); Loading Loading @@ -2508,11 +2468,7 @@ public final class BluetoothDevice implements Parcelable, Attributable { * * @return true confirmation has been sent out false for error */ @RequiresPermission( allOf = { BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED, }) @RequiresPermission(allOf = {BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED}) public boolean setPairingConfirmation(boolean confirm) { if (DBG) log("setPairingConfirmation()"); final IBluetooth service = getService(); Loading Loading @@ -2585,11 +2541,7 @@ public final class BluetoothDevice implements Parcelable, Attributable { * @hide */ @SystemApi @RequiresPermission( allOf = { BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED, }) @RequiresPermission(allOf = {BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED}) public boolean setSilenceMode(boolean silence) { if (DBG) log("setSilenceMode()"); final IBluetooth service = getService(); Loading @@ -2613,11 +2565,7 @@ public final class BluetoothDevice implements Parcelable, Attributable { * @hide */ @SystemApi @RequiresPermission( allOf = { BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED, }) @RequiresPermission(allOf = {BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED}) public boolean isInSilenceMode() { if (DBG) log("isInSilenceMode()"); final IBluetooth service = getService(); Loading @@ -2642,11 +2590,7 @@ public final class BluetoothDevice implements Parcelable, Attributable { * @hide */ @SystemApi @RequiresPermission( allOf = { BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED, }) @RequiresPermission(allOf = {BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED}) public boolean setPhonebookAccessPermission(@AccessPermission int value) { if (DBG) log("setPhonebookAccessPermission()"); final IBluetooth service = getService(); Loading Loading @@ -2699,11 +2643,7 @@ public final class BluetoothDevice implements Parcelable, Attributable { * @hide */ @SystemApi @RequiresPermission( allOf = { BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED, }) @RequiresPermission(allOf = {BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED}) public boolean setMessageAccessPermission(@AccessPermission int value) { // Validates param value is one of the accepted constants if (value != ACCESS_ALLOWED && value != ACCESS_REJECTED && value != ACCESS_UNKNOWN) { Loading Loading @@ -2760,11 +2700,7 @@ public final class BluetoothDevice implements Parcelable, Attributable { * @hide */ @SystemApi @RequiresPermission( allOf = { BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED, }) @RequiresPermission(allOf = {BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED}) public boolean setSimAccessPermission(int value) { if (DBG) log("setSimAccessPermission()"); final IBluetooth service = getService(); Loading Loading @@ -3270,11 +3206,7 @@ public final class BluetoothDevice implements Parcelable, Attributable { * @hide */ @SystemApi @RequiresPermission( allOf = { BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED, }) @RequiresPermission(allOf = {BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED}) public boolean setMetadata(@MetadataKey int key, @NonNull byte[] value) { if (DBG) log("setMetadata()"); final IBluetooth service = getService(); Loading Loading @@ -3302,13 +3234,8 @@ public final class BluetoothDevice implements Parcelable, Attributable { * @hide */ @SystemApi @Nullable @RequiresPermission( allOf = { BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED, }) public byte[] getMetadata(@MetadataKey int key) { @RequiresPermission(allOf = {BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED}) public @Nullable byte[] getMetadata(@MetadataKey int key) { if (DBG) log("getMetadata()"); final IBluetooth service = getService(); if (service == null || !isBluetoothEnabled()) { Loading Loading @@ -3378,11 +3305,7 @@ public final class BluetoothDevice implements Parcelable, Attributable { */ @SystemApi @RequiresBluetoothConnectPermission @RequiresPermission( allOf = { BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED, }) @RequiresPermission(allOf = {BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED}) public @AudioPolicyRemoteSupport int isRequestAudioPolicyAsSinkSupported() { if (DBG) log("isRequestAudioPolicyAsSinkSupported()"); final IBluetooth service = getService(); Loading @@ -3394,7 +3317,6 @@ public final class BluetoothDevice implements Parcelable, Attributable { return service.isRequestAudioPolicyAsSinkSupported(this, mAttributionSource); } catch (RemoteException e) { Log.e(TAG, "", e); throw e.rethrowAsRuntimeException(); } } return BluetoothStatusCodes.FEATURE_NOT_CONFIGURED; Loading @@ -3417,11 +3339,7 @@ public final class BluetoothDevice implements Parcelable, Attributable { */ @SystemApi @RequiresBluetoothConnectPermission @RequiresPermission( allOf = { BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED, }) @RequiresPermission(allOf = {BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED}) public @AudioPolicyReturnValues int requestAudioPolicyAsSink( @NonNull BluetoothSinkAudioPolicy policies) { if (DBG) log("requestAudioPolicyAsSink"); Loading Loading @@ -3459,11 +3377,7 @@ public final class BluetoothDevice implements Parcelable, Attributable { */ @SystemApi @RequiresBluetoothConnectPermission @RequiresPermission( allOf = { BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED, }) @RequiresPermission(allOf = {BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED}) public @Nullable BluetoothSinkAudioPolicy getRequestedAudioPolicyAsSink() { if (DBG) log("getRequestedAudioPolicyAsSink"); final IBluetooth service = getService(); Loading @@ -3490,11 +3404,7 @@ public final class BluetoothDevice implements Parcelable, Attributable { */ @SystemApi @RequiresBluetoothConnectPermission @RequiresPermission( allOf = { BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED, }) @RequiresPermission(allOf = {BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED}) public boolean setLowLatencyAudioAllowed(boolean allowed) { if (DBG) log("setLowLatencyAudioAllowed(" + allowed + ")"); final IBluetooth service = getService(); Loading Loading @@ -3554,11 +3464,7 @@ public final class BluetoothDevice implements Parcelable, Attributable { @FlaggedApi(Flags.FLAG_METADATA_API_INACTIVE_AUDIO_DEVICE_UPON_CONNECTION) @SystemApi @RequiresBluetoothConnectPermission @RequiresPermission( allOf = { BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED, }) @RequiresPermission(allOf = {BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED}) public @SetActiveAudioDevicePolicyReturnValues int setActiveAudioDevicePolicy( @ActiveAudioDevicePolicy int activeAudioDevicePolicy) { if (DBG) log("setActiveAudioDevicePolicy(" + activeAudioDevicePolicy + ")"); Loading @@ -3576,7 +3482,6 @@ public final class BluetoothDevice implements Parcelable, Attributable { this, activeAudioDevicePolicy, mAttributionSource); } catch (RemoteException e) { Log.e(TAG, "", e); throw e.rethrowAsRuntimeException(); } } return BluetoothStatusCodes.ERROR_BLUETOOTH_NOT_ENABLED; Loading @@ -3591,11 +3496,7 @@ public final class BluetoothDevice implements Parcelable, Attributable { @FlaggedApi(Flags.FLAG_METADATA_API_INACTIVE_AUDIO_DEVICE_UPON_CONNECTION) @SystemApi @RequiresBluetoothConnectPermission @RequiresPermission( allOf = { BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED, }) @RequiresPermission(allOf = {BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED}) public @ActiveAudioDevicePolicy int getActiveAudioDevicePolicy() { if (DBG) log("getActiveAudioDevicePolicy"); final IBluetooth service = getService(); Loading @@ -3607,7 +3508,6 @@ public final class BluetoothDevice implements Parcelable, Attributable { return service.getActiveAudioDevicePolicy(this, mAttributionSource); } catch (RemoteException e) { Log.e(TAG, "", e); throw e.rethrowAsRuntimeException(); } } return ACTIVE_AUDIO_DEVICE_POLICY_DEFAULT; Loading
framework/java/android/bluetooth/BluetoothHapClient.java +19 −19 Original line number Diff line number Diff line Loading @@ -589,7 +589,7 @@ public final class BluetoothHapClient implements BluetoothProfile, AutoCloseable try { return service.setConnectionPolicy(device, connectionPolicy, mAttributionSource); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable())); } } return false; Loading Loading @@ -617,7 +617,7 @@ public final class BluetoothHapClient implements BluetoothProfile, AutoCloseable try { return service.getConnectionPolicy(device, mAttributionSource); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable())); } } return BluetoothProfile.CONNECTION_POLICY_FORBIDDEN; Loading @@ -641,7 +641,7 @@ public final class BluetoothHapClient implements BluetoothProfile, AutoCloseable return Attributable.setAttributionSource( service.getConnectedDevices(mAttributionSource), mAttributionSource); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable())); } } return Collections.emptyList(); Loading @@ -667,7 +667,7 @@ public final class BluetoothHapClient implements BluetoothProfile, AutoCloseable service.getDevicesMatchingConnectionStates(states, mAttributionSource), mAttributionSource); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable())); } } return Collections.emptyList(); Loading @@ -691,7 +691,7 @@ public final class BluetoothHapClient implements BluetoothProfile, AutoCloseable try { return service.getConnectionState(device, mAttributionSource); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable())); } } return BluetoothProfile.STATE_DISCONNECTED; Loading Loading @@ -727,7 +727,7 @@ public final class BluetoothHapClient implements BluetoothProfile, AutoCloseable try { return service.getHapGroup(device, mAttributionSource); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable())); } } return BluetoothCsipSetCoordinator.GROUP_ID_INVALID; Loading @@ -752,7 +752,7 @@ public final class BluetoothHapClient implements BluetoothProfile, AutoCloseable try { return service.getActivePresetIndex(device, mAttributionSource); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable())); } } return PRESET_INDEX_UNAVAILABLE; Loading @@ -777,7 +777,7 @@ public final class BluetoothHapClient implements BluetoothProfile, AutoCloseable try { return service.getActivePresetInfo(device, mAttributionSource); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable())); } } Loading Loading @@ -806,7 +806,7 @@ public final class BluetoothHapClient implements BluetoothProfile, AutoCloseable try { service.selectPreset(device, presetIndex, mAttributionSource); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable())); } } } Loading Loading @@ -837,7 +837,7 @@ public final class BluetoothHapClient implements BluetoothProfile, AutoCloseable try { service.selectPresetForGroup(groupId, presetIndex, mAttributionSource); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable())); } } } Loading @@ -863,7 +863,7 @@ public final class BluetoothHapClient implements BluetoothProfile, AutoCloseable try { service.switchToNextPreset(device, mAttributionSource); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable())); } } } Loading Loading @@ -892,7 +892,7 @@ public final class BluetoothHapClient implements BluetoothProfile, AutoCloseable try { service.switchToNextPresetForGroup(groupId, mAttributionSource); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable())); } } } Loading @@ -918,7 +918,7 @@ public final class BluetoothHapClient implements BluetoothProfile, AutoCloseable try { service.switchToPreviousPreset(device, mAttributionSource); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable())); } } } Loading Loading @@ -947,7 +947,7 @@ public final class BluetoothHapClient implements BluetoothProfile, AutoCloseable try { service.switchToPreviousPresetForGroup(groupId, mAttributionSource); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable())); } } } Loading @@ -973,7 +973,7 @@ public final class BluetoothHapClient implements BluetoothProfile, AutoCloseable try { return service.getPresetInfo(device, presetIndex, mAttributionSource); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable())); } } return null; Loading @@ -997,7 +997,7 @@ public final class BluetoothHapClient implements BluetoothProfile, AutoCloseable try { return service.getAllPresetInfo(device, mAttributionSource); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable())); } } return Collections.emptyList(); Loading @@ -1020,7 +1020,7 @@ public final class BluetoothHapClient implements BluetoothProfile, AutoCloseable try { return service.getFeatures(device, mAttributionSource); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable())); } } return 0x00; Loading Loading @@ -1126,7 +1126,7 @@ public final class BluetoothHapClient implements BluetoothProfile, AutoCloseable try { service.setPresetName(device, presetIndex, name, mAttributionSource); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable())); } } } Loading Loading @@ -1157,7 +1157,7 @@ public final class BluetoothHapClient implements BluetoothProfile, AutoCloseable try { service.setPresetNameForGroup(groupId, presetIndex, name, mAttributionSource); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable())); } } } Loading
framework/java/android/bluetooth/BluetoothHeadsetClient.java +8 −45 File changed.Preview size limit exceeded, changes collapsed. Show changes