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

Commit 3f7ef8ce authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 13256841 from 081fab13 to 25Q2-release

Change-Id: I36755cf3e7b0e6de77eb961c135989c6cca80050
parents 349febce 081fab13
Loading
Loading
Loading
Loading
+25 −0
Original line number Diff line number Diff line
<!--
    Copyright (C) 2025 The Android Open Source Project

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

         http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="24dp"
    android:height="24dp"
    android:viewportHeight="960"
    android:viewportWidth="960"
    android:tint="?android:attr/colorControlNormal">
    <path
        android:fillColor="@android:color/white"
        android:pathData="M160,800Q127,800 103.5,776.5Q80,753 80,720L80,240Q80,207 103.5,183.5Q127,160 160,160L800,160Q833,160 856.5,183.5Q880,207 880,240L880,720Q880,753 856.5,776.5Q833,800 800,800L160,800ZM260,600L306,600L306,360L270,360L200,410L224,446L260,420L260,600ZM384,600L540,600L540,560L446,560L444,558Q465,538 478.5,524Q492,510 500,502Q518,484 527,466Q536,448 536,428Q536,399 514,379.5Q492,360 458,360Q432,360 411,375Q390,390 382,414L422,430Q427,417 436.5,409.5Q446,402 458,402Q473,402 482.5,410Q492,418 492,430Q492,441 488,450.5Q484,460 470,474Q459,485 438,506Q417,527 384,560L384,600ZM680,600Q716,600 738,580Q760,560 760,528Q760,510 750,496Q740,482 722,474L722,472Q736,464 744,451.5Q752,439 752,422Q752,395 731,377.5Q710,360 678,360Q653,360 631.5,374.5Q610,389 604,410L644,426Q648,414 657,407Q666,400 678,400Q691,400 699.5,407.5Q708,415 708,426Q708,440 698,448Q688,456 672,456L654,456L654,496L674,496Q694,496 705,504Q716,512 716,526Q716,539 705,548.5Q694,558 680,558Q663,558 654,550.5Q645,543 638,524L598,540Q605,569 626.5,584.5Q648,600 680,600ZM160,720L800,720Q800,720 800,720Q800,720 800,720L800,240Q800,240 800,240Q800,240 800,240L160,240Q160,240 160,240Q160,240 160,240L160,720Q160,720 160,720Q160,720 160,720ZM160,720Q160,720 160,720Q160,720 160,720L160,240Q160,240 160,240Q160,240 160,240L160,240Q160,240 160,240Q160,240 160,240L160,720Q160,720 160,720Q160,720 160,720Z" />
</vector>
+12 −0
Original line number Diff line number Diff line
@@ -1358,6 +1358,10 @@
    <string name="lock_screen_pattern_skip_fingerprint_title">Skip setup for pattern and fingerprint?</string>
    <!-- Title of dialog shown when the user tries to skip setting up a pattern, warning them of potential consequences of not doing so [CHAR LIMIT=48]-->
    <string name="lock_screen_pattern_skip_biometrics_title">Skip setup for pattern, face, and fingerprint?</string>
    <!-- Accessibility action label for resuming animation -->
    <string name="resume_animation">Resume animation</string>
    <!-- Accessibility action label for pausing animation -->
    <string name="pause_animation">Pause animation</string>
    <!-- Button text to setup screen lock in onboard dialog [CHAR LIMIT=34] -->
    <string name="security_settings_fingerprint_enroll_setup_screen_lock">Set up screen lock</string>
@@ -5934,6 +5938,10 @@
    <string name="accessibility_hearing_device_pairing_page_title">Pair hearing device</string>
    <!-- Subtitle for the pair hearing device page. [CHAR LIMIT=NONE] -->
    <string name="accessibility_hearing_device_pairing_intro">You can pair ASHA and LE Audio hearing devices on this page. Make sure your hearing device is turned on and ready to pair.</string>
    <!-- Subtitle for the pair hearing device page. This string is for device that only supports ASHA hearing aids. [CHAR LIMIT=NONE] -->
    <string name="accessibility_hearing_device_pairing_asha_only_intro">You can pair ASHA hearing devices on this page. Make sure your hearing device is turned on and ready to pair.</string>
    <!-- Subtitle for the pair hearing device page. This string is for device that only supports LE Audio hearing aids. [CHAR LIMIT=NONE] -->
    <string name="accessibility_hearing_device_pairing_hap_only_intro">You can pair LE Audio hearing devices on this page. Make sure your hearing device is turned on and ready to pair.</string>
    <!-- Title for the preference category containing the list of the available hearing during and after bluetooth scanning devices. [CHAR LIMIT=30] -->
    <string name="accessibility_found_hearing_devices">Available hearing devices</string>
    <!-- Title for the preference category containing the all bluetooth devices during and after bluetooth scanning devices. Used when people can not find their hearing device in hearing device pairing list. [CHAR LIMIT=45] -->
@@ -12764,6 +12772,10 @@ Data usage charges may apply.</string>
    <string name="title_satellite_supported_app_list_entry">see all apps</string>
    <!-- Title for a page of apps list page with Satellite service supported.  [CHAR LIMIT=60] -->
    <string name="title_satellite_supported_app_list_page">Supported apps on your phone</string>
    <!-- Title for showing a dialog to notify user sim restriction.  [CHAR LIMIT=60] -->
    <string name="title_satellite_dialog_for_sim_restriction">Can\u2019t add a SIM</string>
    <!-- Description for showing a dialog to notify user sim restriction.  [CHAR LIMIT=NONE] -->
    <string name="description_satellite_dialog_for_sim_restriction">End the satellite connection before you add a SIM</string>
    <!-- Title for Apn settings in mobile network settings [CHAR LIMIT=60] -->
    <string name="mobile_network_apn_title">Access Point Names</string>
+3 −1
Original line number Diff line number Diff line
@@ -20,8 +20,10 @@
    android:title="@string/bluetooth_pairing_pref_title">

    <com.android.settingslib.widget.TopIntroPreference
        android:key="hearing_device_pairing_intro"
        settings:searchable="false"
        android:title="@string/accessibility_hearing_device_pairing_intro" />
        android:title="@string/accessibility_hearing_device_pairing_intro"
        settings:controller="com.android.settings.accessibility.HearingDevicePairingIntroPreferenceController"/>

    <com.android.settings.bluetooth.BluetoothProgressCategory
        android:key="available_hearing_devices"
+77 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2025 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.android.settings.accessibility;

import android.content.Context;

import androidx.annotation.NonNull;
import androidx.preference.Preference;
import androidx.preference.PreferenceScreen;

import com.android.settings.R;
import com.android.settings.core.BasePreferenceController;

import com.google.common.annotations.VisibleForTesting;

public class HearingDevicePairingIntroPreferenceController extends BasePreferenceController {
    private final HearingAidHelper mHelper;

    public HearingDevicePairingIntroPreferenceController(
            @NonNull Context context,
            @NonNull String preferenceKey) {
        super(context, preferenceKey);
        mHelper = new HearingAidHelper(context);
    }

    @VisibleForTesting
    public HearingDevicePairingIntroPreferenceController(
            @NonNull Context context,
            @NonNull String preferenceKey,
            @NonNull HearingAidHelper hearingAidHelper) {
        super(context, preferenceKey);
        mHelper = hearingAidHelper;
    }

    @Override
    public int getAvailabilityStatus() {
        return mHelper.isHearingAidSupported() ? AVAILABLE : UNSUPPORTED_ON_DEVICE;
    }

    @Override
    public void displayPreference(@NonNull PreferenceScreen screen) {
        super.displayPreference(screen);

        final Preference pairingIntroPreference = screen.findPreference(getPreferenceKey());
        final boolean isAshaProfileSupported = mHelper.isAshaProfileSupported();
        final boolean isHapClientProfileSupported = mHelper.isHapClientProfileSupported();
        if (isAshaProfileSupported && isHapClientProfileSupported) {
            pairingIntroPreference.setTitle(
                    mContext.getString(R.string.accessibility_hearing_device_pairing_intro));
        } else if (isAshaProfileSupported) {
            pairingIntroPreference.setTitle(
                    mContext.getString(
                            R.string.accessibility_hearing_device_pairing_asha_only_intro));
        } else if (isHapClientProfileSupported) {
            pairingIntroPreference.setTitle(
                    mContext.getString(
                            R.string.accessibility_hearing_device_pairing_hap_only_intro));
        } else {
            // Intentionally blank, getAvailabilityStatus() should handle visibility for
            // none-supported case.
        }
    }
}
+1 −1
Original line number Diff line number Diff line
@@ -73,7 +73,7 @@ public interface FingerprintFeatureProvider {
    default FingerprintExtPreferencesProvider getExtPreferenceProvider(
            @NonNull Context context
    ) {
        return new FingerprintExtPreferencesProvider();
        return new FingerprintExtPreferencesProvider(context);
    }

    /**
Loading