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

Commit 8f91ac3e authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge changes I094ba6be,Idbdd21a1,I03dfdc25,I40afabb0,I01e0ec91, ...

* changes:
  Update the LE audio device into the media device category
  Handle csip set member automatic pair in Setting
  Do not update the previously connected devices for the sub device
  Accept the pairing request automatically for the set member pairing
  Show the multiple Mac address for the coordinated set
  Add the pairing string for CSIP supported device
parents 6c553c0c 34878434
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -2290,6 +2290,7 @@
            android:exported="true">
            <intent-filter>
                <action android:name="android.bluetooth.device.action.PAIRING_REQUEST" />
                <action android:name="android.bluetooth.action.CSIS_SET_MEMBER_AVAILABLE"/>
            </intent-filter>
        </receiver>

+12 −0
Original line number Diff line number Diff line
@@ -65,6 +65,18 @@
            android:textAppearance="@*android:style/TextAppearance.DeviceDefault.Subhead"
            android:visibility="gone" />

        <TextView
            android:id="@+id/pairing_group_message"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="@dimen/bluetooth_dialog_padding"
            android:layout_marginEnd="@dimen/bluetooth_dialog_padding"
            android:layout_marginBottom="@dimen/bluetooth_dialog_padding"
            android:gravity="center_vertical"
            android:text="@string/bluetooth_paring_group_msg"
            android:textAppearance="@*android:style/TextAppearance.DeviceDefault.Body1"
            android:visibility="gone" />

        <CheckBox
            android:id="@+id/phonebook_sharing_message_confirm_pin"
            android:layout_width="wrap_content"
+5 −0
Original line number Diff line number Diff line
@@ -1832,6 +1832,9 @@
    <!-- Message for confirmation of passkey to complete pairing. [CHAR LIMIT=NONE] -->
    <string name="bluetooth_confirm_passkey_msg">To pair with:&lt;br>&lt;b><xliff:g id="device_name">%1$s</xliff:g>&lt;/b>&lt;br>&lt;br>Make sure it is showing this passkey:&lt;br>&lt;b><xliff:g id="passkey">%2$s</xliff:g>&lt;/b></string>
    <!-- Pairing dialog text to remind user the pairing including all of the devices in a coordinated set. [CHAR LIMIT=NONE] -->
    <string name="bluetooth_paring_group_msg">Confirm to pair with the coordinated set</string>
    <!-- Message when bluetooth incoming pairing request for (2.1 devices) dialog is showing -->
    <string name="bluetooth_incoming_pairing_msg">From:&lt;br>&lt;b><xliff:g id="device_name">%1$s</xliff:g>&lt;/b>&lt;br>&lt;br>Pair with this device?</string>
@@ -1909,6 +1912,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]-->
+3 −2
Original line number Diff line number Diff line
@@ -70,9 +70,10 @@ public class AvailableMediaBluetoothDeviceUpdater extends BluetoothDeviceUpdater
            if (DBG) {
                Log.d(TAG, "isFilterMatched() current audio profile : " + currentAudioProfile);
            }
            // If device is Hearing Aid, it is compatible with HFP and A2DP.
            // If device is Hearing Aid or LE Audio, it is compatible with HFP and A2DP.
            // It would show in Available Devices group.
            if (cachedDevice.isConnectedHearingAidDevice()) {
            if (cachedDevice.isConnectedHearingAidDevice()
                    || cachedDevice.isConnectedLeAudioDevice()) {
                return true;
            }
            // According to the current audio profile type,
+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() {
Loading