Refactor usages of getAliasName to use getAlias in Settings

Bug: 142352567
Test: Manual
Change-Id: I40af1b1e0453900fd888317ae46b20ef359db473
diff --git a/src/com/android/settings/bluetooth/BluetoothPairingService.java b/src/com/android/settings/bluetooth/BluetoothPairingService.java
index 48e9eee..d93e57d 100644
--- a/src/com/android/settings/bluetooth/BluetoothPairingService.java
+++ b/src/com/android/settings/bluetooth/BluetoothPairingService.java
@@ -141,7 +141,7 @@
         String name = intent.getStringExtra(BluetoothDevice.EXTRA_NAME);
         if (TextUtils.isEmpty(name)) {
             BluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);
-            name = device != null ? device.getAliasName() : res.getString(android.R.string.unknownName);
+            name = device != null ? device.getAlias() : res.getString(android.R.string.unknownName);
         }
 
         Log.d(TAG, "Show pairing notification for " + mDevice.getAddress() + " (" + name + ")");
diff --git a/src/com/android/settings/bluetooth/Utils.java b/src/com/android/settings/bluetooth/Utils.java
index d6e395e..5e9ac3a 100755
--- a/src/com/android/settings/bluetooth/Utils.java
+++ b/src/com/android/settings/bluetooth/Utils.java
@@ -125,7 +125,7 @@
     }
 
     public static String createRemoteName(Context context, BluetoothDevice device) {
-        String mRemoteName = device != null ? device.getAliasName() : null;
+        String mRemoteName = device != null ? device.getAlias() : null;
 
         if (mRemoteName == null) {
             mRemoteName = context.getString(R.string.unknown);
diff --git a/src/com/android/settings/media/MediaOutputIndicatorSlice.java b/src/com/android/settings/media/MediaOutputIndicatorSlice.java
index 0ffa9ff..49eb271 100644
--- a/src/com/android/settings/media/MediaOutputIndicatorSlice.java
+++ b/src/com/android/settings/media/MediaOutputIndicatorSlice.java
@@ -149,14 +149,14 @@
         // Return Hearing Aid device name if it is active
         BluetoothDevice activeDevice = findActiveHearingAidDevice();
         if (activeDevice != null) {
-            return activeDevice.getAliasName();
+            return activeDevice.getAlias();
         }
         // Return A2DP device name if it is active
         final A2dpProfile a2dpProfile = mProfileManager.getA2dpProfile();
         if (a2dpProfile != null) {
             activeDevice = a2dpProfile.getActiveDevice();
             if (activeDevice != null) {
-                return activeDevice.getAliasName();
+                return activeDevice.getAlias();
             }
         }
         // No active device, return default summary
diff --git a/src/com/android/settings/sound/HandsFreeProfileOutputPreferenceController.java b/src/com/android/settings/sound/HandsFreeProfileOutputPreferenceController.java
index 9157477..d72f503 100644
--- a/src/com/android/settings/sound/HandsFreeProfileOutputPreferenceController.java
+++ b/src/com/android/settings/sound/HandsFreeProfileOutputPreferenceController.java
@@ -66,7 +66,7 @@
             final BluetoothDevice btDevice = mConnectedDevices.get(connectedDeviceIndex);
             mSelectedIndex = connectedDeviceIndex;
             setActiveBluetoothDevice(btDevice);
-            listPreference.setSummary(btDevice.getAliasName());
+            listPreference.setSummary(btDevice.getAlias());
         }
         return true;
     }
@@ -143,7 +143,7 @@
         mediaValues[mSelectedIndex] = defaultSummary;
         for (int i = 0, size = mConnectedDevices.size(); i < size; i++) {
             final BluetoothDevice btDevice = mConnectedDevices.get(i);
-            mediaOutputs[i] = btDevice.getAliasName();
+            mediaOutputs[i] = btDevice.getAlias();
             mediaValues[i] = btDevice.getAddress();
             if (btDevice.equals(activeDevice)) {
                 // select the active connected device.
diff --git a/src/com/android/settings/sound/MediaOutputPreferenceController.java b/src/com/android/settings/sound/MediaOutputPreferenceController.java
index 1831ad6..b133713 100644
--- a/src/com/android/settings/sound/MediaOutputPreferenceController.java
+++ b/src/com/android/settings/sound/MediaOutputPreferenceController.java
@@ -76,7 +76,7 @@
         mPreference.setVisible(deviceConnected);
         mPreference.setSummary((activeDevice == null) ?
                 mContext.getText(R.string.media_output_default_summary) :
-                activeDevice.getAliasName());
+                activeDevice.getAlias());
     }
 
     @Override