diff options
| author | Rahul Sabnis <rahulsabnis@google.com> | 2019-11-16 11:52:13 -0800 |
|---|---|---|
| committer | Rahul Sabnis <rahulsabnis@google.com> | 2019-11-16 11:52:13 -0800 |
| commit | 4d42daa9c2f6303729e55a97179c4ebce16dc9ee (patch) | |
| tree | cf576467cb24b51583f06c838165f62e1be41506 /framework/java/android/bluetooth/BluetoothDevice.java | |
| parent | d00637913fa8db7e49655d1bdf236ad8fd90ebb8 (diff) | |
Re-add getAliasName to fix build breakage
Bug: 144619887
Test: Manual
Change-Id: Ib4f3582a1c9cb8cbcb14fece6a3ab463b3400cea
Diffstat (limited to 'framework/java/android/bluetooth/BluetoothDevice.java')
| -rw-r--r-- | framework/java/android/bluetooth/BluetoothDevice.java | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/framework/java/android/bluetooth/BluetoothDevice.java b/framework/java/android/bluetooth/BluetoothDevice.java index 0be3eca823..19f42b6a4c 100644 --- a/framework/java/android/bluetooth/BluetoothDevice.java +++ b/framework/java/android/bluetooth/BluetoothDevice.java @@ -1095,6 +1095,24 @@ public final class BluetoothDevice implements Parcelable { } /** + * Get the Bluetooth alias of the remote device. + * If Alias is null, get the Bluetooth name instead. + * + * @return the Bluetooth alias, or null if no alias or there was a problem + * @hide + * @see #getAlias() + * @see #getName() + */ + @UnsupportedAppUsage(publicAlternatives = "Use {@link #getName()} instead.") + public String getAliasName() { + String name = getAlias(); + if (name == null) { + name = getName(); + } + return name; + } + + /** * Get the most recent identified battery level of this Bluetooth device * <p>Requires {@link android.Manifest.permission#BLUETOOTH} * |
