Merge "Re-add getAliasName to fix build breakage" am: e905264d3c am: f6231d08d1
am: d01af7b1b2

Change-Id: Ie577452177e364cde4e894f492b439988a6d214a
diff --git a/core/java/android/bluetooth/BluetoothDevice.java b/core/java/android/bluetooth/BluetoothDevice.java
index 0be3eca..19f42b6 100644
--- a/core/java/android/bluetooth/BluetoothDevice.java
+++ b/core/java/android/bluetooth/BluetoothDevice.java
@@ -1095,6 +1095,24 @@
     }
 
     /**
+     * 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}
      *