diff options
| author | 2019-12-16 16:41:33 -0800 | |
|---|---|---|
| committer | 2019-12-16 16:41:33 -0800 | |
| commit | ea2e20c857ac4ddd55b623d6672a90a7e6963f62 (patch) | |
| tree | 11396db64628794f36736a1e91223af032986bfd | |
| parent | 41c13aa1231854252f8d79249fadacd043af919a (diff) | |
Remove unused BluetoothHearingAid APIs and usages
Bug: 143244535
Test: Manual
Change-Id: I8915ec755794b2c44412386de03c5fc0778d8ec7
| -rw-r--r-- | core/java/android/bluetooth/BluetoothHearingAid.java | 57 | ||||
| -rw-r--r-- | packages/SettingsLib/src/com/android/settingslib/bluetooth/HearingAidProfile.java | 21 |
2 files changed, 0 insertions, 78 deletions
diff --git a/core/java/android/bluetooth/BluetoothHearingAid.java b/core/java/android/bluetooth/BluetoothHearingAid.java index b4521c623ec2..a65162ad5d89 100644 --- a/core/java/android/bluetooth/BluetoothHearingAid.java +++ b/core/java/android/bluetooth/BluetoothHearingAid.java @@ -472,63 +472,6 @@ public final class BluetoothHearingAid implements BluetoothProfile { } /** - * Get the volume of the device. - * - * <p> The volume is between -128 dB (mute) to 0 dB. - * - * @return volume of the hearing aid device. - * @hide - */ - @RequiresPermission(Manifest.permission.BLUETOOTH) - public int getVolume() { - if (VDBG) { - log("getVolume()"); - } - final IBluetoothHearingAid service = getService(); - try { - if (service != null && isEnabled()) { - return service.getVolume(); - } - if (service == null) Log.w(TAG, "Proxy not attached to service"); - return 0; - } catch (RemoteException e) { - Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable())); - return 0; - } - } - - /** - * Tells remote device to adjust volume. Uses the following values: - * <ul> - * <li>{@link AudioManager#ADJUST_LOWER}</li> - * <li>{@link AudioManager#ADJUST_RAISE}</li> - * <li>{@link AudioManager#ADJUST_MUTE}</li> - * <li>{@link AudioManager#ADJUST_UNMUTE}</li> - * </ul> - * - * @param direction One of the supported adjust values. - * @hide - */ - @RequiresPermission(Manifest.permission.BLUETOOTH) - public void adjustVolume(int direction) { - if (DBG) log("adjustVolume(" + direction + ")"); - - final IBluetoothHearingAid service = getService(); - try { - if (service == null) { - Log.w(TAG, "Proxy not attached to service"); - return; - } - - if (!isEnabled()) return; - - service.adjustVolume(direction); - } catch (RemoteException e) { - Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable())); - } - } - - /** * Tells remote device to set an absolute volume. * * @param volume Absolute volume to be set on remote diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/HearingAidProfile.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/HearingAidProfile.java index 58655a2b930a..b4b55f363020 100644 --- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/HearingAidProfile.java +++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/HearingAidProfile.java @@ -203,13 +203,6 @@ public class HearingAidProfile implements LocalBluetoothProfile { } } - public int getVolume() { - if (mService == null) { - return 0; - } - return mService.getVolume(); - } - public void setVolume(int volume) { if (mService == null) { return; @@ -224,20 +217,6 @@ public class HearingAidProfile implements LocalBluetoothProfile { return mService.getHiSyncId(device); } - public int getDeviceSide(BluetoothDevice device) { - if (mService == null) { - return BluetoothHearingAid.SIDE_LEFT; - } - return mService.getDeviceSide(device); - } - - public int getDeviceMode(BluetoothDevice device) { - if (mService == null) { - return BluetoothHearingAid.MODE_MONAURAL; - } - return mService.getDeviceMode(device); - } - public String toString() { return NAME; } |