diff options
Diffstat (limited to 'framework/java/android')
-rw-r--r-- | framework/java/android/bluetooth/BluetoothHearingAid.java | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/framework/java/android/bluetooth/BluetoothHearingAid.java b/framework/java/android/bluetooth/BluetoothHearingAid.java index 4e66f1d18f..3fd011f956 100644 --- a/framework/java/android/bluetooth/BluetoothHearingAid.java +++ b/framework/java/android/bluetooth/BluetoothHearingAid.java @@ -673,6 +673,38 @@ public final class BluetoothHearingAid implements BluetoothProfile { return defaultValue; } + /** + * Get the side of the device. + * + * TODO(b/231901542): Used by internal only to improve hearing aids experience in short-term. + * Need to change to formal call in next bluetooth release. + * + * @param device Bluetooth device. + * @return SIDE_LEFT or SIDE_RIGHT + */ + @RequiresLegacyBluetoothPermission + @RequiresBluetoothConnectPermission + @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) + private int getDeviceSideInternal(BluetoothDevice device) { + return getDeviceSide(device); + } + + /** + * Get the mode of the device. + * + * TODO(b/231901542): Used by internal only to improve hearing aids experience in short-term. + * Need to change to formal call in next bluetooth release. + * + * @param device Bluetooth device + * @return MODE_MONAURAL or MODE_BINAURAL + */ + @RequiresLegacyBluetoothPermission + @RequiresBluetoothConnectPermission + @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) + private int getDeviceModeInternal(BluetoothDevice device) { + return getDeviceMode(device); + } + private boolean isEnabled() { if (mAdapter.getState() == BluetoothAdapter.STATE_ON) return true; return false; |