Merge "[LE adudio] The condition of right location is wrong." am: 75869b5fef am: 285952a80e am: eefaf62ba7

Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2037423

Change-Id: I1a191387a358a40da753539284bba70d050a9bcd
diff --git a/src/com/android/settings/bluetooth/LeAudioBluetoothDetailsHeaderController.java b/src/com/android/settings/bluetooth/LeAudioBluetoothDetailsHeaderController.java
index 06cee85..7b74f77 100644
--- a/src/com/android/settings/bluetooth/LeAudioBluetoothDetailsHeaderController.java
+++ b/src/com/android/settings/bluetooth/LeAudioBluetoothDetailsHeaderController.java
@@ -275,11 +275,15 @@
                 return;
             }
             boolean isLeft = (deviceId & LEFT_DEVICE_ID) != 0;
-            boolean isRight = (deviceId & LEFT_DEVICE_ID) != 0;
+            boolean isRight = (deviceId & RIGHT_DEVICE_ID) != 0;
             boolean isLeftRight = isLeft && isRight;
             // The LE device updates the BatteryLayout
             if (isLeftRight) {
-                Log.d(TAG, "The device id is left+right. Do nothing.");
+                Log.d(TAG, "Show the legacy battery style if the device id is left+right.");
+                final TextView summary = mLayoutPreference.findViewById(R.id.entity_header_summary);
+                if (summary != null) {
+                    summary.setText(mCachedDevice.getConnectionSummary());
+                }
             } else if (isLeft) {
                 updateBatteryLayout(getBatteryTitleResource(LEFT_DEVICE_ID),
                         getBatterySummaryResource(LEFT_DEVICE_ID), cachedDevice.getBatteryLevel());