Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e3680e21 authored by Alice Kuo's avatar Alice Kuo Committed by Automerger Merge Worker
Browse files

Show the multiple Mac address for the coordinated set am: 9f11a4cd am: f0b73dad

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

Change-Id: I65a4d227e8f92b155636d8aa51b4e5e83bac2b3d
parents 2135db2e f0b73dad
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1923,6 +1923,8 @@
    <string name="device_details_title">Device details</string>
    <!-- Title of the item to show device MAC address -->
    <string name="bluetooth_device_mac_address">Device\'s Bluetooth address: <xliff:g id="address">%1$s</xliff:g></string>
    <!-- Title of the items to show multuple devices MAC address [CHAR LIMIT=NONE]-->
    <string name="bluetooth_multuple_devices_mac_address">Device\'s Bluetooth address:\n<xliff:g id="address">%1$s</xliff:g></string>
    <!-- Bluetooth device details. The title of a confirmation dialog for unpairing a paired device. [CHAR LIMIT=60] -->
    <string name="bluetooth_unpair_dialog_title">Forget device?</string>
    <!-- Content Description for companion device app associations removal button [CHAR LIMIT=28]-->
+11 −1
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package com.android.settings.bluetooth;

import android.bluetooth.BluetoothCsipSetCoordinator;
import android.content.Context;

import androidx.preference.PreferenceFragmentCompat;
@@ -50,9 +51,18 @@ public class BluetoothDetailsMacAddressController extends BluetoothDetailsContro

    @Override
    protected void refresh() {
        if (mCachedDevice.getGroupId() != BluetoothCsipSetCoordinator.GROUP_ID_INVALID) {
            StringBuilder mTitle = new StringBuilder(mContext.getString(
                R.string.bluetooth_multuple_devices_mac_address, mCachedDevice.getAddress()));
            for (CachedBluetoothDevice member: mCachedDevice.getMemberDevice()) {
                mTitle.append("\n").append(member.getAddress());
            }
            mFooterPreference.setTitle(mTitle);
        } else {
            mFooterPreference.setTitle(mContext.getString(
                R.string.bluetooth_device_mac_address, mCachedDevice.getAddress()));
        }
    }

    @Override
    public String getPreferenceKey() {