Merge "Add keyboard vibration settings" into main
diff --git a/aconfig/Android.bp b/aconfig/Android.bp
index 6daa90c..7b571e0 100644
--- a/aconfig/Android.bp
+++ b/aconfig/Android.bp
@@ -12,6 +12,7 @@
"settings_experience_flag_declarations.aconfig",
"settings_onboarding_experience_flag_declarations.aconfig",
"settings_telephony_flag_declarations.aconfig",
+ "settings_biometrics_integration_declarations.aconfig",
],
}
diff --git a/aconfig/settings_biometrics_integration_declarations.aconfig b/aconfig/settings_biometrics_integration_declarations.aconfig
new file mode 100644
index 0000000..529e126
--- /dev/null
+++ b/aconfig/settings_biometrics_integration_declarations.aconfig
@@ -0,0 +1,9 @@
+package: "com.android.settings.flags"
+
+flag {
+ name: "sfps_enroll_refinement"
+ namespace: "biometrics_integration"
+ description: "This flag controls whether the sfps pause enrollment feature should be enabled"
+ bug: "288155127"
+}
+
diff --git a/res/layout/fingerprint_v2_enroll_introduction.xml b/res/layout/fingerprint_v2_enroll_introduction.xml
index 2fd1f9c..cf39206 100644
--- a/res/layout/fingerprint_v2_enroll_introduction.xml
+++ b/res/layout/fingerprint_v2_enroll_introduction.xml
@@ -24,6 +24,7 @@
<LinearLayout
style="@style/SudContentFrame"
+ android:id="@+id/enroll_intro_content_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipChildren="false"
diff --git a/res/layout/preference_compose.xml b/res/layout/preference_compose.xml
new file mode 100644
index 0000000..14cb2d7
--- /dev/null
+++ b/res/layout/preference_compose.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (C) 2023 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.
+ -->
+
+<androidx.compose.ui.platform.ComposeView
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content" />
diff --git a/res/values-af/strings.xml b/res/values-af/strings.xml
index eff870c..2b027bb 100644
--- a/res/values-af/strings.xml
+++ b/res/values-af/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"Deaktiveer Bluetooth LE-oudio"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"Deaktiveer Bluetooth LE oudio-kenmerk as die toestel LE oudiohardewarevermoëns ondersteun."</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"Wys LE-oudiowisselaar in Toestelbesonderhede"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"Aktiveer Bluetooth LE-oudiotoelaatlys"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"Aktiveer Bluetooth LE-oudiotoelaatlyskenmerk."</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"Mediatoestelle"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"Oproeptoestelle"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"Ander toestelle"</string>
diff --git a/res/values-am/strings.xml b/res/values-am/strings.xml
index 883b6be..750adba 100644
--- a/res/values-am/strings.xml
+++ b/res/values-am/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"የብሉቱዝ LE ኦዲዮን ያሰናክሉ"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"መሣሪያው የLE ኦዲዮ ሃርድዌር ችሎታዎችን የሚደግፍ ከሆነ የብሉቱዝ ኦዲዮ ባህሪን ያሰናክላል።"</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"በመሣሪያ ዝርዝሮች ውስጥ LE ኦዲዮ መቀያየሪያን አሳይ"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"የብሉቱዝ LE ኦዲዮ የዝርዝር ፈቃድን አንቃ"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"የብሉቱዝ LE ኦዲዮ የዝርዝር ባህሪ ፈቃድን አንቃ።"</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"የማህደረ መረጃ መሣሪያዎች"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"ወደ መሣሪያዎች ደውል"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"ሌሎች መሣሪያዎች"</string>
diff --git a/res/values-ar/strings.xml b/res/values-ar/strings.xml
index 70463f6..dab75ff 100644
--- a/res/values-ar/strings.xml
+++ b/res/values-ar/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"إيقاف ميزة Bluetooth LE Audio"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"يؤدي هذا الخيار إلى إيقاف ميزة Bluetooth LE audio إذا كان الجهاز متوافقًا مع إمكانيات جهاز الصوت المنخفض الطاقة."</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"إظهار خيار تفعيل LE Audio أو إيقافه في تفاصيل الجهاز"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"تفعيل القائمة المسموح بها لتطبيق Bluetooth LE Audio"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"يسمح هذا الخيار بتفعيل ميزة القائمة المسموح بها لتطبيق Bluetooth LE Audio."</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"أجهزة الوسائط"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"أجهزة الاتصال"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"أجهزة أخرى"</string>
diff --git a/res/values-as/strings.xml b/res/values-as/strings.xml
index 82b078f..404dc38 100644
--- a/res/values-as/strings.xml
+++ b/res/values-as/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"ব্লুটুথ LE অডিঅ’ অক্ষম কৰক"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"ডিভাইচটোৱে LE অডিঅ’ হাৰ্ডৱেৰ ক্ষমতাসমূহ সমৰ্থন কৰিলে ই ব্লুটুথ LE অডিঅ’ সুবিধাসমূহ অক্ষম কৰে।"</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"ডিভাইচৰ সবিশেষত LE অডিঅ’ৰ ট’গল দেখুৱাওক"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"ব্লুটুথ LE অডিঅ’ অনুমতি দিয়া সূচীৰ সুবিধাটো অক্ষম কৰক"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"ব্লুটুথ LE অডিঅ’ অনুমতি দিয়া সূচীৰ সুবিধাটো অক্ষম কৰক।"</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"মিডিয়া ডিভাইচসমূহ"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"কল ডিভাইচসমূহ"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"অন্য ডিভাইচসমূহ"</string>
diff --git a/res/values-az/strings.xml b/res/values-az/strings.xml
index ad2aa9c..086f3a0 100644
--- a/res/values-az/strings.xml
+++ b/res/values-az/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"Bluetooth LE audionu deaktiv edin"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"Cihaz LE audio avadanlıq imkanlarını dəstəkləyirsə, Bluetooth LE audio funksiyasını deaktiv edir."</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"LE audio açarı görünsün: Cihaz detalları"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"Bluetooth LE audio icazə siyahısını aktivləşdirin"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"Bluetooth LE audio icazə siyahısı funksiyasını aktivləşdirin."</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"Media cihazları"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"Zəng cihazları"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"Digər cihazlar"</string>
diff --git a/res/values-b+sr+Latn/strings.xml b/res/values-b+sr+Latn/strings.xml
index c3c4fde..316c567 100644
--- a/res/values-b+sr+Latn/strings.xml
+++ b/res/values-b+sr+Latn/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"Onemogući Bluetooth LE audio"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"Onemogućava funkciju Bluetooth LE audio ako uređaj podržava mogućnosti LE audio hardvera."</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"LE Audio prekidač u detaljima o uređaju"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"Omogući Bluetooth LE Audio listu dozvola"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"Omogućava funkciju Bluetooth LE Audio listu dozvola."</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"Medijski uređaji"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"Uređaji za pozivanje"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"Drugi uređaji"</string>
diff --git a/res/values-be/strings.xml b/res/values-be/strings.xml
index 163254e..d91626c 100644
--- a/res/values-be/strings.xml
+++ b/res/values-be/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"Адключыць Bluetooth LE Audio"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"Адключае функцыю Bluetooth LE audio, калі прылада падтрымлівае апаратнае забеспячэнне LE audio."</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"Паказ пераключальніка LE audio у Звестках пра прыладу"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"Уключыць белы спіс Bluetooth LE Audio"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"Уключыць функцыю белага спіса Bluetooth LE Audio."</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"Носьбіты даных"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"Выклікаць прылады"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"Іншыя прылады"</string>
diff --git a/res/values-bg/strings.xml b/res/values-bg/strings.xml
index 596933c..e966043 100644
--- a/res/values-bg/strings.xml
+++ b/res/values-bg/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"Деактивиране на Bluetooth LE Audio"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"Деактивира Bluetooth LE Audio, ако устройството поддържа хардуер с възможност за LE Audio."</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"Показване на превключват. за LE Audio в подробн. за у-вото"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"Активиране на списъка с разрешени устройства за Bluetooth LE Audio"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"Служи за активиране на функцията за списък с разрешени устройства за Bluetooth LE Audio."</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"Мултимедийни устройства"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"Устройства за обаждания"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"Други устройства"</string>
diff --git a/res/values-bn/strings.xml b/res/values-bn/strings.xml
index 6d78341..152b4cd 100644
--- a/res/values-bn/strings.xml
+++ b/res/values-bn/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"ব্লুটুথ LE অডিও বন্ধ করুন"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"ডিভাইসে LE অডিও হার্ডওয়্যার কাজ করলে, ব্লুটুথ LE অডিও ফিচার বন্ধ করে।"</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"ডিভাইসের বিবরণে LE অডিও টগল দেখুন"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"ব্লুটুথ LE অডিও অনুমোদন করার তালিকা চালু করুন"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"ব্লুটুথ LE অডিও অনুমোদন করার তালিকা সংক্রান্ত ফিচার চালু করুন।"</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"মিডিয়া ডিভাইস"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"কল করার ডিভাইস"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"অন্যান্য ডিভাইস"</string>
diff --git a/res/values-bs/strings.xml b/res/values-bs/strings.xml
index c87d902..4f5a923 100644
--- a/res/values-bs/strings.xml
+++ b/res/values-bs/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"Onemogući Bluetooth LE Audio"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"Onemogućava funkciju Bluetooth LE Audio ako uređaj podržava mogućnosti hardvera za LE Audio."</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"Prikaži prekidač za LE Audio u Detalj. uređ."</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"Omogući listu dozvoljenih za Bluetooth LE Audio"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"Omogućite funkciju liste dozvoljenih za Bluetooth LE Audio."</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"Uređaji za medije"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"Uređaji za pozive"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"Drugi uređaji"</string>
diff --git a/res/values-ca/strings.xml b/res/values-ca/strings.xml
index 6ccb928..07fa138 100644
--- a/res/values-ca/strings.xml
+++ b/res/values-ca/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"Desactiva Bluetooth LE Audio"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"Desactiva la funció Bluetooth LE Audio si el dispositiu admet les funcions de maquinari d\'LE Audio."</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"Botó d\'LE Audio a Detalls del dispositiu"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"Activa la llista d\'accés permès per Bluetooth LE Audio"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"Activa la funció de llista d\'accés permès de Bluetooth LE Audio."</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"Dispositius multimèdia"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"Dispositius de trucada"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"Altres dispositius"</string>
diff --git a/res/values-cs/strings.xml b/res/values-cs/strings.xml
index f19a495..32278be 100644
--- a/res/values-cs/strings.xml
+++ b/res/values-cs/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"Deaktivovat Bluetooth LE audio"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"Vypne funkci zvuku přes Bluetooth LE, pokud zařízení podporuje hardwarové zvukové funkce LE."</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"Zobrazit přepínač LE Audio v Podrobnostech o zařízení"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"Zapnout seznam povolených zařízení Bluetooth LE Audio"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"Povolit funkci seznamu povolených zařízení Bluetooth LE Audio."</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"Mediální zařízení"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"Volání na zařízení"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"Ostatní zařízení"</string>
diff --git a/res/values-da/strings.xml b/res/values-da/strings.xml
index a59dc23..2ea7173 100644
--- a/res/values-da/strings.xml
+++ b/res/values-da/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"Deaktiver Bluetooth LE-lyd"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"Deaktiverer funktionen Bluetooth LE-lyd, hvis enheden understøtter denne LE-lyd til hardware."</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"Vis kontakten til LE-lyd i Enhedsoplysninger"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"Aktivér tilladelseslisten for Bluetooth LE-lyd"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"Aktivér funktionen for tilladelseslisten for Bluetooth LE-lyd"</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"Medieenheder"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"Opkaldsenheder"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"Andre enheder"</string>
diff --git a/res/values-de/strings.xml b/res/values-de/strings.xml
index ba95c11..534449f 100644
--- a/res/values-de/strings.xml
+++ b/res/values-de/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"Bluetooth LE Audio deaktivieren"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"Deaktiviert die Bluetooth LE Audio-Funktion, wenn das Gerät LE Audio-Hardwarefunktionen unterstützt."</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"Ein/Aus für LE Audio in Gerätedetails"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"Zulassungsliste für Bluetooth LE-Audio aktivieren"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"Aktiviert die Zulassungslistenfunktion für Bluetooth LE-Audio."</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"Mediengeräte"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"Anrufgeräte"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"Andere Geräte"</string>
diff --git a/res/values-el/strings.xml b/res/values-el/strings.xml
index f9fe088..04873df 100644
--- a/res/values-el/strings.xml
+++ b/res/values-el/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"Απενεργοποίηση Bluetooth LE Audio"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"Απενεργοποιεί τη λειτουργία Bluetooth LE Audio αν η συσκευή υποστηρίζει δυνατότητες εξοπλισμού LE Audio."</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"Εναλλαγή LE Audio στις λεπτομ. συσκευής"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"Ενεργοποίηση λίστας επιτρεπόμενων Bluetooth LE Audio"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"Ενεργοποίηση λειτουργίας λίστας επιτρεπόμενων Bluetooth LE Audio."</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"Συσκευές μέσων"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"Συσκευές κλήσεων"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"Άλλες συσκευές"</string>
diff --git a/res/values-en-rAU/strings.xml b/res/values-en-rAU/strings.xml
index 866088c..58a8fc4 100644
--- a/res/values-en-rAU/strings.xml
+++ b/res/values-en-rAU/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"Disable Bluetooth LE audio"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"Disables the Bluetooth LE audio feature if the device supports LE audio hardware capabilities."</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"Show LE Audio toggle in Device details"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"Enable Bluetooth LE Audio allow List"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"Enable Bluetooth LE Audio allow list feature."</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"Media devices"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"Call devices"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"Other devices"</string>
diff --git a/res/values-en-rCA/strings.xml b/res/values-en-rCA/strings.xml
index a7896b5..b2ae982 100644
--- a/res/values-en-rCA/strings.xml
+++ b/res/values-en-rCA/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"Disable Bluetooth LE audio"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"Disables Bluetooth LE audio feature if the device supports LE audio hardware capabilities."</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"Show LE audio toggle in Device Details"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"Enable Bluetooth LE audio Allow List"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"Enable Bluetooth LE audio allow list feature."</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"Media devices"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"Call devices"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"Other devices"</string>
diff --git a/res/values-en-rGB/strings.xml b/res/values-en-rGB/strings.xml
index 08fa783..e70dec7 100644
--- a/res/values-en-rGB/strings.xml
+++ b/res/values-en-rGB/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"Disable Bluetooth LE audio"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"Disables the Bluetooth LE audio feature if the device supports LE audio hardware capabilities."</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"Show LE Audio toggle in Device details"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"Enable Bluetooth LE Audio allow List"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"Enable Bluetooth LE Audio allow list feature."</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"Media devices"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"Call devices"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"Other devices"</string>
diff --git a/res/values-en-rIN/strings.xml b/res/values-en-rIN/strings.xml
index 010dde5..baa510b 100644
--- a/res/values-en-rIN/strings.xml
+++ b/res/values-en-rIN/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"Disable Bluetooth LE audio"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"Disables the Bluetooth LE audio feature if the device supports LE audio hardware capabilities."</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"Show LE Audio toggle in Device details"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"Enable Bluetooth LE Audio allow List"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"Enable Bluetooth LE Audio allow list feature."</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"Media devices"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"Call devices"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"Other devices"</string>
diff --git a/res/values-en-rXC/strings.xml b/res/values-en-rXC/strings.xml
index 86a53b8..203cf1b 100644
--- a/res/values-en-rXC/strings.xml
+++ b/res/values-en-rXC/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"Disable Bluetooth LE audio"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"Disables Bluetooth LE audio feature if the device supports LE audio hardware capabilities."</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"Show LE audio toggle in Device Details"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"Enable Bluetooth LE audio Allow List"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"Enable Bluetooth LE audio allow list feature."</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"Media devices"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"Call devices"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"Other devices"</string>
diff --git a/res/values-es-rUS/strings.xml b/res/values-es-rUS/strings.xml
index d94cc71..84aa38d 100644
--- a/res/values-es-rUS/strings.xml
+++ b/res/values-es-rUS/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"Inhabilitar Bluetooth LE Audio"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"Inhabilita la función Bluetooth LE Audio si el dispositivo admite funciones de hardware de ese tipo."</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"Botón de LE Audio en Detalles del disp."</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"Habilitar la lista de permitidos de Bluetooth LE Audio"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"Habilita la función de la lista de permitidos de Bluetooth LE Audio."</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"Dispositivos de medios"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"Dispositivos para llamar"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"Otros dispositivos"</string>
diff --git a/res/values-es/strings.xml b/res/values-es/strings.xml
index de0f923..18f031f 100644
--- a/res/values-es/strings.xml
+++ b/res/values-es/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"Inhabilitar Bluetooth LE Audio"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"Inhabilita la función Bluetooth LE Audio si el dispositivo es compatible con las capacidades de hardware de LE Audio."</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"Botón LE Audio en Detalles del dispositivo"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"Habilitar la lista de permitidos de Bluetooth LE Audio"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"Habilita la función de lista de permitidos de Bluetooth LE Audio."</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"Dispositivos multimedia"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"Dispositivos de llamada"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"Otros dispositivos"</string>
diff --git a/res/values-et/strings.xml b/res/values-et/strings.xml
index f7b07c0..38a2c06 100644
--- a/res/values-et/strings.xml
+++ b/res/values-et/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"Keela Bluetooth LE Audio"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"Keelab funktsiooni Bluetooth LE Audio, kui seade toetab LE Audio riistvara võimalusi."</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"Kuva seadme üksikasjades LE Audio lüliti"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"Luba Bluetooth LE Audio lubamisloend"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"Lubab Bluetooth LE Audio lubamisloendi funktsiooni."</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"Meediaseadmed"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"Helistamisseadmed"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"Muud seadmed"</string>
diff --git a/res/values-eu/strings.xml b/res/values-eu/strings.xml
index a4c9d08..7d99960 100644
--- a/res/values-eu/strings.xml
+++ b/res/values-eu/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"Desgaitu Kontsumo txikiko Bluetooth bidezko audioa"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"Kontsumo txikiko Bluetooth bidezko audioa darabilten hardware-gaitasunak gailuarekin bateragarriak badira, Kontsumo txikiko Bluetooth bidezko audioa eginbidea desgaitzen du."</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"Erakutsi kontsumo txikiko Bluetooth bidezko audioaren etengailua gailuaren xehetasunetan"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"Gaitu kontsumo txikiko Bluetooth bidezko audioaren Onartutakoen zerrenda"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"Gaitu kontsumo txikiko Bluetooth bidezko audioaren Onartutakoen zerrenda eginbidea."</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"Multimedia-gailuak"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"Deiak jaso eta egiteko gailuak"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"Beste gailu batzuk"</string>
diff --git a/res/values-fa/strings.xml b/res/values-fa/strings.xml
index b535d28..ea87565 100644
--- a/res/values-fa/strings.xml
+++ b/res/values-fa/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"غیرفعال کردن «صدای بلوتوث کممصرف»"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"اگر دستگاه از ویژگیهای سختافزار «صدای کممصرف» پشتیبانی کند، ویژگی «صدای بلوتوث کممصرف» را غیرفعال میکند."</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"نمایش تنظیم «صدای کممصرف» در جزئیات دستگاه"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"فعال کردن فهرست مجاز صدای بلوتوث کممصرف"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"ویژگی فهرست مجاز صدای بلوتوث کممصرف را فعال میکند."</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"دستگاههای ذخیرهسازی"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"دستگاههای برقراری تماس"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"دستگاههای دیگر"</string>
diff --git a/res/values-fi/strings.xml b/res/values-fi/strings.xml
index f13eb55..da72fc3 100644
--- a/res/values-fi/strings.xml
+++ b/res/values-fi/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"Poista Bluetooth LE audio käytöstä"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"Poistaa Bluetooth LE ‑audio-ominaisuuden käytöstä, jos laite tukee LE-audiolaitteistoja"</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"Näytä LE Audio ‑valitsin laitetiedoissa"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"Ota Bluetooth LE -audion sallittujen lista käyttöön"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"Ota Bluetooth LE -audion sallittujen lista käyttöön"</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"Medialaitteet"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"Soittolaitteet"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"Muut laitteet"</string>
diff --git a/res/values-fr-rCA/strings.xml b/res/values-fr-rCA/strings.xml
index 0ce4fa3..1e3dc40 100644
--- a/res/values-fr-rCA/strings.xml
+++ b/res/values-fr-rCA/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"Désactiver le Bluetooth LE Audio"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"Désactive la fonctionnalité Bluetooth LE Audio si l\'appareil prend en charge les capacités matérielles LE Audio."</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"Afficher comm. LE Audio dans les détails"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"Activer la liste d\'autorisation du Bluetooth LE audio"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"Activez la fonctionnalité de liste d\'autorisation du Bluetooth LE Audio."</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"Appareils de stockage multimédia"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"Appareils avec fonctionnalités d\'appel"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"Autres appareils"</string>
diff --git a/res/values-fr/strings.xml b/res/values-fr/strings.xml
index 08842db..32528b5 100644
--- a/res/values-fr/strings.xml
+++ b/res/values-fr/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"Désactiver Bluetooth LE Audio"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"Désactiver la fonctionnalité Bluetooth LE Audio si l\'appareil accepte les capacités matérielles LE Audio"</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"Voir LE Audio dans Détails de l\'appareil"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"Activer la liste d\'autorisation Bluetooth LE Audio"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"Activer la fonctionnalité de liste d\'autorisation Bluetooth LE Audio"</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"Périphériques multimédias"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"Appareils servant pour les appels"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"Autres appareils"</string>
diff --git a/res/values-gl/strings.xml b/res/values-gl/strings.xml
index b33626e..48a08a6 100644
--- a/res/values-gl/strings.xml
+++ b/res/values-gl/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"Bluetooth de baixo consumo (audio): Non"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"Desactiva a función de audio por Bluetooth de baixo consumo se o dispositivo é compatible coas funcións do hardware de audio de baixo consumo."</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"Botón Audio de baixo consumo en detalles"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"Activar lista de permitidos de audio por Bluetooth de baixo consumo"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"Activa a función de lista de permitidos de audio por Bluetooth de baixo consumo."</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"Dispositivos multimedia"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"Dispositivos de chamada"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"Outros dispositivos"</string>
diff --git a/res/values-gu/strings.xml b/res/values-gu/strings.xml
index c8ceab3..591deac 100644
--- a/res/values-gu/strings.xml
+++ b/res/values-gu/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"બ્લૂટૂથ LE ઑડિયો બંધ કરો"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"જો ડિવાઇસ LE ઑડિયો હાર્ડવેર ક્ષમતાઓને સપોર્ટ કરતું હોય, તો બ્લૂટૂથ LE ઑડિયો સુવિધા બંધ કરે છે."</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"ડિવાઇસની વિગતોમાં LE ઑડિયો ટૉગલ બતાવો"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"બ્લૂટૂથ LE ઑડિયો મંજૂરીની સૂચિ ચાલુ કરો"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"બ્લૂટૂથ LE ઑડિયો મંજૂરીની સૂચિની સુવિધા ચાલુ કરો."</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"મીડિયા ડિવાઇસ"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"કૉલ ડિવાઇસ"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"અન્ય ડિવાઇસ"</string>
diff --git a/res/values-hi/strings.xml b/res/values-hi/strings.xml
index ff8e554..3299aec 100644
--- a/res/values-hi/strings.xml
+++ b/res/values-hi/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"\'ब्लूटूथ LE Audio\' को बंद करें"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"अगर डिवाइस पर LE Audio हार्डवेयर चलता है, तो \'ब्लूटूथ LE Audio\' को बंद करें."</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"डिवाइस डिटेल में LE Audio टॉगल दिखाएं"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"\'ब्लूटूथ LE Audio\' की अनुमति वाली सूची की सुविधा चालू करें"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"\'ब्लूटूथ LE Audio\' की अनुमति वाली सूची की सुविधा चालू करें."</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"मीडिया डिवाइस"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"कॉल की सुविधा वाले डिवाइस"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"दूसरे डिवाइस"</string>
diff --git a/res/values-hr/strings.xml b/res/values-hr/strings.xml
index c048a6f..6665bd5 100644
--- a/res/values-hr/strings.xml
+++ b/res/values-hr/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"Onemogući Bluetooth LE audio"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"Onemogućuje značajku Bluetooth LE audio ako uređaj podržava mogućnosti za LE audio hardvera."</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"Prikaži prekidač LE Audio u pojedinostima o uređaju"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"Omogući popis dopuštenih za Bluetooth LE audio"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"Omogućuje značajku popisa dopuštenih za Bluetooth LE audio."</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"Medijski uređaji"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"Uređaji za pozive"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"Ostali uređaji"</string>
diff --git a/res/values-hu/strings.xml b/res/values-hu/strings.xml
index 977da59..ab6546c 100644
--- a/res/values-hu/strings.xml
+++ b/res/values-hu/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"Bluetooth LE hangátvitel kikapcsolása"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"Kikapcsolja a Bluetooth alacsony energiaszintű hangátvitel funkciót, ha az eszköz támogatja az Alacsony energiaszintű hangátvitel hardver működését."</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"„Alacsony energiaszintű hangátvitel” az Eszközadatokban"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"Bluetooth LE hangátvitel engedélyezőlistájának engedélyezése"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"Engedélyezi a Bluetooth alacsony energiaszintű hangátvitel engedélyezőlistája funkciót."</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"Médiaeszközök"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"Hívóeszközök"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"Egyéb eszközök"</string>
diff --git a/res/values-hy/strings.xml b/res/values-hy/strings.xml
index 6ecf06c..878028e 100644
--- a/res/values-hy/strings.xml
+++ b/res/values-hy/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"Անջատել Bluetooth LE Audio-ն"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"Անջատում է Bluetooth LE Audio գործառույթը, եթե սարքն այն աջակցում է։"</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"Տեսնել LE Audio-ն սարքի տվյալներում"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"Միացնել Bluetooth LE audio-ի թույլտվությունների ցուցակը"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"Միացնել Bluetooth LE audio-ի «Թույլտվությունների ցուցակ» գործառույթը"</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"Մեդիա սարքեր"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"Հեռախոսային սարքեր"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"Այլ սարքեր"</string>
diff --git a/res/values-in/strings.xml b/res/values-in/strings.xml
index ca567a4..302f278 100644
--- a/res/values-in/strings.xml
+++ b/res/values-in/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"Nonaktifkan Bluetooth LE Audio"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"Nonaktifkan fitur Bluetooth LE Audio jika perangkat mendukung kemampuan hardware LE Audio."</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"Tampilkan tombol LE audio di Detail Perangkat"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"Aktifkan Daftar yang Diizinkan Bluetooth LE Audio"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"Aktifkan fitur daftar yang diizinkan Bluetooth LE Audio."</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"Perangkat Media"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"Perangkat panggilan telepon"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"Perangkat lain"</string>
diff --git a/res/values-is/strings.xml b/res/values-is/strings.xml
index 7c1520f..c045922 100644
--- a/res/values-is/strings.xml
+++ b/res/values-is/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"Slökkva á Bluetooth LE-hljóði"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"Slekkur á Bluetooth LE-hljóðeiginleika ef tækið styður vélbúnaðareiginleika LE-hljóðs."</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"Sýna rofa LE-hljóðs í tækjaupplýsingum"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"Kveikja á undanþágulista fyrir Bluetooth LE-hljóð"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"Kveikja á eiginleika undanþágulista fyrir Bluetooth LE-hljóð."</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"Geymslumiðlar"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"Símtæki"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"Önnur tæki"</string>
diff --git a/res/values-it/strings.xml b/res/values-it/strings.xml
index 930fc48..7d4aebc 100644
--- a/res/values-it/strings.xml
+++ b/res/values-it/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"Disattiva Bluetooth LE audio"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"Disattiva la funzionalità Bluetooth LE audio se il dispositivo supporta funzioni hardware LE audio."</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"Mostra comandi LE audio nei dettagli dispositivo"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"Attiva lista consentita Bluetooth LE audio"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"Attiva la funzionalità della lista consentita Bluetooth LE audio."</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"Dispositivi multimediali"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"Dispositivi di chiamata"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"Altri dispositivi"</string>
diff --git a/res/values-iw/strings.xml b/res/values-iw/strings.xml
index 0bfe065..c691c9f 100644
--- a/res/values-iw/strings.xml
+++ b/res/values-iw/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"השבתה של Bluetooth LE audio"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"האפשרות הזו משביתה את התכונה Bluetooth LE Audio אם המכשיר תומך ביכולות חומרה של LE audio."</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"הצגת המתג של LE audio בפרטי המכשיר"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"הפעלה של רשימת ההרשאות של Bluetooth LE Audio"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"הפעלה של התכונה רשימת ההרשאות של Bluetooth LE Audio."</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"מכשירים לאחסון מדיה"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"מכשירי התקשרות"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"מכשירים אחרים"</string>
diff --git a/res/values-ja/strings.xml b/res/values-ja/strings.xml
index a5eb0dc..097a7b0 100644
--- a/res/values-ja/strings.xml
+++ b/res/values-ja/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"Bluetooth LE Audio を無効にする"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"デバイスが LE オーディオ ハードウェア機能に対応している場合に、Bluetooth LE Audio 機能を無効にします。"</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"LE Audio の切替をデバイスの詳細に表示"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"Bluetooth LE Audio 許可リストを有効にする"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"Bluetooth LE Audio 許可リスト機能を有効にします。"</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"メディア デバイス"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"通話デバイス"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"その他のデバイス"</string>
diff --git a/res/values-ka/strings.xml b/res/values-ka/strings.xml
index bb9e08c..9bad344 100644
--- a/res/values-ka/strings.xml
+++ b/res/values-ka/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"Bluetooth LE-აუდიოს გათიშვა"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"Bluetooth LE AUDIO-ს ფუნქცია ითიშება, თუ მოწყობილობას აქვს LE AUDIO-ს აპარატურული გარჩევადობები."</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"LE-აუდიო გადართვის ჩვენება მოწყობილობის დეტალებში"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"Bluetooth LE-აუდიოს დაშვებულთა სიის ჩართვა"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"Bluetooth LE-აუდიოს დაშვებულთა სიის ფუნქციის ჩართვა."</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"მედია მოწყობილობები"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"მოწყობილობებზე დარეკვა"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"სხვა მოწყობილობები"</string>
diff --git a/res/values-kk/strings.xml b/res/values-kk/strings.xml
index f1b2121..232063f 100644
--- a/res/values-kk/strings.xml
+++ b/res/values-kk/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"Bluetooth LE Audio функциясын өшіру"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"Құрылғы LE Audio жабдық мүмкіндіктерін қолдайтын болса, Bluetooth LE Audio функциясы өшіріледі."</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"LE audio ауыстырғышын \"Құрылғы туралы мәлімет\" бөлімінде көрсету"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"Bluetooth LE audio рұқсат тізімін қосу"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"Bluetooth LE audio рұқсат тізімі функциясын қосу"</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"Сақтау құрылғылары"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"Қоңырау шалуға болатын құрылғылар"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"Басқа құрылғылар"</string>
diff --git a/res/values-km/strings.xml b/res/values-km/strings.xml
index 9b32f0f..3f1e66a 100644
--- a/res/values-km/strings.xml
+++ b/res/values-km/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"បិទប៊្លូធូស LE Audio"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"បិទមុខងារប៊្លូធូស LE Audio ប្រសិនបើឧបករណ៍អាចប្រើសមត្ថភាពហាតវែរ LE audio បាន។"</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"បង្ហាញប៊ូតុងបិទ/បើក LE Audio ក្នុងព័ត៌មានលម្អិតអំពីឧបករណ៍"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"បើកបញ្ជីអនុញ្ញាតប៊្លូធូស LE Audio"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"បើកមុខងារបញ្ជីអនុញ្ញាតប៊្លូធូស LE Audio។"</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"ឧបករណ៍ផ្ទុកទិន្នន័យ"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"ឧបករណ៍ហៅទូរសព្ទ"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"ឧបករណ៍ផ្សេងទៀត"</string>
diff --git a/res/values-kn/strings.xml b/res/values-kn/strings.xml
index 4319e71..5dc0e73 100644
--- a/res/values-kn/strings.xml
+++ b/res/values-kn/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"ಬ್ಲೂಟೂತ್ LE ಆಡಿಯೋವನ್ನು ನಿಷ್ಕ್ರಿಯಗೊಳಿಸಿ"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"ಸಾಧನವು LE ಆಡಿಯೋ ಹಾರ್ಡ್ವೇರ್ ಸಾಮರ್ಥ್ಯಗಳನ್ನು ಬೆಂಬಲಿಸಿದರೆ ಬ್ಲೂಟೂತ್ LE ಆಡಿಯೋ ಫೀಚರ್ ಅನ್ನು ನಿಷ್ಕ್ರಿಯಗೊಳಿಸುತ್ತದೆ."</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"ಸಾಧನ ವಿವರಗಳಲ್ಲಿ LE ಆಡಿಯೋ ಟಾಗಲ್ ತೋರಿಸಿ"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"ಬ್ಲೂಟೂತ್ LE ಆಡಿಯೋ ಅನುಮತಿ ಪಟ್ಟಿಯನ್ನು ಸಕ್ರಿಯಗೊಳಿಸಿ"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"ಬ್ಲೂಟೂತ್ LE ಆಡಿಯೋ ಅನುಮತಿ ಪಟ್ಟಿ ಫೀಚರ್ ಅನ್ನು ಸಕ್ರಿಯಗೊಳಿಸಿ."</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"ಮೀಡಿಯಾ ಸಾಧನಗಳು"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"ಸಾಧನಗಳಿಗೆ ಕರೆಮಾಡಿ"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"ಇತರ ಸಾಧನಗಳು"</string>
diff --git a/res/values-ko/strings.xml b/res/values-ko/strings.xml
index 54796c9..dedebe7 100644
--- a/res/values-ko/strings.xml
+++ b/res/values-ko/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"블루투스 LE 오디오 사용 중지"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"기기가 LE 오디오 하드웨어 기능을 지원하는 경우 블루투스 LE 오디오 기능을 사용 중지합니다."</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"기기 세부정보에 LE 오디오 전환 버튼 표시"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"블루투스 LE 오디오 허용 목록 사용 설정"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"블루투스 LE 오디오 허용 목록 기능을 사용 설정합니다."</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"미디어 기기"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"통화 기기"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"다른 기기"</string>
diff --git a/res/values-ky/strings.xml b/res/values-ky/strings.xml
index d807b09..ddb8c98 100644
--- a/res/values-ky/strings.xml
+++ b/res/values-ky/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"Bluetooth LE audio\'ну өчүрүү"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"Эгер түзмөктө аппараттык мүмкүнчүлүктөр болсо, Bluetooth LE Audio функциясы өчүрүлөт."</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"Түзмөктүн чоо-жайынан LE Audio которгучун көрсөтүү"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"Bluetooth LE Audio Уруксат берилгендердин тизмесин иштетүү"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"Bluetooth LE Audio Уруксат берилгендердин тизмеси функциясын иштетиңиз."</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"Медиа түзмөктөр"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"Түзмөктөргө чалуу"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"Башка түзмөктөр"</string>
diff --git a/res/values-lo/strings.xml b/res/values-lo/strings.xml
index b72d4cf..87656be 100644
--- a/res/values-lo/strings.xml
+++ b/res/values-lo/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"ປິດການນຳໃຊ້ສຽງ Bluetooth LE"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"ປິດການນຳໃຊ້ຄຸນສົມບັດສຽງ Bluetooth LE ຫາກອຸປະກອນຮອງຮັບຄວາມສາມາດຂອງຮາດແວສຽງ LE."</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"ສະແດງການສະຫຼັບສຽງ LE ໃນລາຍລະອຽດອຸປະກອນ"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"ເປີດການນຳໃຊ້ລາຍຊື່ອະນຸຍາດສຽງ Bluetooth LE"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"ເປີດການນຳໃຊ້ຄຸນສົມບັດລາຍຊື່ອະນຸຍາດສຽງ Bluetooth LE."</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"ອຸປະກອນມີເດຍ"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"ອຸປະກອນໂທ"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"ອຸປະກອນອື່ນໆ"</string>
diff --git a/res/values-lt/strings.xml b/res/values-lt/strings.xml
index ef88752..a61d504 100644
--- a/res/values-lt/strings.xml
+++ b/res/values-lt/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"„Bluetooth LE Audio“ išjungimas"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"Jei įrenginys palaiko „LE Audio“ aparatinės įrangos galimybes, išjungiama funkcija „Bluetooth LE Audio“."</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"Rodyti „LE Audio“ jungiklį įrenginio informacijoje"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"Įgalinti „Bluetooth LE Audio“ leidžiamųjų sąrašą"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"Įgalinti „Bluetooth LE Audio“ leidžiamųjų sąrašo funkciją."</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"Laikmenos"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"Skambinimo įrenginiai"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"Kiti įrenginiai"</string>
diff --git a/res/values-lv/strings.xml b/res/values-lv/strings.xml
index 6ba8749..f623aaa 100644
--- a/res/values-lv/strings.xml
+++ b/res/values-lv/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"Atspējot Bluetooth LE Audio"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"Tiek atspējota Bluetooth LE Audio funkcija, ja ierīcē tiek atbalstītas LE Audio aparatūras iespējas."</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"LE Audio slēdzis informācijā par ierīci"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"Iespējot Bluetooth LE audio atļaušanas sarakstu"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"Iespējojiet funkciju “Bluetooth LE audio atļaušanas saraksts”."</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"Multivides ierīces"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"Zvanīšanas ierīces"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"Citas ierīces"</string>
diff --git a/res/values-mk/strings.xml b/res/values-mk/strings.xml
index d3abef4..36b2a0b 100644
--- a/res/values-mk/strings.xml
+++ b/res/values-mk/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"Оневозможи Bluetooth LE Audio"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"Ја оневозможува функцијата Bluetooth LE Audio ако уредот поддржува хардверски способности за LE Audio."</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"Прекинувач за LE Audio во „Детали за уредот“"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"Овозможи список со дозволени за Bluetooth LE Audio"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"Овозможи ја функцијата за список со дозволени за Bluetooth LE Audio."</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"Преносливи уреди"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"Уреди за повикување"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"Други уреди"</string>
diff --git a/res/values-ml/strings.xml b/res/values-ml/strings.xml
index d20782a..457f09d 100644
--- a/res/values-ml/strings.xml
+++ b/res/values-ml/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"Bluetooth LE ഓഡിയോ പ്രവർത്തനരഹിതമാക്കുക"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"ഉപകരണം LE ഓഡിയോ ഹാർഡ്വെയർ ശേഷികളെ പിന്തുണയ്ക്കുന്നുണ്ടെങ്കിൽ Bluetooth LE ഓഡിയോ ഫീച്ചർ പ്രവർത്തനരഹിതമാക്കുന്നു."</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"ഉപകരണ വിശദാംശങ്ങളിൽ LE ഓഡിയോ ടോഗിൾ കാണിക്കൂ"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"Bluetooth LE ഓഡിയോ അനുവദനീയ ലിസ്റ്റ് പ്രവർത്തനക്ഷമമാക്കുക"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"Bluetooth LE ഓഡിയോ അനുവദനീയ ലിസ്റ്റ് ഫീച്ചർ പ്രവർത്തനക്ഷമമാക്കുക."</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"മീഡിയ ഉപകരണങ്ങൾ"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"കോൾ ഉപകരണങ്ങൾ"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"മറ്റ് ഉപകരണങ്ങൾ"</string>
diff --git a/res/values-mn/strings.xml b/res/values-mn/strings.xml
index 0f9315a..e1f80d1 100644
--- a/res/values-mn/strings.xml
+++ b/res/values-mn/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"Bluetooth LE аудиог идэвхгүй болгох"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"Хэрэв төхөөрөмж LE аудио техник хангамжийн чадамжийг дэмждэг бол Bluetooth LE аудио онцлогийг идэвхгүй болгоно."</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"Төхөөрөмжийн дэлгэрэнгүйд LE аудионы асаах/унтраахыг харуул"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"Bluetooth LE аудиогийн зөвшөөрөгдсөн жагсаалтыг идэвхжүүлэх"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"Bluetooth LE аудиогийн зөвшөөрөгдсөн жагсаалтын онцлогийг идэвхжүүлнэ үү."</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"Медиа төхөөрөмжүүд"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"Дуудлага хийх төхөөрөмжүүд"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"Бусад төхөөрөмж"</string>
diff --git a/res/values-mr/strings.xml b/res/values-mr/strings.xml
index 89beee1..b3a90e0 100644
--- a/res/values-mr/strings.xml
+++ b/res/values-mr/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"ब्लूटूथ LE ऑडिओ बंद करा"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"डिव्हाइसला LE ऑडिओ हार्डवेअरसंबंधित क्षमतांचा सपोर्ट असल्यास, ब्लूटूथ LE ऑडिओ वैशिष्ट्य बंद करते."</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"डिव्हाइस तपशील यांत LE ऑडिओ टॉगल दाखवा"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"ब्लूटूथ LE ऑडिओ अनुमती सूची सुरू करा"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"ब्लूटूथ LE ऑडिओ अनुमती सूची वैशिष्ट्य सुरू करा."</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"मीडिया डिव्हाइस"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"कॉल डिव्हाइस"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"इतर डिव्हाइस"</string>
diff --git a/res/values-ms/strings.xml b/res/values-ms/strings.xml
index 21f2c6f..4d2b60b 100644
--- a/res/values-ms/strings.xml
+++ b/res/values-ms/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"Lumpuhkan Bluetooth LE Audio"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"Melumpuhkan ciri Bluetooth LE Audio jika peranti menyokong keupayaan perkakasan LE Audio."</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"Tunjukkan togol LE Audio pada Butiran Peranti"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"Dayakan Senarai Dibenarkan untuk Bluetooth LE audio"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"Dayakan ciri senarai dibenarkan untuk Bluetooth LE Audio."</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"Peranti media"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"Panggil peranti"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"Peranti lain"</string>
diff --git a/res/values-my/strings.xml b/res/values-my/strings.xml
index 2343353..abf0e26 100644
--- a/res/values-my/strings.xml
+++ b/res/values-my/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"‘ဘလူးတုသ် LE Audio’ ပိတ်ရန်"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"စက်က LE Audio ဟာ့ဒ်ဝဲစွမ်းရည်များကို ပံ့ပိုးလျှင် ဘလူးတုသ် LE Audio အင်္ဂါရပ်ကို ပိတ်သည်။"</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"‘စက်အသေးစိတ်’ တွင် LE audio ခလုတ်ပြရန်"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"ဘလူးတုသ် LE Audio ခွင့်ပြုစာရင်း ဖွင့်ရန်"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"ဘလူးတုသ် LE Audio ခွင့်ပြုစာရင်း အင်္ဂါရပ်ကို ဖွင့်သည်။"</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"မီဒီယာ စက်ပစ္စည်းများ"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"ခေါ်ဆိုမှု စက်ပစ္စည်းများ"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"အခြား စက်ပစ္စည်းများ"</string>
diff --git a/res/values-nb/strings.xml b/res/values-nb/strings.xml
index e64920c..9bc8f22 100644
--- a/res/values-nb/strings.xml
+++ b/res/values-nb/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"Slå av Bluetooth LE-lyd"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"Slår av Bluetooth LE-lydfunksjonen hvis enheten støtter maskinvarefunksjoner for LE-lyd."</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"Vis LE-lyd-av/på-bryter i Enhetsdetaljer"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"Slå på tillatelseslisten for Bluetooth LE-lyd"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"Slå på funksjonen for tillatelseslisten for Bluetooth LE-lyd."</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"Medieenheter"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"Ringeenheter"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"Andre enheter"</string>
diff --git a/res/values-ne/strings.xml b/res/values-ne/strings.xml
index 28207e9..4dfc33b 100644
--- a/res/values-ne/strings.xml
+++ b/res/values-ne/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"\"ब्लुटुथ लो इनर्जी अडियो\" अफ गरियोस्"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"डिभाइसमा LE अडियो हार्डवेयर चलाउन मिल्छ भने \"ब्लुटुथ लो इनर्जी अडियो\" सुविधा अफ हुन्छ।"</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"डिभाइसको विवरणमा LE अडियोको टगल देखाइयोस्"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"ब्लुटुथ लो इनर्जी अडियोको श्वेतसूची अन गरियोस्"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"ब्लुटुथ लो इनर्जी अडियोको श्वेतसूचीसम्बन्धी सुविधा अन गर्नुहोस्।"</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"मिडियासम्बन्धी यन्त्रहरू"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"कल गर्ने सुविधा भएका यन्त्रहरू"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"अन्य डिभाइसहरू"</string>
diff --git a/res/values-night/styles.xml b/res/values-night/styles.xml
index f69c952..a93c981 100644
--- a/res/values-night/styles.xml
+++ b/res/values-night/styles.xml
@@ -19,15 +19,4 @@
<style name="Widget.ActionBar.Base" parent="@android:style/Widget.DeviceDefault.ActionBar.Solid">
<item name="android:background">?android:attr/colorPrimaryDark</item>
</style>
-
- <style name="TextAppearance.SimConfirmDialogList" parent="@style/TextAppearance.DialogMessage">
- <item name="android:fontFamily">@*android:string/config_headlineFontFamily</item>
- <item name="android:textColor">?android:attr/textColorPrimaryInverse</item>
- </style>
-
- <style name="TextAppearance.SimConfirmDialogList.Summary">
- <item name="android:textAppearance">?android:attr/textAppearanceSmall</item>
- <item name="android:fontFamily">@*android:string/config_headlineFontFamily</item>
- <item name="android:textColor">?android:attr/textColorSecondaryInverse</item>
- </style>
</resources>
\ No newline at end of file
diff --git a/res/values-nl/strings.xml b/res/values-nl/strings.xml
index ab00814..4949337 100644
--- a/res/values-nl/strings.xml
+++ b/res/values-nl/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"Bluetooth LE Audio uitzetten"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"Hiermee zet je de functie voor Bluetooth LE Audio uit als het apparaat hardwaremogelijkheden voor LE Audio ondersteunt."</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"Schakelaar voor LE Audio tonen in Apparaatgegevens"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"Toelatingslijst voor Bluetooth LE Audio aanzetten"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"Functie voor toelatingslijst voor Bluetooth LE Audio aanzetten."</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"Media-apparaten"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"Apparaten voor gesprekken"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"Andere apparaten"</string>
diff --git a/res/values-or/strings.xml b/res/values-or/strings.xml
index 3a468dd..42ca9e3 100644
--- a/res/values-or/strings.xml
+++ b/res/values-or/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"ବ୍ଲୁଟୁଥ LE ଅଡିଓକୁ ଅକ୍ଷମ କରନ୍ତୁ"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"ଯଦି ଡିଭାଇସ LE ଅଡିଓ ହାର୍ଡୱେର କ୍ଷମତାକୁ ସମର୍ଥନ କରେ ତେବେ ଏହା ବ୍ଲୁଟୁଥ LE ଅଡିଓ ଫିଚରକୁ ଅକ୍ଷମ କରେ।"</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"ଡିଭାଇସ ବିବରଣୀରେ LE ଅଡିଓ ଟୋଗଲ ଦେଖାନ୍ତୁ"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"ବ୍ଲୁଟୁଥ LE ଅଡିଓ ଅନୁମତି ତାଲିକାକୁ ସକ୍ଷମ କରନ୍ତୁ"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"ବ୍ଲୁଟୁଥ LE ଅଡିଓ ଅନୁମତି ତାଲିକା ଫିଚରକୁ ସକ୍ଷମ କରନ୍ତୁ।"</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"ମିଡିଆ ଡିଭାଇସ୍ଗୁଡ଼ିକ"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"କଲ୍ ଡିଭାଇସ୍ଗୁଡ଼ିକ"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"ଅନ୍ୟ ଡିଭାଇସ୍ଗୁଡ଼ିକ"</string>
diff --git a/res/values-pa/strings.xml b/res/values-pa/strings.xml
index 0062abf..192880b 100644
--- a/res/values-pa/strings.xml
+++ b/res/values-pa/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"Bluetooth LE Audio ਨੂੰ ਬੰਦ ਕਰੋ"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"ਡੀਵਾਈਸ ਵੱਲੋਂ LE ਆਡੀਓ ਹਾਰਡਵੇਅਰ ਸਮਰੱਥਾਵਾਂ ਦਾ ਸਮਰਥਨ ਕਰਨ \'ਤੇ Bluetooth LE Audio ਵਿਸ਼ੇਸ਼ਤਾ ਨੂੰ ਬੰਦ ਕਰਦਾ ਹੈ।"</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"ਡੀਵਾਈਸ ਵੇਰਵਿਆਂ ਵਿੱਚ LE ਆਡੀਓ ਟੌਗਲ ਦਿਖਾਓ"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"Bluetooth LE Audio ਪ੍ਰਵਾਨਿਤ ਸੂਚੀ ਨੂੰ ਚਾਲੂ ਕਰੋ"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"Bluetooth LE Audio ਪ੍ਰਵਾਨਿਤ ਸੂਚੀ ਵਿਸ਼ੇਸ਼ਤਾ ਨੂੰ ਚਾਲੂ ਕਰੋ।"</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"ਮੀਡੀਆ ਡੀਵਾਈਸਾਂ"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"ਕਾਲ ਡੀਵਾਈਸ"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"ਹੋਰ ਡੀਵਾਈਸ"</string>
diff --git a/res/values-pl/strings.xml b/res/values-pl/strings.xml
index cd88791..5559637 100644
--- a/res/values-pl/strings.xml
+++ b/res/values-pl/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"Wyłącz Bluetooth LE Audio"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"Wyłącza funkcję Bluetooth LE Audio, jeśli urządzenie obsługuje sprzętowe funkcje LE Audio"</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"Pokazuj przełącznik LE Audio w Szczegółach urządzenia"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"Włącz listę dozwolonych urządzeń Bluetooth LE Audio"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"Funkcja włączania listy dozwolonych urządzeń Bluetooth LE Audio"</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"Nośniki danych"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"Urządzenia telefoniczne"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"Inne urządzenia"</string>
diff --git a/res/values-pt-rBR/strings.xml b/res/values-pt-rBR/strings.xml
index aba4e38..64a1df4 100644
--- a/res/values-pt-rBR/strings.xml
+++ b/res/values-pt-rBR/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"Desativar LE Audio"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"Desativa o recurso de áudio Bluetooth de baixo consumo caso o hardware do dispositivo tenha essa opção."</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"Mostrar a chave do LE Audio nos Detalhes do dispositivo"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"Ativar a lista de permissões de LE Audio"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"Ative o recurso de lista de permissões de áudio Bluetooth de baixo consumo."</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"Dispositivos portáteis de mídia"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"Dispositivos de chamada"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"Outros dispositivos"</string>
diff --git a/res/values-pt-rPT/strings.xml b/res/values-pt-rPT/strings.xml
index 75cec1e..fa5c25f 100644
--- a/res/values-pt-rPT/strings.xml
+++ b/res/values-pt-rPT/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"Desativar Bluetooth LE Audio"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"Desativa a funcionalidade Bluetooth LE Audio se o dispositivo suportar as capacidades de hardware LE Audio."</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"Botão LE Audio – Detalhes do dispositivo"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"Ativar lista de autorizações do Bluetooth LE Audio"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"Ative a funcionalidade da lista de autorizações do Bluetooth LE Audio."</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"Dispositivos multimédia"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"Dispositivos de chamada"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"Outros dispositivos"</string>
diff --git a/res/values-pt/strings.xml b/res/values-pt/strings.xml
index aba4e38..64a1df4 100644
--- a/res/values-pt/strings.xml
+++ b/res/values-pt/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"Desativar LE Audio"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"Desativa o recurso de áudio Bluetooth de baixo consumo caso o hardware do dispositivo tenha essa opção."</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"Mostrar a chave do LE Audio nos Detalhes do dispositivo"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"Ativar a lista de permissões de LE Audio"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"Ative o recurso de lista de permissões de áudio Bluetooth de baixo consumo."</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"Dispositivos portáteis de mídia"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"Dispositivos de chamada"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"Outros dispositivos"</string>
diff --git a/res/values-ro/strings.xml b/res/values-ro/strings.xml
index ebf5b43..0ecfb94 100644
--- a/res/values-ro/strings.xml
+++ b/res/values-ro/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"Dezactivează Bluetooth LE Audio"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"Dezactivează funcția Bluetooth LE Audio dacă dispozitivul acceptă capacitățile de hardware LE Audio."</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"Comutator LE Audio în Detalii dispozitiv"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"Activează Lista cu acces permis pentru Bluetooth LE Audio"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"Activează funcția Listă cu acces permis pentru Bluetooth LE Audio."</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"Dispozitive media"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"Dispozitive de apel"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"Alte dispozitive"</string>
diff --git a/res/values-ru/strings.xml b/res/values-ru/strings.xml
index 6b9d5e1..fe4e849 100644
--- a/res/values-ru/strings.xml
+++ b/res/values-ru/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"Отключить Bluetooth LE Audio"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"Отключить Bluetooth LE Audio, если доступны аппаратные возможности"</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"Переключатель LE Audio в сведениях об устройстве"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"Включить список разрешений Bluetooth LE Audio"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"Включить функцию \"Список разрешений Bluetooth LE Audio\""</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"Медиаустройства"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"Устройства для совершения звонков"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"Другие устройства"</string>
diff --git a/res/values-si/strings.xml b/res/values-si/strings.xml
index 6c52b3d..71f6829 100644
--- a/res/values-si/strings.xml
+++ b/res/values-si/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"බ්ලූටූත් LE ශ්රව්ය අබල කරන්න"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"උපාංගය LE ශ්රව්ය දෘඨාංග හැකියා වෙත සහාය දක්වන්නේ නම් බ්ලූටූත් LE ශ්රව්ය විශේෂාංගය අබල කරයි."</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"උපාංග විස්තරවල LE ශ්රව්ය ටොගල පෙන්වන්න"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"බ්ලූටූත් LE ශ්රව්ය අවසර ලැයිස්තුව සබල කරන්න"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"බ්ලූටූත් LE ශ්රව්ය අවසර ලැයිස්තු විශේෂාංගය සබල කරන්න."</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"මාධ්ය උපාංග"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"ඇමතුම් උපාංග"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"වෙනත් උපාංග"</string>
diff --git a/res/values-sk/strings.xml b/res/values-sk/strings.xml
index 66ec584..3dd3c30 100644
--- a/res/values-sk/strings.xml
+++ b/res/values-sk/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"Deaktivovať Bluetooth LE Audio"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"Deaktivovať funkciu Bluetooth LE Audio, keď zariadenie podporuje možnosti hardvéru LE Audio"</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"Zobrazovať LE Audio v podr. o zariadení"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"Povoliť zoznam povolených s prístupom k funkcii Bluetooth LE Audio"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"Povoliť funkciu zoznamu povolených s prístupom k funkcii Bluetooth LE Audio"</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"Mediálne zariadenia"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"Zariadenia na telefonovanie"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"Iné zariadenia"</string>
diff --git a/res/values-sl/strings.xml b/res/values-sl/strings.xml
index 37e58c7..b528177 100644
--- a/res/values-sl/strings.xml
+++ b/res/values-sl/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"Onemogoči funkcijo Bluetooth LE zvok"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"Onemogoči funkcijo Bluetooth LE zvok, če naprava podpira strojno opremo za LE zvok."</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"Pokaži preklopnik za LE zvok v podrobnostih o napravi"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"Omogoči seznam dovoljenih za Bluetooth LE zvok"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"Omogoči funkcijo seznama dovoljenih za Bluetooth LE zvok."</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"Predstavnostne naprave"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"Klicne naprave"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"Druge naprave"</string>
diff --git a/res/values-sq/strings.xml b/res/values-sq/strings.xml
index 84ac005..58962d0 100644
--- a/res/values-sq/strings.xml
+++ b/res/values-sq/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"Çaktivizo Bluetooth LE Audio"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"Çaktivizon veçorinë Bluetooth LE Audio nëse pajisja mbështet aftësitë e harduerit të LE Audio."</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"Shfaq çelësin për LE Audio te \"Detajet e pajisjes\""</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"Aktivizo listën e autorizimeve të Bluetooth LE Audio"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"Aktivizo veçorinë e listës së autorizimeve të Bluetooth LE Audio."</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"Pajisjet për median"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"Pajisjet për telefonata"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"Pajisjet e tjera"</string>
diff --git a/res/values-sr/strings.xml b/res/values-sr/strings.xml
index 3e5cce4..6f569df 100644
--- a/res/values-sr/strings.xml
+++ b/res/values-sr/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"Онемогући Bluetooth LE audio"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"Онемогућава функцију Bluetooth LE audio ако уређај подржава могућности LE audio хардвера."</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"LE Audio прекидач у детаљима о уређају"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"Омогући Bluetooth LE Audio листу дозвола"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"Омогућава функцију Bluetooth LE Audio листу дозвола."</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"Медијски уређаји"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"Уређаји за позивање"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"Други уређаји"</string>
diff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml
index 1d2a802..e46a43f 100644
--- a/res/values-sv/strings.xml
+++ b/res/values-sv/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"Inaktivera Bluetooth LE Audio"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"Inaktiverar Bluetooth LE Audio-funktionen om enheten har stöd för funktioner för LE Audio-maskinvara."</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"Visa reglage för LE Audio i Enhetsinfo"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"Aktivera godkännandelista för Bluetooth LE Audio"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"Aktivera funktionen för godkännandelista för Bluetooth LE Audio."</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"Medieenheter"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"Telefonenheter"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"Andra enheter"</string>
diff --git a/res/values-sw/strings.xml b/res/values-sw/strings.xml
index 11b5112..d258dbb 100644
--- a/res/values-sw/strings.xml
+++ b/res/values-sw/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"Zima Bluetooth LE audio"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"Huzima kipengele cha Bluetooth LE audio ikiwa kifaa kinatumia maunzi yenye uwezo wa kutumia LE audio."</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"Onyesha LE Audio kwenye Maelezo ya Kifaa"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"Washa Orodha ya walioruhusiwa kufikia Bluetooth LE audio"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"Washa kipengele cha orodha ya vinavyoruhusiwa kufikia Bluetooth LE audio."</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"Vifaa vya kuhifadhia data"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"Vifaa vya kupiga simu"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"Vifaa vingine"</string>
diff --git a/res/values-ta/strings.xml b/res/values-ta/strings.xml
index b25088f..83d2be8 100644
--- a/res/values-ta/strings.xml
+++ b/res/values-ta/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"புளூடூத் LE ஆடியோவை முடக்கு"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"LE ஆடியோ துணைப் பொருள் திறன்களைச் சாதனம் ஆதரித்தால் புளூடூத் LE ஆடியோ அம்சத்தை முடக்கும்."</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"சாதன விவரங்களில் LE ஆடியோ டாகிளை காட்டு"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"புளூடூத் LE ஆடியோ அனுமதிப் பட்டியல் அம்சத்தை இயக்கு"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"புளூடூத் LE ஆடியோ அனுமதிப் பட்டியல் அம்சத்தை இயக்கும்."</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"மீடியா சாதனங்கள்"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"அழைப்பதற்கான சாதனங்கள்"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"பிற சாதனங்கள்"</string>
diff --git a/res/values-te/strings.xml b/res/values-te/strings.xml
index a21851d..7989e4b 100644
--- a/res/values-te/strings.xml
+++ b/res/values-te/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"బ్లూటూత్ LE ఆడియోను డిజేబుల్ చేయండి"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"పరికరం LE ఆడియో హార్డ్వేర్ సామర్థ్యాలను సపోర్ట్ చేస్తే బ్లూటూత్ LE ఆడియో ఫీచర్ని డిజేబుల్ చేస్తుంది."</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"పరికర వివరాలలో LE ఆడియో టోగుల్ను చూపండి"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"బ్లూటూత్ LE ఆడియో వైట్లిస్ట్ను ఎనేబుల్ చేయండి"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"బ్లూటూత్ LE ఆడియో వైట్లిస్ట్ ఫీచర్ను ఎనేబుల్ చేయండి."</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"మీడియా పరికరాలు"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"కాల్ పరికరాలు"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"ఇతర పరికరాలు"</string>
diff --git a/res/values-th/strings.xml b/res/values-th/strings.xml
index f5ac45e..5a25e63 100644
--- a/res/values-th/strings.xml
+++ b/res/values-th/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"ปิดใช้ Bluetooth LE Audio"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"ปิดใช้ฟีเจอร์ Bluetooth LE Audio หากอุปกรณ์รองรับความสามารถของฮาร์ดแวร์ LE Audio"</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"แสดงปุ่มสลับ LE Audio ในรายละเอียดอุปกรณ์"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"เปิดใช้รายการที่อนุญาต Bluetooth LE Audio"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"เปิดใช้ฟีเจอร์รายการที่อนุญาต Bluetooth LE Audio"</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"อุปกรณ์สื่อ"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"อุปกรณ์สำหรับโทร"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"อุปกรณ์อื่นๆ"</string>
diff --git a/res/values-tl/strings.xml b/res/values-tl/strings.xml
index 50d17ed..aadd20d 100644
--- a/res/values-tl/strings.xml
+++ b/res/values-tl/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"I-disable ang Bluetooth LE audio"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"Dini-disable ang feature na Bluetooth LE audio kung sinusuportahan ng device ang mga kakayahan ng LE audio hardware."</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"Ipakita ang toggle ng LE audio sa Mga Detalye ng Device"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"I-enable ang Allow List ng Bluetooth LE audio"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"I-enable ang feature ng allow list ng Bluetooth LE audio."</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"Mga media device"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"Mga device sa pagtawag"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"Iba pang device"</string>
diff --git a/res/values-tr/strings.xml b/res/values-tr/strings.xml
index 0e18374..5ea907c 100644
--- a/res/values-tr/strings.xml
+++ b/res/values-tr/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"Bluetooth LE Audio\'yu devre dışı bırak"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"Cihaz, LE Audio donanımı özelliklerini destekliyorsa Bluetooth LE Audio özelliğini devre dışı bırakır."</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"Cihaz Ayrıntıları\'nda LE Audio açma/kapatmayı göster"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"Bluetooth LE Audio İzin Verilenler Listesi\'ni etkinleştir"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"Bluetooth LE Audio izin verilenler listesi özelliğini etkinleştirin."</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"Medya cihazları"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"Cihazları ara"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"Diğer cihazlar"</string>
diff --git a/res/values-uk/strings.xml b/res/values-uk/strings.xml
index 844cfc7..c055d79 100644
--- a/res/values-uk/strings.xml
+++ b/res/values-uk/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"Вимкнути Bluetooth LE Audio"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"Вимикає функцію Bluetooth LE Audio, якщо пристрій підтримує апаратні можливості LE Audio."</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"Перемикач LE Audio в інф. про пристрій"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"Увімкнути список дозволів Bluetooth LE Audio"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"Увімкнути функцію списку дозволів Bluetooth LE Audio."</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"Носії"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"Пристрої для дзвінків"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"Інші пристрої"</string>
diff --git a/res/values-ur/strings.xml b/res/values-ur/strings.xml
index 7b70702..283fa30 100644
--- a/res/values-ur/strings.xml
+++ b/res/values-ur/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"بلوٹوتھ LE آڈیو غیر فعال کریں"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"اگر آلہ LE آڈیو ہارڈویئر کی صلاحیتوں کو سپورٹ کرتا ہے تو یہ بلوٹوتھ LE آڈیو خصوصیت کو غیر فعال کر دے گا۔"</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"آلے کی تفصیلات میں LE آڈیو ٹوگل کریں دکھائیں"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"بلوٹوتھ LE آڈیو اجازت یافتہ کی فہرست کو فعال کریں"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"بلوٹوتھ LE آڈیو اجازت یافتہ کی فہرست کی خصوصیت کو فعال کریں۔"</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"میڈیا آلات"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"کال آلات"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"دیگر آلات"</string>
diff --git a/res/values-uz/strings.xml b/res/values-uz/strings.xml
index 9391aba..22031ba 100644
--- a/res/values-uz/strings.xml
+++ b/res/values-uz/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"Bluetooth LE Audioni faolsizlantirish"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"Qurilmada LE audio apparatli taʼminoti boʻlsa, Bluetooth LE audio funksiyasi faolsizlantiriladi."</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"Qurilma axborotida LE audio tugmasi chiqsin"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"Bluetooth LE Audio ruxsat roʻyxatini yoqing"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"Bluetooth LE Audio ruxsat roʻyxati funksiyasini yoqing"</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"Media qurilmalar"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"Chaqiruv qurilmalari"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"Boshqa qurilmalar"</string>
diff --git a/res/values-vi/strings.xml b/res/values-vi/strings.xml
index 1e17934..a2194dc 100644
--- a/res/values-vi/strings.xml
+++ b/res/values-vi/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"Tắt âm thanh năng lượng thấp qua Bluetooth"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"Tắt tính năng âm thanh năng lượng thấp qua Bluetooth nếu thiết bị hỗ trợ chức năng phần cứng âm thanh năng lượng thấp."</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"Hiện nút bật/tắt Âm thanh năng lượng thấp"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"Bật danh sách cho phép Bluetooth Âm thanh năng lượng thấp"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"Bật tính năng danh sách cho phép Bluetooth Âm thanh năng lượng thấp."</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"Thiết bị truyền thông"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"Thiết bị gọi điện"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"Thiết bị khác"</string>
diff --git a/res/values-zh-rCN/strings.xml b/res/values-zh-rCN/strings.xml
index 9c46d5d..3d11455 100644
--- a/res/values-zh-rCN/strings.xml
+++ b/res/values-zh-rCN/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"停用蓝牙 LE 音频"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"如果设备支持 LE 音频硬件功能,则停用蓝牙 LE 音频功能。"</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"在“设备详细信息”中显示 LE 音频切换开关"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"启用蓝牙 LE 音频许可名单"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"启用蓝牙 LE 音频许可名单功能。"</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"媒体设备"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"通话设备"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"其他设备"</string>
diff --git a/res/values-zh-rHK/strings.xml b/res/values-zh-rHK/strings.xml
index b8195bb..b4490eb 100644
--- a/res/values-zh-rHK/strings.xml
+++ b/res/values-zh-rHK/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"停用藍牙 LE Audio"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"如果裝置支援 LE Audio 硬件功能,則停用藍牙 LE Audio 功能。"</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"在「裝置詳情」中顯示 LE Audio 切換按鈕"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"啟用藍牙 LE Audio 許可名單"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"啟用藍牙 LE Audio 許可名單功能。"</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"媒體裝置"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"通話裝置"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"其他裝置"</string>
diff --git a/res/values-zh-rTW/strings.xml b/res/values-zh-rTW/strings.xml
index a5e1e47..9749132 100644
--- a/res/values-zh-rTW/strings.xml
+++ b/res/values-zh-rTW/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"停用藍牙 LE Audio"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"如果裝置支援 LE Audio 硬體功能,就停用藍牙 LE Audio 功能。"</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"在「裝置詳細資料」中顯示 LE Audio 切換鈕"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"啟用藍牙 LE Audio 許可清單"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"啟用藍牙 LE Audio 許可清單功能。"</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"媒體裝置"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"通話裝置"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"其他裝置"</string>
diff --git a/res/values-zu/strings.xml b/res/values-zu/strings.xml
index e164a27..7ff428f 100644
--- a/res/values-zu/strings.xml
+++ b/res/values-zu/strings.xml
@@ -113,8 +113,6 @@
<string name="bluetooth_disable_leaudio" msgid="8619410595945155354">"Khubaza umsindo we-Bluetooth LE"</string>
<string name="bluetooth_disable_leaudio_summary" msgid="4756307633476985470">"Kukhubaza isakhi somsindo we-Bluetooth LE uma idivayisi isekela amakhono wehadiwe yomsindo we-LE."</string>
<string name="bluetooth_show_leaudio_device_details" msgid="3306637862550475370">"Bonisa ukuguqulwa komsindo we-LE Emininingwaneni Yedivayisi"</string>
- <string name="bluetooth_enable_leaudio_allow_list" msgid="1692999156437357534">"Nika amandla umsindo we-Bluetooth LE Uhlu Lokuvumela"</string>
- <string name="bluetooth_enable_leaudio_allow_list_summary" msgid="725601205276008525">"Nika amandla isakhi sohlu lokuvumela umsindo we-Bluetooth LE."</string>
<string name="connected_device_media_device_title" msgid="3783388247594566734">"Amadivayisi emidiya"</string>
<string name="connected_device_call_device_title" msgid="88732390601723608">"Shayela amadivayisi"</string>
<string name="connected_device_other_device_title" msgid="4652120430615729193">"Amanye amadivayisi"</string>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index b9e33ce..1ba0d37 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -244,10 +244,10 @@
<!-- Setting toggle title for enabling Bluetooth LE Audio toggle in Device Details. [CHAR LIMIT=40] -->
<string name="bluetooth_show_leaudio_device_details">Show LE audio toggle in Device Details</string>
- <!-- Setting toggle title for enabling Bluetooth LE Audio Allow List. [CHAR LIMIT=none] -->
- <string name="bluetooth_enable_leaudio_allow_list">Enable Bluetooth LE audio Allow List</string>
- <!-- Summary of toggle for enabling Bluetooth LE audio Allow List [CHAR LIMIT=none]-->
- <string name="bluetooth_enable_leaudio_allow_list_summary">Enable Bluetooth LE audio allow list feature.</string>
+ <!-- Setting toggle title for ignoring Bluetooth LE Audio Allowlist. [CHAR LIMIT=none] -->
+ <string name="bluetooth_bypass_leaudio_allowlist">Bypass Bluetooth LE Audio Allowlist</string>
+ <!-- Summary of toggle for ignoring Bluetooth LE Audio Allowlist [CHAR LIMIT=none]-->
+ <string name="bluetooth_bypass_leaudio_allowlist_summary">Use LE Audio by default even if LE Audio peripheral hasn\'t been verified to meet Allowlist criteria.</string>
<!-- Title for Bluetooth device group with media capability group [CHAR LIMIT=none]-->
<string name="connected_device_media_device_title">Media devices</string>
diff --git a/res/xml/development_settings.xml b/res/xml/development_settings.xml
index 4135750..234733b 100644
--- a/res/xml/development_settings.xml
+++ b/res/xml/development_settings.xml
@@ -362,9 +362,9 @@
android:title="@string/bluetooth_show_leaudio_device_details"/>
<SwitchPreference
- android:key="bluetooth_enable_leaudio_allow_list"
- android:title="@string/bluetooth_enable_leaudio_allow_list"
- android:summary="@string/bluetooth_enable_leaudio_allow_list_summary" />
+ android:key="bluetooth_bypass_leaudio_allowlist"
+ android:title="@string/bluetooth_bypass_leaudio_allowlist"
+ android:summary="@string/bluetooth_bypass_leaudio_allowlist_summary" />
<SwitchPreference
android:key="bluetooth_disable_le_audio_hw_offload"
diff --git a/res/xml/reset_dashboard_fragment.xml b/res/xml/reset_dashboard_fragment.xml
index 08852c9..cd1c671 100644
--- a/res/xml/reset_dashboard_fragment.xml
+++ b/res/xml/reset_dashboard_fragment.xml
@@ -30,11 +30,8 @@
android:fragment="com.android.settings.ResetNetwork" />
<!-- Bluetooth and WiFi reset -->
- <com.android.settingslib.RestrictedPreference
+ <com.android.settings.spa.preference.ComposePreference
android:key="network_reset_bluetooth_wifi_pref"
- android:title="@string/reset_bluetooth_wifi_title"
- settings:userRestriction="no_network_reset"
- settings:useAdminDisabledSummary="true"
settings:controller="com.android.settings.network.BluetoothWiFiResetPreferenceController" />
<!-- Reset app preferences -->
diff --git a/src/com/android/settings/DefaultRingtonePreference.java b/src/com/android/settings/DefaultRingtonePreference.java
index 9bf626c..4c65488 100644
--- a/src/com/android/settings/DefaultRingtonePreference.java
+++ b/src/com/android/settings/DefaultRingtonePreference.java
@@ -51,16 +51,9 @@
return;
}
- String mimeType = mUserContext.getContentResolver().getType(ringtoneUri);
- if (mimeType == null) {
+ if (!isValidRingtoneUri(ringtoneUri)) {
Log.e(TAG, "onSaveRingtone for URI:" + ringtoneUri
- + " ignored: failure to find mimeType (no access from this context?)");
- return;
- }
-
- if (!(mimeType.startsWith("audio/") || mimeType.equals("application/ogg"))) {
- Log.e(TAG, "onSaveRingtone for URI:" + ringtoneUri
- + " ignored: associated mimeType:" + mimeType + " is not an audio type");
+ + " ignored: invalid ringtone Uri");
return;
}
diff --git a/src/com/android/settings/RingtonePreference.java b/src/com/android/settings/RingtonePreference.java
index 8f9c618..de5b7c3 100644
--- a/src/com/android/settings/RingtonePreference.java
+++ b/src/com/android/settings/RingtonePreference.java
@@ -16,6 +16,8 @@
package com.android.settings;
+import android.content.ContentProvider;
+import android.content.ContentResolver;
import android.content.Context;
import android.content.Intent;
import android.content.res.TypedArray;
@@ -23,9 +25,11 @@
import android.media.RingtoneManager;
import android.net.Uri;
import android.os.UserHandle;
+import android.os.UserManager;
import android.provider.Settings.System;
import android.text.TextUtils;
import android.util.AttributeSet;
+import android.util.Log;
import androidx.preference.Preference;
import androidx.preference.PreferenceManager;
@@ -239,4 +243,83 @@
return true;
}
+ public boolean isDefaultRingtone(Uri ringtoneUri) {
+ // null URIs are valid (None/silence)
+ return ringtoneUri == null || RingtoneManager.isDefault(ringtoneUri);
+ }
+
+ protected boolean isValidRingtoneUri(Uri ringtoneUri) {
+ if (isDefaultRingtone(ringtoneUri)) {
+ return true;
+ }
+
+ // Return early for android resource URIs
+ if (ContentResolver.SCHEME_ANDROID_RESOURCE.equals(ringtoneUri.getScheme())) {
+ return true;
+ }
+
+ String mimeType = mUserContext.getContentResolver().getType(ringtoneUri);
+ if (mimeType == null) {
+ Log.e(TAG, "isValidRingtoneUri for URI:" + ringtoneUri
+ + " failed: failure to find mimeType (no access from this context?)");
+ return false;
+ }
+
+ if (!(mimeType.startsWith("audio/") || mimeType.equals("application/ogg")
+ || mimeType.equals("application/x-flac"))) {
+ Log.e(TAG, "isValidRingtoneUri for URI:" + ringtoneUri
+ + " failed: associated mimeType:" + mimeType + " is not an audio type");
+ return false;
+ }
+
+ // Validate userId from URIs: content://{userId}@...
+ final int userIdFromUri = ContentProvider.getUserIdFromUri(ringtoneUri, mUserId);
+ if (userIdFromUri != mUserId) {
+ final UserManager userManager = mUserContext.getSystemService(UserManager.class);
+
+ if (!userManager.isSameProfileGroup(mUserId, userIdFromUri)) {
+ Log.e(TAG,
+ "isValidRingtoneUri for URI:" + ringtoneUri + " failed: user " + userIdFromUri
+ + " and user " + mUserId + " are not in the same profile group");
+ return false;
+ }
+
+ final int parentUserId;
+ final int profileUserId;
+ if (userManager.isProfile()) {
+ profileUserId = mUserId;
+ parentUserId = userIdFromUri;
+ } else {
+ parentUserId = mUserId;
+ profileUserId = userIdFromUri;
+ }
+
+ final UserHandle parent = userManager.getProfileParent(UserHandle.of(profileUserId));
+ if (parent == null || parent.getIdentifier() != parentUserId) {
+ Log.e(TAG,
+ "isValidRingtoneUri for URI:" + ringtoneUri + " failed: user " + profileUserId
+ + " is not a profile of user " + parentUserId);
+ return false;
+ }
+
+ // Allow parent <-> managed profile sharing, unless restricted
+ if (userManager.hasUserRestrictionForUser(
+ UserManager.DISALLOW_SHARE_INTO_MANAGED_PROFILE, UserHandle.of(parentUserId))) {
+ Log.e(TAG,
+ "isValidRingtoneUri for URI:" + ringtoneUri + " failed: user " + parentUserId
+ + " has restriction: " + UserManager.DISALLOW_SHARE_INTO_MANAGED_PROFILE);
+ return false;
+ }
+
+ if (!(userManager.isManagedProfile(profileUserId) || userManager.getUserProperties(
+ UserHandle.of(profileUserId)).isMediaSharedWithParent())) {
+ Log.e(TAG, "isValidRingtoneUri for URI:" + ringtoneUri
+ + " failed: user " + profileUserId + " is not a cloned or managed profile");
+ return false;
+ }
+ }
+
+ return true;
+ }
+
}
diff --git a/src/com/android/settings/biometrics/fingerprint/FingerprintEnrollEnrolling.java b/src/com/android/settings/biometrics/fingerprint/FingerprintEnrollEnrolling.java
index be2a948..063d55d 100644
--- a/src/com/android/settings/biometrics/fingerprint/FingerprintEnrollEnrolling.java
+++ b/src/com/android/settings/biometrics/fingerprint/FingerprintEnrollEnrolling.java
@@ -68,10 +68,13 @@
import com.android.settings.biometrics.BiometricEnrollSidecar;
import com.android.settings.biometrics.BiometricUtils;
import com.android.settings.biometrics.BiometricsEnrollEnrolling;
+import com.android.settings.biometrics.fingerprint.feature.SfpsEnrollmentFeature;
import com.android.settings.core.instrumentation.InstrumentedDialogFragment;
+import com.android.settings.overlay.FeatureFactory;
import com.android.settingslib.display.DisplayDensityUtils;
import com.airbnb.lottie.LottieAnimationView;
+import com.airbnb.lottie.LottieComposition;
import com.airbnb.lottie.LottieCompositionFactory;
import com.airbnb.lottie.LottieProperty;
import com.airbnb.lottie.model.KeyPath;
@@ -84,6 +87,7 @@
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.List;
+import java.util.function.Function;
/**
* Activity which handles the actual enrolling for fingerprint.
@@ -99,27 +103,22 @@
private static final int PROGRESS_BAR_MAX = 10000;
- private static final int STAGE_UNKNOWN = -1;
+ public static final int STAGE_UNKNOWN = -1;
private static final int STAGE_CENTER = 0;
private static final int STAGE_GUIDED = 1;
private static final int STAGE_FINGERTIP = 2;
private static final int STAGE_LEFT_EDGE = 3;
private static final int STAGE_RIGHT_EDGE = 4;
- @VisibleForTesting
- protected static final int SFPS_STAGE_NO_ANIMATION = 0;
+ public static final int SFPS_STAGE_NO_ANIMATION = 0;
- @VisibleForTesting
- protected static final int SFPS_STAGE_CENTER = 1;
+ public static final int SFPS_STAGE_CENTER = 1;
- @VisibleForTesting
- protected static final int SFPS_STAGE_FINGERTIP = 2;
+ public static final int SFPS_STAGE_FINGERTIP = 2;
- @VisibleForTesting
- protected static final int SFPS_STAGE_LEFT_EDGE = 3;
+ public static final int SFPS_STAGE_LEFT_EDGE = 3;
- @VisibleForTesting
- protected static final int SFPS_STAGE_RIGHT_EDGE = 4;
+ public static final int SFPS_STAGE_RIGHT_EDGE = 4;
@IntDef({STAGE_UNKNOWN, STAGE_CENTER, STAGE_GUIDED, STAGE_FINGERTIP, STAGE_LEFT_EDGE,
STAGE_RIGHT_EDGE})
@@ -196,6 +195,9 @@
private OrientationEventListener mOrientationEventListener;
private int mPreviousRotation = 0;
+ @NonNull
+ private SfpsEnrollmentFeature mSfpsEnrollmentFeature = new EmptySfpsEnrollmentFeature();
+
@VisibleForTesting
protected boolean shouldShowLottie() {
DisplayDensityUtils displayDensity = new DisplayDensityUtils(getApplicationContext());
@@ -244,6 +246,8 @@
setContentView(layout);
setDescriptionText(R.string.security_settings_udfps_enroll_start_message);
} else if (mCanAssumeSfps) {
+ mSfpsEnrollmentFeature = FeatureFactory.getFeatureFactory()
+ .getFingerprintFeatureProvider().getSfpsEnrollmentFeature();
setContentView(R.layout.sfps_enroll_enrolling);
setHelpAnimation();
} else {
@@ -599,7 +603,8 @@
}
switch (getCurrentSfpsStage()) {
case SFPS_STAGE_NO_ANIMATION:
- setHeaderText(R.string.security_settings_fingerprint_enroll_repeat_title);
+ setHeaderText(mSfpsEnrollmentFeature
+ .getFeaturedStageHeaderResource(SFPS_STAGE_NO_ANIMATION));
if (!mHaveShownSfpsNoAnimationLottie && mIllustrationLottie != null) {
mHaveShownSfpsNoAnimationLottie = true;
mIllustrationLottie.setContentDescription(
@@ -608,39 +613,48 @@
0
)
);
- configureEnrollmentStage(R.raw.sfps_lottie_no_animation);
+ configureEnrollmentStage(mSfpsEnrollmentFeature
+ .getSfpsEnrollLottiePerStage(SFPS_STAGE_NO_ANIMATION));
}
break;
case SFPS_STAGE_CENTER:
- setHeaderText(R.string.security_settings_sfps_enroll_finger_center_title);
+ setHeaderText(mSfpsEnrollmentFeature
+ .getFeaturedStageHeaderResource(SFPS_STAGE_CENTER));
if (!mHaveShownSfpsCenterLottie && mIllustrationLottie != null) {
mHaveShownSfpsCenterLottie = true;
- configureEnrollmentStage(R.raw.sfps_lottie_pad_center);
+ configureEnrollmentStage(mSfpsEnrollmentFeature
+ .getSfpsEnrollLottiePerStage(SFPS_STAGE_CENTER));
}
break;
case SFPS_STAGE_FINGERTIP:
- setHeaderText(R.string.security_settings_sfps_enroll_fingertip_title);
+ setHeaderText(mSfpsEnrollmentFeature
+ .getFeaturedStageHeaderResource(SFPS_STAGE_FINGERTIP));
if (!mHaveShownSfpsTipLottie && mIllustrationLottie != null) {
mHaveShownSfpsTipLottie = true;
- configureEnrollmentStage(R.raw.sfps_lottie_tip);
+ configureEnrollmentStage(mSfpsEnrollmentFeature
+ .getSfpsEnrollLottiePerStage(SFPS_STAGE_FINGERTIP));
}
break;
case SFPS_STAGE_LEFT_EDGE:
- setHeaderText(R.string.security_settings_sfps_enroll_left_edge_title);
+ setHeaderText(mSfpsEnrollmentFeature
+ .getFeaturedStageHeaderResource(SFPS_STAGE_LEFT_EDGE));
if (!mHaveShownSfpsLeftEdgeLottie && mIllustrationLottie != null) {
mHaveShownSfpsLeftEdgeLottie = true;
- configureEnrollmentStage(R.raw.sfps_lottie_left_edge);
+ configureEnrollmentStage(mSfpsEnrollmentFeature
+ .getSfpsEnrollLottiePerStage(SFPS_STAGE_LEFT_EDGE));
}
break;
case SFPS_STAGE_RIGHT_EDGE:
- setHeaderText(R.string.security_settings_sfps_enroll_right_edge_title);
+ setHeaderText(mSfpsEnrollmentFeature
+ .getFeaturedStageHeaderResource(SFPS_STAGE_RIGHT_EDGE));
if (!mHaveShownSfpsRightEdgeLottie && mIllustrationLottie != null) {
mHaveShownSfpsRightEdgeLottie = true;
- configureEnrollmentStage(R.raw.sfps_lottie_right_edge);
+ configureEnrollmentStage(mSfpsEnrollmentFeature
+ .getSfpsEnrollLottiePerStage(SFPS_STAGE_RIGHT_EDGE));
}
break;
@@ -665,11 +679,16 @@
setDescriptionText("");
}
LottieCompositionFactory.fromRawRes(this, lottie)
- .addListener((c) -> {
- mIllustrationLottie.setComposition(c);
- mIllustrationLottie.setVisibility(View.VISIBLE);
- mIllustrationLottie.playAnimation();
- });
+ .addListener((c) -> onLottieComposition(mIllustrationLottie, c));
+ }
+
+ private void onLottieComposition(LottieAnimationView view, LottieComposition composition) {
+ if (view == null || composition == null) {
+ return;
+ }
+ view.setComposition(composition);
+ view.setVisibility(View.VISIBLE);
+ view.playAnimation();
}
@EnrollStage
@@ -699,17 +718,8 @@
}
final int progressSteps = mSidecar.getEnrollmentSteps() - mSidecar.getEnrollmentRemaining();
- if (progressSteps < getStageThresholdSteps(0)) {
- return SFPS_STAGE_NO_ANIMATION;
- } else if (progressSteps < getStageThresholdSteps(1)) {
- return SFPS_STAGE_CENTER;
- } else if (progressSteps < getStageThresholdSteps(2)) {
- return SFPS_STAGE_FINGERTIP;
- } else if (progressSteps < getStageThresholdSteps(3)) {
- return SFPS_STAGE_LEFT_EDGE;
- } else {
- return SFPS_STAGE_RIGHT_EDGE;
- }
+ return mSfpsEnrollmentFeature
+ .getCurrentSfpsEnrollStage(progressSteps, this::getStageThresholdSteps);
}
private boolean isStageHalfCompleted() {
@@ -740,22 +750,31 @@
Log.w(TAG, "getStageThresholdSteps: Enrollment not started yet");
return 1;
}
- return Math.round(mSidecar.getEnrollmentSteps()
- * mFingerprintManager.getEnrollStageThreshold(index));
+ final float threshold = mCanAssumeSfps
+ ? mSfpsEnrollmentFeature.getEnrollStageThreshold(this, index)
+ : mFingerprintManager.getEnrollStageThreshold(index);
+ return Math.round(mSidecar.getEnrollmentSteps() * threshold);
}
@Override
public void onEnrollmentHelp(int helpMsgId, CharSequence helpString) {
- if (!TextUtils.isEmpty(helpString)) {
+ final CharSequence featuredString = mCanAssumeSfps
+ ? mSfpsEnrollmentFeature.getFeaturedVendorString(this, helpMsgId, helpString)
+ : helpString;
+
+ if (!TextUtils.isEmpty(featuredString)) {
if (!(mCanAssumeUdfps || mCanAssumeSfps)) {
mErrorText.removeCallbacks(mTouchAgainRunnable);
}
- showError(helpString);
+ showError(featuredString);
if (mUdfpsEnrollHelper != null) mUdfpsEnrollHelper.onEnrollmentHelp();
}
dismissTouchDialogIfSfps();
+ if (mCanAssumeSfps) {
+ mSfpsEnrollmentFeature.handleOnEnrollmentHelp(helpMsgId, featuredString, () -> this);
+ }
}
@Override
@@ -1170,4 +1189,28 @@
return SettingsEnums.DIALOG_FINGERPRINT_ICON_TOUCH;
}
}
-}
\ No newline at end of file
+
+ private static class EmptySfpsEnrollmentFeature implements SfpsEnrollmentFeature {
+ private final String exceptionStr = "Assume sfps but no SfpsEnrollmentFeature impl.";
+
+ @Override
+ public int getCurrentSfpsEnrollStage(int progressSteps, Function<Integer, Integer> mapper) {
+ throw new IllegalStateException(exceptionStr);
+ }
+
+ @Override
+ public int getFeaturedStageHeaderResource(int stage) {
+ throw new IllegalStateException(exceptionStr);
+ }
+
+ @Override
+ public int getSfpsEnrollLottiePerStage(int stage) {
+ throw new IllegalStateException(exceptionStr);
+ }
+
+ @Override
+ public float getEnrollStageThreshold(@NonNull Context context, int index) {
+ throw new IllegalStateException(exceptionStr);
+ }
+ }
+}
diff --git a/src/com/android/settings/biometrics/fingerprint/FingerprintEnrollFindSensor.java b/src/com/android/settings/biometrics/fingerprint/FingerprintEnrollFindSensor.java
index c207ec9..cfd57d7 100644
--- a/src/com/android/settings/biometrics/fingerprint/FingerprintEnrollFindSensor.java
+++ b/src/com/android/settings/biometrics/fingerprint/FingerprintEnrollFindSensor.java
@@ -16,6 +16,8 @@
package com.android.settings.biometrics.fingerprint;
+import static android.text.Layout.HYPHENATION_FREQUENCY_NORMAL;
+
import android.app.settings.SettingsEnums;
import android.content.Intent;
import android.content.res.Configuration;
@@ -98,6 +100,7 @@
.setTheme(com.google.android.setupdesign.R.style.SudGlifButton_Secondary)
.build()
);
+ getLayout().getHeaderTextView().setHyphenationFrequency(HYPHENATION_FREQUENCY_NORMAL);
listenOrientationEvent();
diff --git a/src/com/android/settings/biometrics/fingerprint/FingerprintFeatureProvider.java b/src/com/android/settings/biometrics/fingerprint/FingerprintFeatureProvider.java
new file mode 100644
index 0000000..906f95a
--- /dev/null
+++ b/src/com/android/settings/biometrics/fingerprint/FingerprintFeatureProvider.java
@@ -0,0 +1,27 @@
+/*
+ * Copyright (C) 2023 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.biometrics.fingerprint;
+
+import com.android.settings.biometrics.fingerprint.feature.SfpsEnrollmentFeature;
+
+public interface FingerprintFeatureProvider {
+ /**
+ * Gets the feature implementation of SFPS enrollment.
+ * @return the feature implementation
+ */
+ SfpsEnrollmentFeature getSfpsEnrollmentFeature();
+}
diff --git a/src/com/android/settings/biometrics/fingerprint/FingerprintFeatureProviderImpl.java b/src/com/android/settings/biometrics/fingerprint/FingerprintFeatureProviderImpl.java
new file mode 100644
index 0000000..9745ca3
--- /dev/null
+++ b/src/com/android/settings/biometrics/fingerprint/FingerprintFeatureProviderImpl.java
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2023 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.biometrics.fingerprint;
+
+import androidx.annotation.Nullable;
+
+import com.android.settings.biometrics.fingerprint.feature.SfpsEnrollmentFeature;
+import com.android.settings.biometrics.fingerprint.feature.SfpsEnrollmentFeatureImpl;
+
+public class FingerprintFeatureProviderImpl implements FingerprintFeatureProvider {
+
+ @Nullable
+ private SfpsEnrollmentFeature mSfpsEnrollmentFeatureImpl = null;
+
+ @Override
+ public SfpsEnrollmentFeature getSfpsEnrollmentFeature() {
+ if (mSfpsEnrollmentFeatureImpl == null) {
+ mSfpsEnrollmentFeatureImpl = new SfpsEnrollmentFeatureImpl();
+ }
+ return mSfpsEnrollmentFeatureImpl;
+ }
+}
diff --git a/src/com/android/settings/biometrics/fingerprint/feature/SfpsEnrollmentFeature.java b/src/com/android/settings/biometrics/fingerprint/feature/SfpsEnrollmentFeature.java
new file mode 100644
index 0000000..a1a18e5
--- /dev/null
+++ b/src/com/android/settings/biometrics/fingerprint/feature/SfpsEnrollmentFeature.java
@@ -0,0 +1,79 @@
+/*
+ * Copyright (C) 2023 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.biometrics.fingerprint.feature;
+
+import android.content.Context;
+
+import androidx.annotation.NonNull;
+
+import com.android.settings.biometrics.fingerprint.FingerprintEnrollEnrolling;
+
+import java.util.function.Function;
+import java.util.function.Supplier;
+
+public interface SfpsEnrollmentFeature {
+
+ /**
+ * Gets current SFPS enrollment stage.
+ * @param progressSteps current step of enrollment
+ * @param mapper a mapper to map each stage to its threshold
+ * @return current enrollment stage
+ */
+ int getCurrentSfpsEnrollStage(int progressSteps, Function<Integer, Integer> mapper);
+
+ /**
+ * Gets the vendor string by feature.
+ * @param context Context
+ * @param id An integer identifying the error message
+ * @param msg A human-readable string that can be shown in UI
+ * @return A human-readable string of specific feature
+ */
+ default CharSequence getFeaturedVendorString(Context context, int id, CharSequence msg) {
+ return msg;
+ }
+
+ /**
+ * Gets the stage header string by feature.
+ * @param stage the specific stage
+ * @return the resource id of the header text of the specific stage
+ */
+ int getFeaturedStageHeaderResource(int stage);
+
+ /**
+ * Gets the enrollment lottie resource id per stage
+ * @param stage current enrollment stage
+ * @return enrollment lottie resource id
+ */
+ int getSfpsEnrollLottiePerStage(int stage);
+
+ /**
+ * Handles extra stuffs on receiving enrollment help.
+ * @param helpMsgId help message id
+ * @param helpString help message
+ * @param enrollingSupplier supplier of enrolling context
+ */
+ default void handleOnEnrollmentHelp(int helpMsgId, CharSequence helpString,
+ Supplier<FingerprintEnrollEnrolling> enrollingSupplier) {}
+
+ /**
+ * Gets the fingerprint enrollment threshold.
+ * @param context context
+ * @param index the enrollment stage index
+ * @return threshold
+ */
+ float getEnrollStageThreshold(@NonNull Context context, int index);
+}
diff --git a/src/com/android/settings/biometrics/fingerprint/feature/SfpsEnrollmentFeatureImpl.java b/src/com/android/settings/biometrics/fingerprint/feature/SfpsEnrollmentFeatureImpl.java
new file mode 100644
index 0000000..5a97537
--- /dev/null
+++ b/src/com/android/settings/biometrics/fingerprint/feature/SfpsEnrollmentFeatureImpl.java
@@ -0,0 +1,91 @@
+/*
+ * Copyright (C) 2023 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.biometrics.fingerprint.feature;
+
+import static com.android.settings.biometrics.fingerprint.FingerprintEnrollEnrolling.SFPS_STAGE_CENTER;
+import static com.android.settings.biometrics.fingerprint.FingerprintEnrollEnrolling.SFPS_STAGE_FINGERTIP;
+import static com.android.settings.biometrics.fingerprint.FingerprintEnrollEnrolling.SFPS_STAGE_LEFT_EDGE;
+import static com.android.settings.biometrics.fingerprint.FingerprintEnrollEnrolling.SFPS_STAGE_NO_ANIMATION;
+import static com.android.settings.biometrics.fingerprint.FingerprintEnrollEnrolling.SFPS_STAGE_RIGHT_EDGE;
+import static com.android.settings.biometrics.fingerprint.FingerprintEnrollEnrolling.STAGE_UNKNOWN;
+
+import android.content.Context;
+import android.hardware.fingerprint.FingerprintManager;
+
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+
+import com.android.settings.R;
+
+import java.util.function.Function;
+
+public class SfpsEnrollmentFeatureImpl implements SfpsEnrollmentFeature {
+
+ @Nullable
+ private FingerprintManager mFingerprintManager = null;
+
+ @Override
+ public int getCurrentSfpsEnrollStage(int progressSteps, Function<Integer, Integer> mapper) {
+ if (mapper == null) {
+ return STAGE_UNKNOWN;
+ }
+ if (progressSteps < mapper.apply(0)) {
+ return SFPS_STAGE_NO_ANIMATION;
+ } else if (progressSteps < mapper.apply(1)) {
+ return SFPS_STAGE_CENTER;
+ } else if (progressSteps < mapper.apply(2)) {
+ return SFPS_STAGE_FINGERTIP;
+ } else if (progressSteps < mapper.apply(3)) {
+ return SFPS_STAGE_LEFT_EDGE;
+ } else {
+ return SFPS_STAGE_RIGHT_EDGE;
+ }
+ }
+
+ @Override
+ public int getFeaturedStageHeaderResource(int stage) {
+ return switch (stage) {
+ case SFPS_STAGE_NO_ANIMATION
+ -> R.string.security_settings_fingerprint_enroll_repeat_title;
+ case SFPS_STAGE_CENTER -> R.string.security_settings_sfps_enroll_finger_center_title;
+ case SFPS_STAGE_FINGERTIP -> R.string.security_settings_sfps_enroll_fingertip_title;
+ case SFPS_STAGE_LEFT_EDGE -> R.string.security_settings_sfps_enroll_left_edge_title;
+ case SFPS_STAGE_RIGHT_EDGE -> R.string.security_settings_sfps_enroll_right_edge_title;
+ default -> throw new IllegalArgumentException("Invalid stage: " + stage);
+ };
+ }
+
+ @Override
+ public int getSfpsEnrollLottiePerStage(int stage) {
+ return switch (stage) {
+ case SFPS_STAGE_NO_ANIMATION -> R.raw.sfps_lottie_no_animation;
+ case SFPS_STAGE_CENTER -> R.raw.sfps_lottie_pad_center;
+ case SFPS_STAGE_FINGERTIP -> R.raw.sfps_lottie_tip;
+ case SFPS_STAGE_LEFT_EDGE -> R.raw.sfps_lottie_left_edge;
+ case SFPS_STAGE_RIGHT_EDGE -> R.raw.sfps_lottie_right_edge;
+ default -> throw new IllegalArgumentException("Invalid stage: " + stage);
+ };
+ }
+
+ @Override
+ public float getEnrollStageThreshold(@NonNull Context context, int index) {
+ if (mFingerprintManager == null) {
+ mFingerprintManager = context.getSystemService(FingerprintManager.class);
+ }
+ return mFingerprintManager.getEnrollStageThreshold(index);
+ }
+}
diff --git a/src/com/android/settings/biometrics/fingerprint2/ui/enrollment/fragment/FingerprintEnrollFindSensorV2Fragment.kt b/src/com/android/settings/biometrics/fingerprint2/ui/enrollment/fragment/FingerprintEnrollFindSensorV2Fragment.kt
index dcdcccf..0afa613 100644
--- a/src/com/android/settings/biometrics/fingerprint2/ui/enrollment/fragment/FingerprintEnrollFindSensorV2Fragment.kt
+++ b/src/com/android/settings/biometrics/fingerprint2/ui/enrollment/fragment/FingerprintEnrollFindSensorV2Fragment.kt
@@ -34,7 +34,6 @@
import com.google.android.setupcompat.template.FooterBarMixin
import com.google.android.setupcompat.template.FooterButton
import com.google.android.setupdesign.GlifLayout
-import kotlinx.coroutines.flow.collect
import kotlinx.coroutines.launch
private const val TAG = "FingerprintEnrollFindSensorV2Fragment"
@@ -94,12 +93,12 @@
// Set up lottie or animation
lifecycleScope.launch {
- viewModel.showSfpsLottie.collect { (isFolded, rotation) ->
+ viewModel.sfpsLottieInfo.collect { (isFolded, rotation) ->
setupLottie(view, getSfpsIllustrationLottieAnimation(isFolded, rotation))
}
}
lifecycleScope.launch {
- viewModel.showUdfpsLottie.collect { isAccessibilityEnabled ->
+ viewModel.udfpsLottieInfo.collect { isAccessibilityEnabled ->
val lottieAnimation =
if (isAccessibilityEnabled) R.raw.udfps_edu_a11y_lottie else R.raw.udfps_edu_lottie
setupLottie(view, lottieAnimation) { viewModel.proceedToEnrolling() }
diff --git a/src/com/android/settings/biometrics/fingerprint2/ui/enrollment/fragment/FingerprintEnrollIntroV2Fragment.kt b/src/com/android/settings/biometrics/fingerprint2/ui/enrollment/fragment/FingerprintEnrollIntroV2Fragment.kt
index 898b158..4024692 100644
--- a/src/com/android/settings/biometrics/fingerprint2/ui/enrollment/fragment/FingerprintEnrollIntroV2Fragment.kt
+++ b/src/com/android/settings/biometrics/fingerprint2/ui/enrollment/fragment/FingerprintEnrollIntroV2Fragment.kt
@@ -186,6 +186,9 @@
return view
}
+ /**
+ * TODO (b/305269201): This link isn't displaying for screenshot tests.
+ */
private fun setFooterLink(view: View) {
val footerLink: TextView = view.requireViewById(R.id.footer_learn_more)
footerLink.movementMethod = LinkMovementMethod.getInstance()
diff --git a/src/com/android/settings/biometrics/fingerprint2/ui/enrollment/viewmodel/FingerprintEnrollFindSensorViewModel.kt b/src/com/android/settings/biometrics/fingerprint2/ui/enrollment/viewmodel/FingerprintEnrollFindSensorViewModel.kt
index 17f8132..90aefc8 100644
--- a/src/com/android/settings/biometrics/fingerprint2/ui/enrollment/viewmodel/FingerprintEnrollFindSensorViewModel.kt
+++ b/src/com/android/settings/biometrics/fingerprint2/ui/enrollment/viewmodel/FingerprintEnrollFindSensorViewModel.kt
@@ -26,13 +26,12 @@
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.SharingStarted
-import kotlinx.coroutines.flow.collect
import kotlinx.coroutines.flow.combine
import kotlinx.coroutines.flow.combineTransform
+import kotlinx.coroutines.flow.filter
import kotlinx.coroutines.flow.filterNotNull
import kotlinx.coroutines.flow.map
import kotlinx.coroutines.flow.shareIn
-import kotlinx.coroutines.flow.transform
import kotlinx.coroutines.flow.update
import kotlinx.coroutines.launch
@@ -47,41 +46,43 @@
) : ViewModel() {
/** Represents the stream of sensor type. */
val sensorType: Flow<FingerprintSensorType> =
- fingerprintEnrollViewModel.sensorType
- .filterWhenEducationIsShown()
- .shareIn(viewModelScope, SharingStarted.WhileSubscribed(), 1)
+ fingerprintEnrollViewModel.sensorType.shareIn(
+ viewModelScope,
+ SharingStarted.WhileSubscribed(),
+ 1
+ )
private val _isUdfps: Flow<Boolean> =
sensorType.map {
it == FingerprintSensorType.UDFPS_OPTICAL || it == FingerprintSensorType.UDFPS_ULTRASONIC
}
private val _isSfps: Flow<Boolean> = sensorType.map { it == FingerprintSensorType.POWER_BUTTON }
- private val _isRearSfps: Flow<Boolean> =
- combineTransform(_isSfps, _isUdfps) { v1, v2 -> !v1 && !v2 }
+ private val _isRearSfps: Flow<Boolean> = sensorType.map { it == FingerprintSensorType.REAR }
/** Represents the stream of showing primary button. */
- val showPrimaryButton: Flow<Boolean> = _isUdfps.transform { if (it) emit(true) }
+ val showPrimaryButton: Flow<Boolean> = _isUdfps.filter { it }
- /** Represents the stream of showing sfps lottie, Pair(isFolded, rotation). */
- val showSfpsLottie: Flow<Pair<Boolean, Int>> =
+ private val _showSfpsLottie = _isSfps.filter { it }
+ /** Represents the stream of showing sfps lottie and the information Pair(isFolded, rotation). */
+ val sfpsLottieInfo: Flow<Pair<Boolean, Int>> =
combineTransform(
- _isSfps,
+ _showSfpsLottie,
foldStateViewModel.isFolded,
orientationStateViewModel.rotation,
- ) { isSfps, isFolded, rotation ->
- if (isSfps) emit(Pair(isFolded, rotation))
+ ) { _, isFolded, rotation ->
+ emit(Pair(isFolded, rotation))
}
- /** Represents the stream of showing udfps lottie. */
- val showUdfpsLottie: Flow<Boolean> =
- combineTransform(
- _isUdfps,
- accessibilityViewModel.isAccessibilityEnabled,
- ) { isUdfps, isAccessibilityEnabled ->
- if (isUdfps) emit(isAccessibilityEnabled)
+ private val _showUdfpsLottie = _isUdfps.filter { it }
+ /** Represents the stream of showing udfps lottie and whether accessibility is enabled. */
+ val udfpsLottieInfo: Flow<Boolean> =
+ _showUdfpsLottie.combine(accessibilityViewModel.isAccessibilityEnabled) {
+ _,
+ isAccessibilityEnabled ->
+ isAccessibilityEnabled
}
/** Represents the stream of showing rfps animation. */
- val showRfpsAnimation: Flow<Boolean> = _isRearSfps.transform { if (it) emit(true) }
+ val showRfpsAnimation: Flow<Boolean> = _isRearSfps.filter { it }
private val _showErrorDialog: MutableStateFlow<Pair<Int, Boolean>?> = MutableStateFlow(null)
/** Represents the stream of showing error dialog. */
@@ -145,16 +146,6 @@
navigationViewModel.nextStep()
}
- // TODO: If we decide to remove previous fragment from activity, then we don't need to check
- // whether education is shown for the flows that are subscribed by
- // [FingerprintEnrollFindSensorV2Fragment].
- private fun <T> Flow<T>.filterWhenEducationIsShown() =
- combineTransform(navigationViewModel.navigationViewModel) { value, navigationViewModel ->
- if (navigationViewModel.currStep == Education) {
- emit(value)
- }
- }
-
class FingerprintEnrollFindSensorViewModelFactory(
private val navigationViewModel: FingerprintEnrollNavigationViewModel,
private val fingerprintEnrollViewModel: FingerprintEnrollViewModel,
diff --git a/src/com/android/settings/bluetooth/BluetoothDetailsDataSyncController.java b/src/com/android/settings/bluetooth/BluetoothDetailsDataSyncController.java
index a8cd85f..81c5689 100644
--- a/src/com/android/settings/bluetooth/BluetoothDetailsDataSyncController.java
+++ b/src/com/android/settings/bluetooth/BluetoothDetailsDataSyncController.java
@@ -112,6 +112,11 @@
mPreferenceCategory.addPreference(permSyncPref);
}
+ if (mAssociationId == DUMMY_ASSOCIATION_ID) {
+ permSyncPref.setVisible(false);
+ return;
+ }
+
boolean visible = false;
boolean checked = false;
PermissionSyncRequest request = mCompanionDeviceManager.getPermissionSyncRequest(
diff --git a/src/com/android/settings/bluetooth/BluetoothDetailsProfilesController.java b/src/com/android/settings/bluetooth/BluetoothDetailsProfilesController.java
index f473f2c..61e0a75 100644
--- a/src/com/android/settings/bluetooth/BluetoothDetailsProfilesController.java
+++ b/src/com/android/settings/bluetooth/BluetoothDetailsProfilesController.java
@@ -16,11 +16,14 @@
package com.android.settings.bluetooth;
+import static android.bluetooth.BluetoothDevice.METADATA_MODEL_NAME;
+
import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothProfile;
import android.content.Context;
import android.os.SystemProperties;
import android.provider.DeviceConfig;
+import android.sysprop.BluetoothProperties;
import android.text.TextUtils;
import android.util.Log;
@@ -34,6 +37,7 @@
import com.android.settings.R;
import com.android.settings.core.SettingsUIDeviceConfig;
import com.android.settingslib.bluetooth.A2dpProfile;
+import com.android.settingslib.bluetooth.BluetoothUtils;
import com.android.settingslib.bluetooth.CachedBluetoothDevice;
import com.android.settingslib.bluetooth.HeadsetProfile;
import com.android.settingslib.bluetooth.LeAudioProfile;
@@ -68,7 +72,8 @@
private static final String ENABLE_DUAL_MODE_AUDIO =
"persist.bluetooth.enable_dual_mode_audio";
- private static final String CONFIG_LE_AUDIO_ENABLED_BY_DEFAULT = "le_audio_enabled_by_default";
+ private static final String LE_AUDIO_CONNECTION_BY_DEFAULT_PROPERTY =
+ "ro.bluetooth.leaudio.le_audio_connection_by_default";
private static final boolean LE_AUDIO_TOGGLE_VISIBLE_DEFAULT_VALUE = true;
private static final String LE_AUDIO_TOGGLE_VISIBLE_PROPERTY =
"persist.bluetooth.leaudio.toggle_visible";
@@ -120,13 +125,29 @@
pref.setOnPreferenceClickListener(this);
pref.setOrder(profile.getOrdinal());
- if (profile instanceof LeAudioProfile) {
+ if (profile instanceof LeAudioProfile && !isModelNameInAllowList(
+ BluetoothUtils.getStringMetaData(mCachedDevice.getDevice(),
+ METADATA_MODEL_NAME))) {
pref.setSummary(R.string.device_details_leaudio_toggle_summary);
}
return pref;
}
/**
+ * Checks if the device model name is in the LE audio allow list based on its model name.
+ *
+ * @param modelName The model name of the device to be checked.
+ * @return true if the device is in the allow list, false otherwise.
+ */
+ @VisibleForTesting
+ boolean isModelNameInAllowList(String modelName) {
+ if (modelName == null || modelName.isEmpty()) {
+ return false;
+ }
+ return BluetoothProperties.le_audio_allow_list().contains(modelName);
+ }
+
+ /**
* Refreshes the state for an existing SwitchPreference for a profile.
*/
private void refreshProfilePreference(SwitchPreference profilePref,
@@ -469,12 +490,12 @@
SettingsUIDeviceConfig.BT_LE_AUDIO_CONTACT_SHARING_ENABLED, true);
boolean isLeAudioToggleVisible = SystemProperties.getBoolean(
LE_AUDIO_TOGGLE_VISIBLE_PROPERTY, LE_AUDIO_TOGGLE_VISIBLE_DEFAULT_VALUE);
- boolean isLeEnabledByDefault = DeviceConfig.getBoolean(DeviceConfig.NAMESPACE_BLUETOOTH,
- CONFIG_LE_AUDIO_ENABLED_BY_DEFAULT, false);
+ boolean isLeEnabledByDefault =
+ SystemProperties.getBoolean(LE_AUDIO_CONNECTION_BY_DEFAULT_PROPERTY, true);
mIsLeAudioToggleEnabled = isLeAudioToggleVisible || isLeEnabledByDefault;
Log.d(TAG, "BT_LE_AUDIO_CONTACT_SHARING_ENABLED:" + mIsLeContactSharingEnabled
+ ", LE_AUDIO_TOGGLE_VISIBLE_PROPERTY:" + isLeAudioToggleVisible
- + ", CONFIG_LE_AUDIO_ENABLED_BY_DEFAULT:" + isLeEnabledByDefault);
+ + ", LE_AUDIO_CONNECTION_BY_DEFAULT_PROPERTY:" + isLeEnabledByDefault);
}
@Override
diff --git a/src/com/android/settings/datausage/AppDataUsage.java b/src/com/android/settings/datausage/AppDataUsage.java
index 4c0b516..38f09f4 100644
--- a/src/com/android/settings/datausage/AppDataUsage.java
+++ b/src/com/android/settings/datausage/AppDataUsage.java
@@ -261,6 +261,7 @@
return Unit.INSTANCE;
});
if (mCycles != null) {
+ Log.d(TAG, "setInitialCycles: " + mCycles + " " + mSelectedCycle);
controller.setInitialCycles(mCycles, mSelectedCycle);
}
}
diff --git a/src/com/android/settings/datausage/AppDataUsageListController.kt b/src/com/android/settings/datausage/AppDataUsageListController.kt
index 85a6e92..746782a 100644
--- a/src/com/android/settings/datausage/AppDataUsageListController.kt
+++ b/src/com/android/settings/datausage/AppDataUsageListController.kt
@@ -17,9 +17,7 @@
package com.android.settings.datausage
import android.content.Context
-import android.util.SparseBooleanArray
import androidx.annotation.OpenForTesting
-import androidx.core.util.keyIterator
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.LifecycleOwner
import androidx.lifecycle.lifecycleScope
@@ -27,8 +25,6 @@
import androidx.preference.PreferenceGroup
import androidx.preference.PreferenceScreen
import com.android.settings.core.BasePreferenceController
-import com.android.settings.datausage.lib.AppDataUsageRepository.Companion.getAppUid
-import com.android.settings.datausage.lib.AppDataUsageRepository.Companion.getAppUidList
import com.android.settings.datausage.lib.AppPreferenceRepository
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
diff --git a/src/com/android/settings/datausage/ChartDataUsagePreferenceController.kt b/src/com/android/settings/datausage/ChartDataUsagePreferenceController.kt
index 49235b5..5149af0 100644
--- a/src/com/android/settings/datausage/ChartDataUsagePreferenceController.kt
+++ b/src/com/android/settings/datausage/ChartDataUsagePreferenceController.kt
@@ -26,6 +26,7 @@
import androidx.preference.PreferenceScreen
import com.android.settings.core.BasePreferenceController
import com.android.settings.datausage.lib.INetworkCycleDataRepository
+import com.android.settings.datausage.lib.NetworkCycleChartData
import com.android.settings.datausage.lib.NetworkCycleDataRepository
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
@@ -72,6 +73,7 @@
fun update(startTime: Long, endTime: Long) {
preference.setTime(startTime, endTime)
+ preference.setNetworkCycleData(NetworkCycleChartData.AllZero)
lifecycleScope.launch {
val chartData = withContext(Dispatchers.Default) {
repository.queryChartData(startTime, endTime)
diff --git a/src/com/android/settings/datausage/DataUsageList.kt b/src/com/android/settings/datausage/DataUsageList.kt
index 1eb883c..7240150 100644
--- a/src/com/android/settings/datausage/DataUsageList.kt
+++ b/src/com/android/settings/datausage/DataUsageList.kt
@@ -55,9 +55,6 @@
@VisibleForTesting
var subId = SubscriptionManager.INVALID_SUBSCRIPTION_ID
- // Spinner will keep the selected cycle even after paused, this only keeps the displayed cycle,
- // which need be cleared when resumed.
- private var lastDisplayedUsageData: NetworkUsageData? = null
private lateinit var usageAmount: Preference
private var subscriptionInfoEntity: SubscriptionInfoEntity? = null
private lateinit var dataUsageListAppsController: DataUsageListAppsController
@@ -77,7 +74,7 @@
finish()
return
}
- billingCycleRepository = createBillingCycleRepository();
+ billingCycleRepository = createBillingCycleRepository()
if (!billingCycleRepository.isBandwidthControlEnabled()) {
Log.w(TAG, "No bandwidth control; leaving")
finish()
@@ -120,7 +117,6 @@
override fun onResume() {
super.onResume()
dataStateListener.start(subId)
- lastDisplayedUsageData = null
updatePolicy()
}
@@ -188,11 +184,6 @@
* Updates the chart and detail data when initial loaded or selected cycle changed.
*/
private fun updateSelectedCycle(usageData: NetworkUsageData) {
- if (usageData == lastDisplayedUsageData) {
- // Avoid duplicate update to avoid page flash.
- return
- }
- lastDisplayedUsageData = usageData
Log.d(TAG, "showing cycle $usageData")
usageAmount.title = usageData.getDataUsedString(requireContext())
diff --git a/src/com/android/settings/datausage/DataUsageListHeaderController.kt b/src/com/android/settings/datausage/DataUsageListHeaderController.kt
index 58fc3b5..ad76ede 100644
--- a/src/com/android/settings/datausage/DataUsageListHeaderController.kt
+++ b/src/com/android/settings/datausage/DataUsageListHeaderController.kt
@@ -45,7 +45,7 @@
sourceMetricsCategory: Int,
viewLifecycleOwner: LifecycleOwner,
private val onCyclesLoad: (usageDataList: List<NetworkUsageData>) -> Unit,
- private val onItemSelected: (usageData: NetworkUsageData) -> Unit,
+ private val updateSelectedCycle: (usageData: NetworkUsageData) -> Unit,
private val repository: INetworkCycleDataRepository =
NetworkCycleDataRepository(header.context, template),
) {
@@ -53,6 +53,17 @@
private val configureButton: View = header.requireViewById(R.id.filter_settings)
private val cycleSpinner: Spinner = header.requireViewById(R.id.filter_spinner)
+
+ private val cycleListener = object : AdapterView.OnItemSelectedListener {
+ override fun onItemSelected(parent: AdapterView<*>?, view: View?, position: Int, id: Long) {
+ setSelectedCycle(position)
+ }
+
+ override fun onNothingSelected(parent: AdapterView<*>?) {
+ // ignored
+ }
+ }
+
private val cycleAdapter = CycleAdapter(context, object : SpinnerInterface {
override fun setAdapter(cycleAdapter: CycleAdapter) {
cycleSpinner.adapter = cycleAdapter
@@ -62,21 +73,15 @@
override fun setSelection(position: Int) {
cycleSpinner.setSelection(position)
- }
- })
- private var cycles: List<NetworkUsageData> = emptyList()
-
- private val cycleListener = object : AdapterView.OnItemSelectedListener {
- override fun onItemSelected(parent: AdapterView<*>?, view: View?, position: Int, id: Long) {
- if (0 <= position && position < cycleAdapter.count) {
- cycles.getOrNull(position)?.let(onItemSelected)
+ if (cycleSpinner.onItemSelectedListener == null) {
+ cycleSpinner.onItemSelectedListener = cycleListener
+ } else {
+ setSelectedCycle(position)
}
}
+ })
- override fun onNothingSelected(parent: AdapterView<*>?) {
- // ignored
- }
- }
+ private var cycles: List<NetworkUsageData> = emptyList()
init {
configureButton.setOnClickListener {
@@ -114,11 +119,12 @@
}
private fun updateCycleData() {
- cycleSpinner.onItemSelectedListener = cycleListener
- // calculate policy cycles based on available data
- // generate cycle list based on policy and available history
cycleAdapter.updateCycleList(cycles.map { Range(it.startTime, it.endTime) })
cycleSpinner.visibility = View.VISIBLE
onCyclesLoad(cycles)
}
+
+ private fun setSelectedCycle(position: Int) {
+ cycles.getOrNull(position)?.let(updateSelectedCycle)
+ }
}
diff --git a/src/com/android/settings/datausage/lib/AppDataUsageDetailsRepository.kt b/src/com/android/settings/datausage/lib/AppDataUsageDetailsRepository.kt
index 94801ef..cd3372f 100644
--- a/src/com/android/settings/datausage/lib/AppDataUsageDetailsRepository.kt
+++ b/src/com/android/settings/datausage/lib/AppDataUsageDetailsRepository.kt
@@ -20,11 +20,8 @@
import android.content.Context
import android.net.NetworkTemplate
import android.util.Range
-import androidx.annotation.VisibleForTesting
import com.android.settings.datausage.lib.AppDataUsageRepository.Companion.withSdkSandboxUids
-import kotlinx.coroutines.async
-import kotlinx.coroutines.awaitAll
-import kotlinx.coroutines.coroutineScope
+import com.android.settingslib.spa.framework.util.asyncMap
interface IAppDataUsageDetailsRepository {
suspend fun queryDetailsForCycles(): List<NetworkUsageDetailsData>
@@ -37,32 +34,24 @@
uids: List<Int>,
private val networkCycleDataRepository: INetworkCycleDataRepository =
NetworkCycleDataRepository(context, template),
+ private val networkStatsRepository: NetworkStatsRepository =
+ NetworkStatsRepository(context, template),
) : IAppDataUsageDetailsRepository {
private val withSdkSandboxUids = withSdkSandboxUids(uids)
- private val networkStatsRepository = NetworkStatsRepository(context, template)
- override suspend fun queryDetailsForCycles(): List<NetworkUsageDetailsData> = coroutineScope {
- getCycles().map {
- async {
- queryDetails(it)
- }
- }.awaitAll().filter { it.totalUsage > 0 }
- }
+ override suspend fun queryDetailsForCycles(): List<NetworkUsageDetailsData> =
+ getCycles().asyncMap { queryDetails(it) }.filter { it.totalUsage > 0 }
private fun getCycles(): List<Range<Long>> =
cycles?.zipWithNext { endTime, startTime -> Range(startTime, endTime) }
?: networkCycleDataRepository.getCycles()
private fun queryDetails(range: Range<Long>): NetworkUsageDetailsData {
- var totalUsage = 0L
- var foregroundUsage = 0L
- for (uid in withSdkSandboxUids) {
- val usage = getUsage(range, uid, NetworkStats.Bucket.STATE_ALL)
- if (usage > 0L) {
- totalUsage += usage
- foregroundUsage += getUsage(range, uid, NetworkStats.Bucket.STATE_FOREGROUND)
- }
- }
+ val buckets = networkStatsRepository.queryBuckets(range.lower, range.upper)
+ .filter { it.uid in withSdkSandboxUids }
+ val totalUsage = buckets.sumOf { it.bytes }
+ val foregroundUsage =
+ buckets.filter { it.state == NetworkStats.Bucket.STATE_FOREGROUND }.sumOf { it.bytes }
return NetworkUsageDetailsData(
range = range,
totalUsage = totalUsage,
@@ -70,8 +59,4 @@
backgroundUsage = totalUsage - foregroundUsage,
)
}
-
- @VisibleForTesting
- fun getUsage(range: Range<Long>, uid: Int, state: Int): Long =
- networkStatsRepository.queryAggregateForUid(range, uid, state)?.usage ?: 0
}
diff --git a/src/com/android/settings/datausage/lib/AppDataUsageRepository.kt b/src/com/android/settings/datausage/lib/AppDataUsageRepository.kt
index de90594..1844a7a 100644
--- a/src/com/android/settings/datausage/lib/AppDataUsageRepository.kt
+++ b/src/com/android/settings/datausage/lib/AppDataUsageRepository.kt
@@ -41,7 +41,7 @@
private val networkStatsRepository = NetworkStatsRepository(context, template)
fun getAppPercent(carrierId: Int?, startTime: Long, endTime: Long): List<Pair<AppItem, Int>> {
- val buckets = networkStatsRepository.querySummary(startTime, endTime)
+ val buckets = networkStatsRepository.queryBuckets(startTime, endTime)
return getAppPercent(carrierId, buckets)
}
@@ -98,7 +98,7 @@
private fun bindStats(
buckets: List<Bucket>,
- profiles: MutableList<UserHandle>,
+ profiles: List<UserHandle>,
knownItems: SparseArray<AppItem>,
items: ArrayList<AppItem>,
) {
diff --git a/src/com/android/settings/datausage/lib/AppDataUsageSummaryRepository.kt b/src/com/android/settings/datausage/lib/AppDataUsageSummaryRepository.kt
index 5579de0..b723e27 100644
--- a/src/com/android/settings/datausage/lib/AppDataUsageSummaryRepository.kt
+++ b/src/com/android/settings/datausage/lib/AppDataUsageSummaryRepository.kt
@@ -20,9 +20,7 @@
import android.net.NetworkTemplate
import com.android.settings.datausage.lib.AppDataUsageRepository.Companion.withSdkSandboxUids
import com.android.settings.datausage.lib.NetworkStatsRepository.Companion.AllTimeRange
-import kotlinx.coroutines.async
-import kotlinx.coroutines.awaitAll
-import kotlinx.coroutines.coroutineScope
+import com.android.settingslib.spa.framework.util.asyncMap
interface IAppDataUsageSummaryRepository {
suspend fun querySummary(uid: Int): NetworkUsageData?
@@ -35,11 +33,8 @@
NetworkStatsRepository(context, template),
) : IAppDataUsageSummaryRepository {
- override suspend fun querySummary(uid: Int): NetworkUsageData? = coroutineScope {
- withSdkSandboxUids(listOf(uid)).map { uid ->
- async {
- networkStatsRepository.queryAggregateForUid(range = AllTimeRange, uid = uid)
- }
- }.awaitAll().filterNotNull().aggregate()
- }
+ override suspend fun querySummary(uid: Int): NetworkUsageData? =
+ withSdkSandboxUids(listOf(uid)).asyncMap {
+ networkStatsRepository.queryAggregateForUid(range = AllTimeRange, uid = it)
+ }.filterNotNull().aggregate()
}
diff --git a/src/com/android/settings/datausage/lib/NetworkCycleChartData.kt b/src/com/android/settings/datausage/lib/NetworkCycleChartData.kt
index fd3c504..4e73190 100644
--- a/src/com/android/settings/datausage/lib/NetworkCycleChartData.kt
+++ b/src/com/android/settings/datausage/lib/NetworkCycleChartData.kt
@@ -26,6 +26,11 @@
val dailyUsage: List<NetworkUsageData>,
) {
companion object {
+ val AllZero = NetworkCycleChartData(
+ total = NetworkUsageData.AllZero,
+ dailyUsage = emptyList(),
+ )
+
val BUCKET_DURATION = 1.days
}
}
diff --git a/src/com/android/settings/datausage/lib/NetworkCycleDataRepository.kt b/src/com/android/settings/datausage/lib/NetworkCycleDataRepository.kt
index 4e97c6d..4256130 100644
--- a/src/com/android/settings/datausage/lib/NetworkCycleDataRepository.kt
+++ b/src/com/android/settings/datausage/lib/NetworkCycleDataRepository.kt
@@ -58,7 +58,7 @@
return reverseBucketRange(
startTime = timeRange.lower,
endTime = timeRange.upper,
- bucketSize = DateUtils.WEEK_IN_MILLIS * 4,
+ step = DateUtils.WEEK_IN_MILLIS * 4,
)
}
@@ -76,7 +76,7 @@
dailyUsage = bucketRange(
startTime = startTime,
endTime = endTime,
- bucketSize = NetworkCycleChartData.BUCKET_DURATION.inWholeMilliseconds,
+ step = NetworkCycleChartData.BUCKET_DURATION.inWholeMilliseconds,
).queryUsage(),
)
}
@@ -92,29 +92,10 @@
usage = networkStatsRepository.querySummaryForDevice(range.lower, range.upper),
)
- private fun bucketRange(startTime: Long, endTime: Long, bucketSize: Long): List<Range<Long>> {
- val buckets = mutableListOf<Range<Long>>()
- var currentStart = startTime
- while (currentStart < endTime) {
- val bucketEnd = currentStart + bucketSize
- buckets += Range(currentStart, bucketEnd)
- currentStart = bucketEnd
- }
- return buckets
- }
+ private fun bucketRange(startTime: Long, endTime: Long, step: Long): List<Range<Long>> =
+ (startTime..endTime step step).zipWithNext(::Range)
- private fun reverseBucketRange(
- startTime: Long,
- endTime: Long,
- bucketSize: Long,
- ): List<Range<Long>> {
- val buckets = mutableListOf<Range<Long>>()
- var currentEnd = endTime
- while (currentEnd > startTime) {
- val bucketStart = currentEnd - bucketSize
- buckets += Range(bucketStart, currentEnd)
- currentEnd = bucketStart
- }
- return buckets
- }
+ private fun reverseBucketRange(startTime: Long, endTime: Long, step: Long): List<Range<Long>> =
+ (endTime downTo (startTime - step + 1) step step)
+ .zipWithNext { bucketEnd, bucketStart -> Range(bucketStart, bucketEnd) }
}
diff --git a/src/com/android/settings/datausage/lib/NetworkStatsRepository.kt b/src/com/android/settings/datausage/lib/NetworkStatsRepository.kt
index 22f9dd0..f2e18f2 100644
--- a/src/com/android/settings/datausage/lib/NetworkStatsRepository.kt
+++ b/src/com/android/settings/datausage/lib/NetworkStatsRepository.kt
@@ -54,7 +54,7 @@
0
}
- fun querySummary(startTime: Long, endTime: Long): List<Bucket> = try {
+ fun queryBuckets(startTime: Long, endTime: Long): List<Bucket> = try {
networkStatsManager.querySummary(template, startTime, endTime).convertToBuckets()
} catch (e: Exception) {
Log.e(TAG, "Exception querySummary", e)
@@ -69,13 +69,14 @@
data class Bucket(
val uid: Int,
val bytes: Long,
+ val state: Int = NetworkStats.Bucket.STATE_ALL,
)
private fun NetworkStats.convertToBuckets(): List<Bucket> = use {
val buckets = mutableListOf<Bucket>()
val bucket = NetworkStats.Bucket()
while (getNextBucket(bucket)) {
- buckets += Bucket(uid = bucket.uid, bytes = bucket.bytes)
+ buckets += Bucket(uid = bucket.uid, bytes = bucket.bytes, state = bucket.state)
}
buckets
}
diff --git a/src/com/android/settings/datausage/lib/NetworkUsageData.kt b/src/com/android/settings/datausage/lib/NetworkUsageData.kt
index 93cde5f..f9d83d5 100644
--- a/src/com/android/settings/datausage/lib/NetworkUsageData.kt
+++ b/src/com/android/settings/datausage/lib/NetworkUsageData.kt
@@ -43,8 +43,14 @@
fun getDataUsedString(context: Context): String =
context.getString(R.string.data_used_template, formatUsage(context))
- private companion object {
- const val DATE_FORMAT = DateUtils.FORMAT_SHOW_DATE or DateUtils.FORMAT_ABBREV_MONTH
+ companion object {
+ val AllZero = NetworkUsageData(
+ startTime = 0L,
+ endTime = 0L,
+ usage = 0L,
+ )
+
+ private const val DATE_FORMAT = DateUtils.FORMAT_SHOW_DATE or DateUtils.FORMAT_ABBREV_MONTH
}
}
diff --git a/src/com/android/settings/development/BluetoothLeAudioAllowListPreferenceController.java b/src/com/android/settings/development/BluetoothLeAudioAllowListPreferenceController.java
index a643a20..cc43c2b 100644
--- a/src/com/android/settings/development/BluetoothLeAudioAllowListPreferenceController.java
+++ b/src/com/android/settings/development/BluetoothLeAudioAllowListPreferenceController.java
@@ -21,6 +21,7 @@
import android.bluetooth.BluetoothStatusCodes;
import android.content.Context;
import android.os.SystemProperties;
+import android.sysprop.BluetoothProperties;
import androidx.annotation.VisibleForTesting;
import androidx.preference.Preference;
@@ -36,27 +37,27 @@
extends DeveloperOptionsPreferenceController
implements Preference.OnPreferenceChangeListener, PreferenceControllerMixin {
- private static final String PREFERENCE_KEY = "bluetooth_enable_leaudio_allow_list";
+ private static final String PREFERENCE_KEY = "bluetooth_bypass_leaudio_allowlist";
- private static final String LE_AUDIO_ALLOW_LIST_SWITCH_SUPPORT_PROPERTY =
- "ro.bluetooth.leaudio_allow_list.supported";
+ static final String LE_AUDIO_CONNECTION_BY_DEFAULT_PROPERTY =
+ "ro.bluetooth.leaudio.le_audio_connection_by_default";
@VisibleForTesting
- static final String LE_AUDIO_ALLOW_LIST_ENABLED_PROPERTY =
- "persist.bluetooth.leaudio.enable_allow_list";
+ static final String BYPASS_LE_AUDIO_ALLOWLIST_PROPERTY =
+ "persist.bluetooth.leaudio.bypass_allow_list";
@VisibleForTesting
BluetoothAdapter mBluetoothAdapter;
+ @VisibleForTesting boolean mLeAudioConnectionByDefault;
private final DevelopmentSettingsDashboardFragment mFragment;
- @VisibleForTesting
- boolean mChanged = false;
-
public BluetoothLeAudioAllowListPreferenceController(Context context,
DevelopmentSettingsDashboardFragment fragment) {
super(context);
mFragment = fragment;
mBluetoothAdapter = context.getSystemService(BluetoothManager.class).getAdapter();
+ mLeAudioConnectionByDefault =
+ SystemProperties.getBoolean(LE_AUDIO_CONNECTION_BY_DEFAULT_PROPERTY, true);
}
@Override
@@ -65,52 +66,48 @@
}
@Override
+ public boolean isAvailable() {
+ return BluetoothProperties.isProfileBapUnicastClientEnabled().orElse(false)
+ && mLeAudioConnectionByDefault;
+ }
+
+ @Override
public boolean onPreferenceChange(Preference preference, Object newValue) {
- BluetoothRebootDialog.show(mFragment);
- mChanged = true;
- return false;
+ final boolean isBypassed = (Boolean) newValue;
+ SystemProperties.set(BYPASS_LE_AUDIO_ALLOWLIST_PROPERTY,
+ isBypassed ? "true" : "false");
+ return true;
}
@Override
public void updateState(Preference preference) {
if (mBluetoothAdapter == null) {
+ mPreference.setEnabled(false);
return;
}
- final int leAudioSupportedState = mBluetoothAdapter.isLeAudioSupported();
- final boolean leAudioEnabled =
- (leAudioSupportedState == BluetoothStatusCodes.FEATURE_SUPPORTED);
- final boolean leAudioAllowListSupport =
- SystemProperties.getBoolean(LE_AUDIO_ALLOW_LIST_SWITCH_SUPPORT_PROPERTY, false);
-
- if (leAudioEnabled && leAudioAllowListSupport) {
- final boolean leAudioAllowListEnabled =
- SystemProperties.getBoolean(LE_AUDIO_ALLOW_LIST_ENABLED_PROPERTY, false);
- ((SwitchPreference) mPreference).setChecked(leAudioAllowListEnabled);
- } else {
+ final boolean isLeAudioSupported =
+ (mBluetoothAdapter.isLeAudioSupported() == BluetoothStatusCodes.FEATURE_SUPPORTED);
+ if (!isLeAudioSupported) {
mPreference.setEnabled(false);
((SwitchPreference) mPreference).setChecked(false);
- }
- }
-
- /**
- * Called when the RebootDialog confirm is clicked.
- */
- public void onRebootDialogConfirmed() {
- if (!mChanged) {
return;
}
- final boolean leAudioAllowListEnabled =
- SystemProperties.getBoolean(LE_AUDIO_ALLOW_LIST_ENABLED_PROPERTY, false);
- SystemProperties.set(LE_AUDIO_ALLOW_LIST_ENABLED_PROPERTY,
- Boolean.toString(!leAudioAllowListEnabled));
+ mPreference.setEnabled(true);
+ final boolean isLeAudioAllowlistBypassed =
+ SystemProperties.getBoolean(BYPASS_LE_AUDIO_ALLOWLIST_PROPERTY, false);
+ ((SwitchPreference) mPreference).setChecked(isLeAudioAllowlistBypassed);
}
- /**
- * Called when the RebootDialog cancel is clicked.
- */
- public void onRebootDialogCanceled() {
- mChanged = false;
+ @Override
+ protected void onDeveloperOptionsSwitchDisabled() {
+ super.onDeveloperOptionsSwitchDisabled();
+ final boolean isBypassed =
+ SystemProperties.getBoolean(BYPASS_LE_AUDIO_ALLOWLIST_PROPERTY, false);
+ if (isBypassed) {
+ SystemProperties.set(BYPASS_LE_AUDIO_ALLOWLIST_PROPERTY, Boolean.toString(false));
+ ((SwitchPreference) mPreference).setChecked(false);
+ }
}
}
diff --git a/src/com/android/settings/development/BluetoothLeAudioDeviceDetailsPreferenceController.java b/src/com/android/settings/development/BluetoothLeAudioDeviceDetailsPreferenceController.java
index 980bdaa..16d8b32 100644
--- a/src/com/android/settings/development/BluetoothLeAudioDeviceDetailsPreferenceController.java
+++ b/src/com/android/settings/development/BluetoothLeAudioDeviceDetailsPreferenceController.java
@@ -21,7 +21,6 @@
import android.bluetooth.BluetoothStatusCodes;
import android.content.Context;
import android.os.SystemProperties;
-import android.provider.DeviceConfig;
import androidx.annotation.VisibleForTesting;
import androidx.preference.Preference;
@@ -39,7 +38,8 @@
implements Preference.OnPreferenceChangeListener, PreferenceControllerMixin {
private static final String PREFERENCE_KEY = "bluetooth_show_leaudio_device_details";
- private static final String CONFIG_LE_AUDIO_ENABLED_BY_DEFAULT = "le_audio_enabled_by_default";
+ private static final String LE_AUDIO_CONNECTION_BY_DEFAULT_PROPERTY =
+ "ro.bluetooth.leaudio.le_audio_connection_by_default";
private static final boolean LE_AUDIO_TOGGLE_VISIBLE_DEFAULT_VALUE = true;
static int sLeAudioSupportedStateCache = BluetoothStatusCodes.ERROR_UNKNOWN;
@@ -48,10 +48,13 @@
@VisibleForTesting
BluetoothAdapter mBluetoothAdapter;
+ @VisibleForTesting boolean mLeAudioEnabledByDefault;
public BluetoothLeAudioDeviceDetailsPreferenceController(Context context) {
super(context);
mBluetoothAdapter = context.getSystemService(BluetoothManager.class).getAdapter();
+ mLeAudioEnabledByDefault =
+ SystemProperties.getBoolean(LE_AUDIO_CONNECTION_BY_DEFAULT_PROPERTY, true);
}
@Override
@@ -70,7 +73,8 @@
}
// Display the option only if LE Audio is supported
- return (sLeAudioSupportedStateCache == BluetoothStatusCodes.FEATURE_SUPPORTED);
+ return !mLeAudioEnabledByDefault
+ && (sLeAudioSupportedStateCache == BluetoothStatusCodes.FEATURE_SUPPORTED);
}
@Override
@@ -88,11 +92,7 @@
final boolean isLeAudioToggleVisible = SystemProperties.getBoolean(
LE_AUDIO_TOGGLE_VISIBLE_PROPERTY, LE_AUDIO_TOGGLE_VISIBLE_DEFAULT_VALUE);
- final boolean leAudioEnabledByDefault = DeviceConfig.getBoolean(
- DeviceConfig.NAMESPACE_BLUETOOTH, CONFIG_LE_AUDIO_ENABLED_BY_DEFAULT, false);
- mPreference.setEnabled(!leAudioEnabledByDefault);
- ((SwitchPreference) mPreference).setChecked(isLeAudioToggleVisible
- || leAudioEnabledByDefault);
+ ((SwitchPreference) mPreference).setChecked(isLeAudioToggleVisible);
}
}
diff --git a/src/com/android/settings/development/DevelopmentSettingsDashboardFragment.java b/src/com/android/settings/development/DevelopmentSettingsDashboardFragment.java
index 47b9d09..f0cf59a 100644
--- a/src/com/android/settings/development/DevelopmentSettingsDashboardFragment.java
+++ b/src/com/android/settings/development/DevelopmentSettingsDashboardFragment.java
@@ -442,11 +442,6 @@
getDevelopmentOptionsController(
BluetoothLeAudioPreferenceController.class);
leAudioFeatureController.onRebootDialogConfirmed();
-
- final BluetoothLeAudioAllowListPreferenceController leAudioAllowListController =
- getDevelopmentOptionsController(
- BluetoothLeAudioAllowListPreferenceController.class);
- leAudioAllowListController.onRebootDialogConfirmed();
}
@Override
@@ -464,11 +459,6 @@
getDevelopmentOptionsController(
BluetoothLeAudioPreferenceController.class);
leAudioFeatureController.onRebootDialogCanceled();
-
- final BluetoothLeAudioAllowListPreferenceController leAudioAllowListController =
- getDevelopmentOptionsController(
- BluetoothLeAudioAllowListPreferenceController.class);
- leAudioAllowListController.onRebootDialogCanceled();
}
@Override
diff --git a/src/com/android/settings/network/BluetoothWiFiResetPreferenceController.java b/src/com/android/settings/network/BluetoothWiFiResetPreferenceController.java
deleted file mode 100644
index f0f5d73..0000000
--- a/src/com/android/settings/network/BluetoothWiFiResetPreferenceController.java
+++ /dev/null
@@ -1,188 +0,0 @@
-/*
- * Copyright (C) 2022 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.network;
-
-import android.app.ProgressDialog;
-import android.app.settings.SettingsEnums;
-import android.content.Context;
-import android.content.DialogInterface;
-import android.os.Looper;
-import android.text.TextUtils;
-import android.util.Log;
-import android.widget.Toast;
-
-import androidx.annotation.VisibleForTesting;
-import androidx.appcompat.app.AlertDialog;
-import androidx.preference.Preference;
-
-import com.android.settings.R;
-import com.android.settings.ResetNetworkRequest;
-import com.android.settings.core.BasePreferenceController;
-import com.android.settings.overlay.FeatureFactory;
-import com.android.settingslib.core.instrumentation.MetricsFeatureProvider;
-
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.atomic.AtomicReference;
-
-/**
- * This is to show a preference regarding resetting Bluetooth and Wi-Fi.
- */
-public class BluetoothWiFiResetPreferenceController extends BasePreferenceController
- implements DialogInterface.OnClickListener, DialogInterface.OnDismissListener {
-
- private static final String TAG = "BtWiFiResetPreferenceController";
-
- private final NetworkResetRestrictionChecker mRestrictionChecker;
-
- private DialogInterface mResetDialog;
- private ProgressDialog mProgressDialog;
- private ExecutorService mExecutorService;
-
- /**
- * Constructer.
- * @param context Context
- * @param preferenceKey is the key for Preference
- */
- public BluetoothWiFiResetPreferenceController(Context context, String preferenceKey) {
- super(context, preferenceKey);
-
- // restriction check
- mRestrictionChecker = new NetworkResetRestrictionChecker(context);
- }
-
- @Override
- public int getAvailabilityStatus() {
- return mRestrictionChecker.hasUserRestriction() ?
- CONDITIONALLY_UNAVAILABLE : AVAILABLE;
- }
-
- @Override
- public boolean handlePreferenceTreeClick(Preference preference) {
- if (!TextUtils.equals(preference.getKey(), getPreferenceKey())) {
- return false;
- }
- buildResetDialog(preference);
- return true;
- }
-
- /**
- * This is a pop-up dialog showing detail of this reset option.
- */
- void buildResetDialog(Preference preference) {
- if (mResetDialog != null) {
- return;
- }
- mResetDialog = new AlertDialog.Builder(mContext)
- .setTitle(R.string.reset_bluetooth_wifi_title)
- .setMessage(R.string.reset_bluetooth_wifi_desc)
- .setPositiveButton(R.string.reset_bluetooth_wifi_button_text, this)
- .setNegativeButton(R.string.cancel, null /* OnClickListener */)
- .setOnDismissListener(this)
- .show();
- }
-
- public void onDismiss(DialogInterface dialog) {
- if (mResetDialog == dialog) {
- mResetDialog = null;
- }
- }
-
- /**
- * User pressed confirmation button, for starting reset operation.
- */
- public void onClick(DialogInterface dialog, int which) {
- if (mResetDialog != dialog) {
- return;
- }
-
- // User confirm the reset operation
- MetricsFeatureProvider provider = FeatureFactory.getFeatureFactory()
- .getMetricsFeatureProvider();
- provider.action(mContext, SettingsEnums.RESET_BLUETOOTH_WIFI_CONFIRM, true);
-
- // Non-cancelable progress dialog
- mProgressDialog = getProgressDialog(mContext);
- mProgressDialog.show();
-
- // Run reset in background thread
- mExecutorService = Executors.newSingleThreadExecutor();
- mExecutorService.execute(() -> {
- final AtomicReference<Exception> exceptionDuringReset =
- new AtomicReference<Exception>();
- try {
- resetOperation().run();
- } catch (Exception exception) {
- exceptionDuringReset.set(exception);
- }
- mContext.getMainExecutor().execute(() -> endOfReset(exceptionDuringReset.get()));
- });
- }
-
- @VisibleForTesting
- protected ProgressDialog getProgressDialog(Context context) {
- final ProgressDialog progressDialog = new ProgressDialog(context);
- progressDialog.setIndeterminate(true);
- progressDialog.setCancelable(false);
- progressDialog.setMessage(
- context.getString(R.string.main_clear_progress_text));
- return progressDialog;
- }
-
- @VisibleForTesting
- protected Runnable resetOperation() throws Exception {
- if (SubscriptionUtil.isSimHardwareVisible(mContext)) {
- return new ResetNetworkRequest(
- ResetNetworkRequest.RESET_WIFI_MANAGER |
- ResetNetworkRequest.RESET_WIFI_P2P_MANAGER |
- ResetNetworkRequest.RESET_BLUETOOTH_MANAGER)
- .toResetNetworkOperationBuilder(mContext, Looper.getMainLooper())
- .build();
- }
-
- /**
- * For device without SIMs visible to the user
- */
- return new ResetNetworkRequest(
- ResetNetworkRequest.RESET_CONNECTIVITY_MANAGER |
- ResetNetworkRequest.RESET_VPN_MANAGER |
- ResetNetworkRequest.RESET_WIFI_MANAGER |
- ResetNetworkRequest.RESET_WIFI_P2P_MANAGER |
- ResetNetworkRequest.RESET_BLUETOOTH_MANAGER)
- .toResetNetworkOperationBuilder(mContext, Looper.getMainLooper())
- .resetTelephonyAndNetworkPolicyManager(ResetNetworkRequest.ALL_SUBSCRIPTION_ID)
- .build();
- }
-
- @VisibleForTesting
- protected void endOfReset(Exception exceptionDuringReset) {
- if (mExecutorService != null) {
- mExecutorService.shutdown();
- mExecutorService = null;
- }
- if (mProgressDialog != null) {
- mProgressDialog.dismiss();
- mProgressDialog = null;
- }
- if (exceptionDuringReset == null) {
- Toast.makeText(mContext, R.string.reset_bluetooth_wifi_complete_toast,
- Toast.LENGTH_SHORT).show();
- } else {
- Log.e(TAG, "Exception during reset", exceptionDuringReset);
- }
- }
-}
diff --git a/src/com/android/settings/network/BluetoothWiFiResetPreferenceController.kt b/src/com/android/settings/network/BluetoothWiFiResetPreferenceController.kt
new file mode 100644
index 0000000..2047ed9
--- /dev/null
+++ b/src/com/android/settings/network/BluetoothWiFiResetPreferenceController.kt
@@ -0,0 +1,126 @@
+/*
+ * Copyright (C) 2023 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.network
+
+import android.app.settings.SettingsEnums
+import android.content.Context
+import android.os.Looper
+import android.os.UserManager
+import android.util.Log
+import android.widget.Toast
+import androidx.annotation.VisibleForTesting
+import androidx.compose.material3.Text
+import androidx.compose.runtime.Composable
+import androidx.compose.runtime.rememberCoroutineScope
+import androidx.compose.ui.res.stringResource
+import com.android.settings.R
+import com.android.settings.ResetNetworkRequest
+import com.android.settings.overlay.FeatureFactory.Companion.featureFactory
+import com.android.settings.spa.preference.ComposePreferenceController
+import com.android.settingslib.spa.widget.dialog.AlertDialogButton
+import com.android.settingslib.spa.widget.dialog.rememberAlertDialogPresenter
+import com.android.settingslib.spa.widget.preference.PreferenceModel
+import com.android.settingslib.spaprivileged.model.enterprise.Restrictions
+import com.android.settingslib.spaprivileged.template.preference.RestrictedPreference
+import kotlinx.coroutines.CoroutineScope
+import kotlinx.coroutines.Dispatchers
+import kotlinx.coroutines.launch
+import kotlinx.coroutines.withContext
+
+/**
+ * This is to show a preference regarding resetting Bluetooth and Wi-Fi.
+ */
+class BluetoothWiFiResetPreferenceController(context: Context, preferenceKey: String) :
+ ComposePreferenceController(context, preferenceKey) {
+
+ private val restrictionChecker = NetworkResetRestrictionChecker(context)
+
+ override fun getAvailabilityStatus() =
+ if (restrictionChecker.hasUserRestriction()) CONDITIONALLY_UNAVAILABLE else AVAILABLE
+
+ @Composable
+ override fun Content() {
+ val coroutineScope = rememberCoroutineScope()
+ val dialogPresenter = rememberAlertDialogPresenter(
+ confirmButton = AlertDialogButton(
+ text = stringResource(R.string.reset_bluetooth_wifi_button_text),
+ ) { reset(coroutineScope) },
+ dismissButton = AlertDialogButton(text = stringResource(R.string.cancel)),
+ title = stringResource(R.string.reset_bluetooth_wifi_title),
+ ) {
+ Text(stringResource(R.string.reset_bluetooth_wifi_desc))
+ }
+
+ RestrictedPreference(
+ model = object : PreferenceModel {
+ override val title = stringResource(R.string.reset_bluetooth_wifi_title)
+ override val onClick = dialogPresenter::open
+ },
+ restrictions = Restrictions(keys = listOf(UserManager.DISALLOW_NETWORK_RESET)),
+ )
+ }
+
+ /**
+ * User pressed confirmation button, for starting reset operation.
+ */
+ private fun reset(coroutineScope: CoroutineScope) {
+ // User confirm the reset operation
+ featureFactory.metricsFeatureProvider
+ .action(mContext, SettingsEnums.RESET_BLUETOOTH_WIFI_CONFIRM, true)
+
+ // Run reset in background thread
+ coroutineScope.launch {
+ try {
+ withContext(Dispatchers.Default) {
+ resetOperation().run()
+ }
+ } catch (e: Exception) {
+ Log.e(TAG, "Exception during reset", e)
+ return@launch
+ }
+ Toast.makeText(
+ mContext,
+ R.string.reset_bluetooth_wifi_complete_toast,
+ Toast.LENGTH_SHORT,
+ ).show()
+ }
+ }
+
+ @VisibleForTesting
+ fun resetOperation(): Runnable = if (SubscriptionUtil.isSimHardwareVisible(mContext)) {
+ ResetNetworkRequest(
+ ResetNetworkRequest.RESET_WIFI_MANAGER or
+ ResetNetworkRequest.RESET_WIFI_P2P_MANAGER or
+ ResetNetworkRequest.RESET_BLUETOOTH_MANAGER
+ )
+ .toResetNetworkOperationBuilder(mContext, Looper.getMainLooper())
+ } else { // For device without SIMs visible to the user
+ ResetNetworkRequest(
+ ResetNetworkRequest.RESET_CONNECTIVITY_MANAGER or
+ ResetNetworkRequest.RESET_VPN_MANAGER or
+ ResetNetworkRequest.RESET_WIFI_MANAGER or
+ ResetNetworkRequest.RESET_WIFI_P2P_MANAGER or
+ ResetNetworkRequest.RESET_BLUETOOTH_MANAGER
+ )
+ .toResetNetworkOperationBuilder(mContext, Looper.getMainLooper())
+ .resetTelephonyAndNetworkPolicyManager(ResetNetworkRequest.ALL_SUBSCRIPTION_ID)
+ }.build()
+
+ private companion object {
+ private const val TAG = "BluetoothWiFiResetPref"
+ }
+}
diff --git a/src/com/android/settings/notification/app/NotificationSoundPreference.java b/src/com/android/settings/notification/app/NotificationSoundPreference.java
index 136b21f..b55f9bd 100644
--- a/src/com/android/settings/notification/app/NotificationSoundPreference.java
+++ b/src/com/android/settings/notification/app/NotificationSoundPreference.java
@@ -25,10 +25,13 @@
import android.os.AsyncTask;
import android.util.AttributeSet;
+import android.util.Log;
import com.android.settings.R;
import com.android.settings.RingtonePreference;
public class NotificationSoundPreference extends RingtonePreference {
+ private static final String TAG = "NotificationSoundPreference";
+
private Uri mRingtone;
public NotificationSoundPreference(Context context, AttributeSet attrs) {
@@ -50,8 +53,13 @@
public boolean onActivityResult(int requestCode, int resultCode, Intent data) {
if (data != null) {
Uri uri = data.getParcelableExtra(RingtoneManager.EXTRA_RINGTONE_PICKED_URI);
- setRingtone(uri);
- callChangeListener(uri);
+ if (isValidRingtoneUri(uri)) {
+ setRingtone(uri);
+ callChangeListener(uri);
+ } else {
+ Log.e(TAG, "onActivityResult for URI:" + uri
+ + " ignored: invalid ringtone Uri");
+ }
}
return true;
diff --git a/src/com/android/settings/overlay/FeatureFactory.kt b/src/com/android/settings/overlay/FeatureFactory.kt
index 7645076..ac689d9 100644
--- a/src/com/android/settings/overlay/FeatureFactory.kt
+++ b/src/com/android/settings/overlay/FeatureFactory.kt
@@ -21,6 +21,7 @@
import com.android.settings.accounts.AccountFeatureProvider
import com.android.settings.applications.ApplicationFeatureProvider
import com.android.settings.biometrics.face.FaceFeatureProvider
+import com.android.settings.biometrics.fingerprint.FingerprintFeatureProvider
import com.android.settings.biometrics2.factory.BiometricsRepositoryProvider
import com.android.settings.bluetooth.BluetoothFeatureProvider
import com.android.settings.connecteddevice.fastpair.FastPairFeatureProvider
@@ -104,9 +105,17 @@
*/
abstract val bluetoothFeatureProvider: BluetoothFeatureProvider
+ /**
+ * Retrieves implementation for Face feature.
+ */
abstract val faceFeatureProvider: FaceFeatureProvider
/**
+ * Retrieves implementation for Fingerprint feature.
+ */
+ abstract val fingerprintFeatureProvider: FingerprintFeatureProvider
+
+ /**
* Gets implementation for Biometrics repository provider.
*/
abstract val biometricsRepositoryProvider: BiometricsRepositoryProvider
diff --git a/src/com/android/settings/overlay/FeatureFactoryImpl.kt b/src/com/android/settings/overlay/FeatureFactoryImpl.kt
index 0afe9f4..7f991b7 100644
--- a/src/com/android/settings/overlay/FeatureFactoryImpl.kt
+++ b/src/com/android/settings/overlay/FeatureFactoryImpl.kt
@@ -29,6 +29,8 @@
import com.android.settings.applications.ApplicationFeatureProviderImpl
import com.android.settings.biometrics.face.FaceFeatureProvider
import com.android.settings.biometrics.face.FaceFeatureProviderImpl
+import com.android.settings.biometrics.fingerprint.FingerprintFeatureProvider
+import com.android.settings.biometrics.fingerprint.FingerprintFeatureProviderImpl
import com.android.settings.biometrics2.factory.BiometricsRepositoryProviderImpl
import com.android.settings.bluetooth.BluetoothFeatureProvider
import com.android.settings.bluetooth.BluetoothFeatureProviderImpl
@@ -145,6 +147,10 @@
override val faceFeatureProvider: FaceFeatureProvider by lazy { FaceFeatureProviderImpl() }
+ override val fingerprintFeatureProvider: FingerprintFeatureProvider by lazy {
+ FingerprintFeatureProviderImpl()
+ }
+
override val biometricsRepositoryProvider by lazy { BiometricsRepositoryProviderImpl() }
override val wifiTrackerLibProvider: WifiTrackerLibProvider by lazy {
diff --git a/src/com/android/settings/password/ConfirmDeviceCredentialBaseFragment.java b/src/com/android/settings/password/ConfirmDeviceCredentialBaseFragment.java
index 43d8440..ea00f7f 100644
--- a/src/com/android/settings/password/ConfirmDeviceCredentialBaseFragment.java
+++ b/src/com/android/settings/password/ConfirmDeviceCredentialBaseFragment.java
@@ -419,6 +419,10 @@
}
}
+ protected void clearResetErrorRunnable() {
+ mHandler.removeCallbacks(mResetErrorRunnable);
+ }
+
protected void validateGuess(LockscreenCredential credentialGuess) {
mRemoteLockscreenValidationFragment.validateLockscreenGuess(
mRemoteLockscreenValidationClient, credentialGuess,
diff --git a/src/com/android/settings/password/ConfirmLockPassword.java b/src/com/android/settings/password/ConfirmLockPassword.java
index b203015..b139ae9 100644
--- a/src/com/android/settings/password/ConfirmLockPassword.java
+++ b/src/com/android/settings/password/ConfirmLockPassword.java
@@ -666,6 +666,7 @@
}
private void handleAttemptLockout(long elapsedRealtimeDeadline) {
+ clearResetErrorRunnable();
mCountdownTimer = new CountDownTimer(
elapsedRealtimeDeadline - SystemClock.elapsedRealtime(),
LockPatternUtils.FAILED_ATTEMPT_COUNTDOWN_INTERVAL_MS) {
diff --git a/src/com/android/settings/password/ConfirmLockPattern.java b/src/com/android/settings/password/ConfirmLockPattern.java
index 3afb60e..6e3ad30 100644
--- a/src/com/android/settings/password/ConfirmLockPattern.java
+++ b/src/com/android/settings/password/ConfirmLockPattern.java
@@ -697,6 +697,7 @@
}
private void handleAttemptLockout(long elapsedRealtimeDeadline) {
+ clearResetErrorRunnable();
updateStage(Stage.LockedOut);
long elapsedRealtime = SystemClock.elapsedRealtime();
mCountdownTimer = new CountDownTimer(
diff --git a/src/com/android/settings/spa/app/ResetAppPreferences.kt b/src/com/android/settings/spa/app/ResetAppPreferences.kt
index 12dd709..34c4145 100644
--- a/src/com/android/settings/spa/app/ResetAppPreferences.kt
+++ b/src/com/android/settings/spa/app/ResetAppPreferences.kt
@@ -16,7 +16,6 @@
package com.android.settings.spa.app
-import android.os.UserHandle
import android.os.UserManager
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
@@ -37,10 +36,7 @@
RestrictedMenuItem(
text = stringResource(R.string.reset_app_preferences),
restrictions = remember {
- Restrictions(
- userId = UserHandle.myUserId(),
- keys = listOf(UserManager.DISALLOW_APPS_CONTROL),
- )
+ Restrictions(keys = listOf(UserManager.DISALLOW_APPS_CONTROL))
},
onClick = onClick,
)
diff --git a/src/com/android/settings/spa/preference/ComposePreference.kt b/src/com/android/settings/spa/preference/ComposePreference.kt
new file mode 100644
index 0000000..aec85a9
--- /dev/null
+++ b/src/com/android/settings/spa/preference/ComposePreference.kt
@@ -0,0 +1,55 @@
+/*
+ * Copyright (C) 2023 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.spa.preference
+
+import android.content.Context
+import android.util.AttributeSet
+import androidx.compose.runtime.Composable
+import androidx.compose.ui.platform.ComposeView
+import androidx.compose.ui.platform.ViewCompositionStrategy
+import androidx.preference.Preference
+import androidx.preference.PreferenceViewHolder
+import com.android.settings.R
+import com.android.settingslib.spa.framework.theme.SettingsTheme
+
+class ComposePreference @JvmOverloads constructor(
+ context: Context,
+ attrs: AttributeSet? = null,
+ defStyleAttr: Int = 0,
+ defStyleRes: Int = 0,
+) : Preference(context, attrs, defStyleAttr, defStyleRes) {
+ var content: @Composable () -> Unit = {}
+
+ init {
+ layoutResource = R.layout.preference_compose
+ }
+
+ override fun onBindViewHolder(holder: PreferenceViewHolder) {
+ super.onBindViewHolder(holder)
+ holder.isDividerAllowedAbove = false
+ holder.isDividerAllowedBelow = false
+
+ (holder.itemView as ComposeView).apply {
+ setViewCompositionStrategy(ViewCompositionStrategy.DisposeOnViewTreeLifecycleDestroyed)
+ setContent {
+ SettingsTheme {
+ content()
+ }
+ }
+ }
+ }
+}
diff --git a/src/com/android/settings/spa/preference/ComposePreferenceController.kt b/src/com/android/settings/spa/preference/ComposePreferenceController.kt
new file mode 100644
index 0000000..3ddb66b
--- /dev/null
+++ b/src/com/android/settings/spa/preference/ComposePreferenceController.kt
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2023 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.spa.preference
+
+import android.content.Context
+import androidx.compose.runtime.Composable
+import androidx.preference.PreferenceScreen
+import com.android.settings.core.BasePreferenceController
+
+abstract class ComposePreferenceController(context: Context, preferenceKey: String) :
+ BasePreferenceController(context, preferenceKey) {
+
+ private lateinit var preference: ComposePreference
+
+ override fun displayPreference(screen: PreferenceScreen) {
+ super.displayPreference(screen)
+ preference = screen.findPreference(preferenceKey)!!
+ preference.content = { Content() }
+ }
+
+ @Composable
+ abstract fun Content()
+}
diff --git a/tests/robotests/AndroidManifest.xml b/tests/robotests/AndroidManifest.xml
index 22fce4f..95fbfa6 100644
--- a/tests/robotests/AndroidManifest.xml
+++ b/tests/robotests/AndroidManifest.xml
@@ -21,6 +21,8 @@
package="com.android.settings">
<uses-permission android:name="android.permission.READ_DEVICE_CONFIG" />
- <application/>
+ <application>
+ <activity android:name="com.android.settings.security.TestActivity" android:exported="true" />
+ </application>
</manifest>
diff --git a/tests/robotests/src/com/android/settings/accessibility/AccessibilityDetailsSettingsFragmentTest.java b/tests/robotests/src/com/android/settings/accessibility/AccessibilityDetailsSettingsFragmentTest.java
index de8ae60..995d74f 100644
--- a/tests/robotests/src/com/android/settings/accessibility/AccessibilityDetailsSettingsFragmentTest.java
+++ b/tests/robotests/src/com/android/settings/accessibility/AccessibilityDetailsSettingsFragmentTest.java
@@ -43,7 +43,6 @@
import com.google.common.collect.ImmutableList;
import org.junit.Before;
-import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.robolectric.RobolectricTestRunner;
@@ -79,60 +78,46 @@
}
@Test
- @Ignore
public void onCreate_afterSuccessfullyLaunch_shouldBeFinished() {
final Intent intent = new Intent();
intent.putExtra(Intent.EXTRA_COMPONENT_NAME, COMPONENT_NAME);
- mFragmentController = FragmentController.of(new AccessibilityDetailsSettingsFragment(),
- intent);
- AccessibilityDetailsSettingsFragment fragment = mFragmentController.create().get();
+ AccessibilityDetailsSettingsFragment fragment = startFragment(intent);
assertThat(fragment.getActivity().isFinishing()).isTrue();
}
@Test
- @Ignore
public void onCreate_hasValidExtraComponentName_launchExpectedFragment() {
Intent intent = new Intent();
intent.putExtra(Intent.EXTRA_COMPONENT_NAME, COMPONENT_NAME);
- mFragmentController = FragmentController.of(new AccessibilityDetailsSettingsFragment(),
- intent);
- AccessibilityDetailsSettingsFragment fragment = mFragmentController.create().get();
+ AccessibilityDetailsSettingsFragment fragment = startFragment(intent);
assertStartActivityWithExpectedFragment(fragment.getActivity(),
ToggleAccessibilityServicePreferenceFragment.class.getName());
}
@Test
- @Ignore
public void onCreate_hasInvalidExtraComponentName_launchAccessibilitySettings() {
Intent intent = new Intent();
intent.putExtra(Intent.EXTRA_COMPONENT_NAME, PACKAGE_NAME + "/.service");
- mFragmentController = FragmentController.of(new AccessibilityDetailsSettingsFragment(),
- intent);
- AccessibilityDetailsSettingsFragment fragment = mFragmentController.create().get();
+ AccessibilityDetailsSettingsFragment fragment = startFragment(intent);
assertStartActivityWithExpectedFragment(fragment.getActivity(),
AccessibilitySettings.class.getName());
}
@Test
- @Ignore
public void onCreate_hasNoExtraComponentName_launchAccessibilitySettings() {
- mFragmentController = FragmentController.of(new AccessibilityDetailsSettingsFragment(),
- new Intent());
-
- AccessibilityDetailsSettingsFragment fragment = mFragmentController.create().get();
+ AccessibilityDetailsSettingsFragment fragment = startFragment(/* intent= */ null);
assertStartActivityWithExpectedFragment(fragment.getActivity(),
AccessibilitySettings.class.getName());
}
@Test
- @Ignore
public void onCreate_extraComponentNameIsDisallowed_launchAccessibilitySettings() {
Intent intent = new Intent();
intent.putExtra(Intent.EXTRA_COMPONENT_NAME, COMPONENT_NAME);
@@ -140,47 +125,38 @@
DevicePolicyManager.class);
((ShadowDevicePolicyManager) Shadows.shadowOf(dpm)).setPermittedAccessibilityServices(
ImmutableList.of());
- mFragmentController = FragmentController.of(new AccessibilityDetailsSettingsFragment(),
- intent);
- AccessibilityDetailsSettingsFragment fragment = mFragmentController.create().get();
+ AccessibilityDetailsSettingsFragment fragment = startFragment(intent);
assertStartActivityWithExpectedFragment(fragment.getActivity(),
AccessibilitySettings.class.getName());
}
@Test
- @Ignore
public void onCreate_magnificationComponentName_launchMagnificationFragment() {
Intent intent = new Intent();
intent.putExtra(Intent.EXTRA_COMPONENT_NAME,
MAGNIFICATION_COMPONENT_NAME.flattenToString());
- mFragmentController = FragmentController.of(new AccessibilityDetailsSettingsFragment(),
- intent);
- AccessibilityDetailsSettingsFragment fragment = mFragmentController.create().get();
+ AccessibilityDetailsSettingsFragment fragment = startFragment(intent);
assertStartActivityWithExpectedFragment(fragment.getActivity(),
ToggleScreenMagnificationPreferenceFragment.class.getName());
}
@Test
- @Ignore
public void onCreate_accessibilityButton_launchAccessibilityButtonFragment() {
Intent intent = new Intent();
intent.putExtra(Intent.EXTRA_COMPONENT_NAME,
ACCESSIBILITY_BUTTON_COMPONENT_NAME.flattenToString());
- mFragmentController = FragmentController.of(new AccessibilityDetailsSettingsFragment(),
- intent);
- AccessibilityDetailsSettingsFragment fragment = mFragmentController.create().get();
+ AccessibilityDetailsSettingsFragment fragment = startFragment(intent);
assertStartActivityWithExpectedFragment(fragment.getActivity(),
AccessibilityButtonFragment.class.getName());
}
@Test
- @Ignore
public void onCreate_hearingAidsComponentName_launchAccessibilityHearingAidsFragment() {
FeatureFlagUtils.setEnabled(mContext,
FeatureFlagUtils.SETTINGS_ACCESSIBILITY_HEARING_AID_PAGE, true);
@@ -188,25 +164,30 @@
intent.putExtra(Intent.EXTRA_COMPONENT_NAME,
ACCESSIBILITY_HEARING_AIDS_COMPONENT_NAME.flattenToString());
- mFragmentController = FragmentController.of(new AccessibilityDetailsSettingsFragment(),
- intent);
-
- AccessibilityDetailsSettingsFragment fragment = mFragmentController.create().get();
+ AccessibilityDetailsSettingsFragment fragment = startFragment(intent);
assertStartActivityWithExpectedFragment(fragment.getActivity(),
AccessibilityHearingAidsFragment.class.getName());
}
@Test
- @Ignore
public void getMetricsCategory_returnsCorrectCategory() {
- mFragmentController = FragmentController.of(new AccessibilityDetailsSettingsFragment());
- AccessibilityDetailsSettingsFragment fragment = mFragmentController.create().get();
+
+ AccessibilityDetailsSettingsFragment fragment = startFragment(/* intent= */ null);
assertThat(fragment.getMetricsCategory()).isEqualTo(
SettingsEnums.ACCESSIBILITY_DETAILS_SETTINGS);
}
+ private AccessibilityDetailsSettingsFragment startFragment(Intent intent) {
+ mFragmentController = FragmentController.of(
+ new AccessibilityDetailsSettingsFragment(), intent)
+ .create()
+ .visible();
+
+ return mFragmentController.get();
+ }
+
private AccessibilityServiceInfo getMockAccessibilityServiceInfo() {
final ApplicationInfo applicationInfo = new ApplicationInfo();
final ServiceInfo serviceInfo = new ServiceInfo();
diff --git a/tests/robotests/src/com/android/settings/accessibility/AccessibilitySettingsTest.java b/tests/robotests/src/com/android/settings/accessibility/AccessibilitySettingsTest.java
index 8e0cfc1..db6f43b 100644
--- a/tests/robotests/src/com/android/settings/accessibility/AccessibilitySettingsTest.java
+++ b/tests/robotests/src/com/android/settings/accessibility/AccessibilitySettingsTest.java
@@ -19,52 +19,46 @@
import static com.google.common.truth.Truth.assertThat;
import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.ArgumentMatchers.anyBoolean;
-import static org.mockito.ArgumentMatchers.anyInt;
-import static org.mockito.ArgumentMatchers.anyString;
-import static org.mockito.ArgumentMatchers.eq;
-import static org.mockito.ArgumentMatchers.isNull;
-import static org.mockito.Mockito.atLeast;
import static org.mockito.Mockito.doReturn;
-import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
+import static org.robolectric.Shadows.shadowOf;
import static java.util.Collections.singletonList;
import android.accessibilityservice.AccessibilityServiceInfo;
import android.accessibilityservice.AccessibilityShortcutInfo;
-import android.app.AppOpsManager;
+import android.app.Application;
+import android.content.BroadcastReceiver;
import android.content.ComponentName;
-import android.content.ContentResolver;
import android.content.Context;
+import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.content.pm.ApplicationInfo;
import android.content.pm.ResolveInfo;
import android.content.pm.ServiceInfo;
+import android.database.ContentObserver;
import android.os.Build;
-import android.os.Bundle;
import android.provider.Settings;
import android.view.accessibility.AccessibilityManager;
-import androidx.fragment.app.FragmentActivity;
-import androidx.preference.PreferenceManager;
+import androidx.fragment.app.Fragment;
import androidx.test.core.app.ApplicationProvider;
import com.android.internal.accessibility.util.AccessibilityUtils;
import com.android.internal.content.PackageMonitor;
import com.android.settings.R;
+import com.android.settings.SettingsActivity;
import com.android.settings.testutils.XmlTestUtils;
+import com.android.settings.testutils.shadow.ShadowApplicationPackageManager;
import com.android.settings.testutils.shadow.ShadowBluetoothAdapter;
import com.android.settings.testutils.shadow.ShadowBluetoothUtils;
-import com.android.settings.testutils.shadow.ShadowFragment;
import com.android.settings.testutils.shadow.ShadowUserManager;
import com.android.settingslib.RestrictedPreference;
import com.android.settingslib.bluetooth.LocalBluetoothManager;
-import com.android.settingslib.core.lifecycle.Lifecycle;
import com.android.settingslib.search.SearchIndexableRaw;
+import com.android.settingslib.testutils.shadow.ShadowColorDisplayManager;
import org.junit.Before;
-import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -74,21 +68,25 @@
import org.mockito.junit.MockitoJUnit;
import org.mockito.junit.MockitoRule;
import org.robolectric.RobolectricTestRunner;
+import org.robolectric.android.controller.ActivityController;
import org.robolectric.annotation.Config;
import org.robolectric.shadow.api.Shadow;
import org.robolectric.shadows.ShadowAccessibilityManager;
+import org.robolectric.shadows.ShadowContentResolver;
import org.xmlpull.v1.XmlPullParserException;
import java.io.IOException;
import java.util.ArrayList;
+import java.util.Collection;
import java.util.List;
/** Test for {@link AccessibilitySettings}. */
@RunWith(RobolectricTestRunner.class)
@Config(shadows = {
- ShadowBluetoothUtils.class,
ShadowBluetoothAdapter.class,
- ShadowFragment.class,
+ ShadowUserManager.class,
+ ShadowColorDisplayManager.class,
+ ShadowApplicationPackageManager.class,
})
public class AccessibilitySettingsTest {
private static final String PACKAGE_NAME = "com.android.test";
@@ -103,50 +101,34 @@
@Rule
public final MockitoRule mocks = MockitoJUnit.rule();
- @Spy
private final Context mContext = ApplicationProvider.getApplicationContext();
@Spy
private final AccessibilityServiceInfo mServiceInfo = getMockAccessibilityServiceInfo(
PACKAGE_NAME, CLASS_NAME);
- @Spy
- private final AccessibilitySettings mFragment = new AccessibilitySettings();
@Mock
private AccessibilityShortcutInfo mShortcutInfo;
- @Mock
- private FragmentActivity mActivity;
- @Mock
- private ContentResolver mContentResolver;
- @Mock
- private PreferenceManager mPreferenceManager;
private ShadowAccessibilityManager mShadowAccessibilityManager;
@Mock
- private AppOpsManager mAppOpsManager;
- @Mock
private LocalBluetoothManager mLocalBluetoothManager;
-
- private Lifecycle mLifecycle;
+ private ActivityController<SettingsActivity> mActivityController;
+ private AccessibilitySettings mFragment;
@Before
public void setup() {
mShadowAccessibilityManager = Shadow.extract(AccessibilityManager.getInstance(mContext));
mShadowAccessibilityManager.setInstalledAccessibilityServiceList(new ArrayList<>());
- when(mFragment.getContext()).thenReturn(mContext);
- when(mFragment.getActivity()).thenReturn(mActivity);
- when(mActivity.getContentResolver()).thenReturn(mContentResolver);
- when(mFragment.getPreferenceManager()).thenReturn(mPreferenceManager);
- when(mFragment.getPreferenceManager().getContext()).thenReturn(mContext);
mContext.setTheme(androidx.appcompat.R.style.Theme_AppCompat);
- when(mContext.getSystemService(AppOpsManager.class)).thenReturn(mAppOpsManager);
- when(mAppOpsManager.noteOpNoThrow(eq(AppOpsManager.OP_ACCESS_RESTRICTED_SETTINGS),
- anyInt(), anyString())).thenReturn(AppOpsManager.MODE_ALLOWED);
- mLifecycle = new Lifecycle(() -> mLifecycle);
- when(mFragment.getSettingsLifecycle()).thenReturn(mLifecycle);
ShadowBluetoothUtils.sLocalBluetoothManager = mLocalBluetoothManager;
setMockAccessibilityShortcutInfo(mShortcutInfo);
+
+ Intent intent = new Intent();
+ intent.putExtra(SettingsActivity.EXTRA_SHOW_FRAGMENT,
+ AccessibilitySettings.class.getName());
+
+ mActivityController = ActivityController.of(new SettingsActivity(), intent);
}
@Test
- @Ignore
public void getNonIndexableKeys_existInXmlLayout() {
final List<String> niks = AccessibilitySettings.SEARCH_INDEX_DATA_PROVIDER
.getNonIndexableKeys(mContext);
@@ -157,16 +139,15 @@
}
@Test
- @Ignore
public void getRawDataToIndex_isNull() {
final List<SearchIndexableRaw> indexableRawList =
- AccessibilitySettings.SEARCH_INDEX_DATA_PROVIDER.getRawDataToIndex(mContext, true);
+ AccessibilitySettings.SEARCH_INDEX_DATA_PROVIDER
+ .getRawDataToIndex(mContext, true);
assertThat(indexableRawList).isNull();
}
@Test
- @Ignore
public void getServiceSummary_serviceCrash_showsStopped() {
mServiceInfo.crashed = true;
@@ -178,7 +159,6 @@
}
@Test
- @Ignore
public void getServiceSummary_invisibleToggle_shortcutEnabled_showsOnSummary() {
setInvisibleToggleFragmentType(mServiceInfo);
doReturn(DEFAULT_SUMMARY).when(mServiceInfo).loadSummary(any());
@@ -194,7 +174,6 @@
}
@Test
- @Ignore
public void getServiceSummary_invisibleToggle_shortcutDisabled_showsOffSummary() {
setInvisibleToggleFragmentType(mServiceInfo);
setShortcutEnabled(mServiceInfo.getComponentName(), false);
@@ -210,7 +189,6 @@
}
@Test
- @Ignore
public void getServiceSummary_enableServiceShortcutOn_showsServiceEnabledShortcutOn() {
doReturn(EMPTY_STRING).when(mServiceInfo).loadSummary(any());
setShortcutEnabled(mServiceInfo.getComponentName(), true);
@@ -223,7 +201,6 @@
}
@Test
- @Ignore
public void getServiceSummary_enableServiceShortcutOff_showsServiceEnabledShortcutOff() {
doReturn(EMPTY_STRING).when(mServiceInfo).loadSummary(any());
setShortcutEnabled(mServiceInfo.getComponentName(), false);
@@ -236,7 +213,6 @@
}
@Test
- @Ignore
public void getServiceSummary_disableServiceShortcutOff_showsDisabledShortcutOff() {
doReturn(EMPTY_STRING).when(mServiceInfo).loadSummary(any());
setShortcutEnabled(mServiceInfo.getComponentName(), false);
@@ -249,7 +225,6 @@
}
@Test
- @Ignore
public void getServiceSummary_disableServiceShortcutOn_showsDisabledShortcutOn() {
doReturn(EMPTY_STRING).when(mServiceInfo).loadSummary(any());
setShortcutEnabled(mServiceInfo.getComponentName(), true);
@@ -262,7 +237,6 @@
}
@Test
- @Ignore
public void getServiceSummary_enableServiceShortcutOffAndHasSummary_showsEnabledSummary() {
setShortcutEnabled(mServiceInfo.getComponentName(), false);
doReturn(DEFAULT_SUMMARY).when(mServiceInfo).loadSummary(any());
@@ -277,7 +251,6 @@
}
@Test
- @Ignore
public void getServiceSummary_enableServiceShortcutOnAndHasSummary_showsEnabledSummary() {
doReturn(DEFAULT_SUMMARY).when(mServiceInfo).loadSummary(any());
setShortcutEnabled(mServiceInfo.getComponentName(), true);
@@ -292,7 +265,6 @@
}
@Test
- @Ignore
public void getServiceSummary_disableServiceShortcutOnAndHasSummary_showsDisabledSummary() {
doReturn(DEFAULT_SUMMARY).when(mServiceInfo).loadSummary(any());
setShortcutEnabled(mServiceInfo.getComponentName(), true);
@@ -307,7 +279,6 @@
}
@Test
- @Ignore
public void getServiceSummary_disableServiceShortcutOffAndHasSummary_showsDisabledSummary() {
setShortcutEnabled(mServiceInfo.getComponentName(), false);
doReturn(DEFAULT_SUMMARY).when(mServiceInfo).loadSummary(any());
@@ -322,7 +293,6 @@
}
@Test
- @Ignore
public void getServiceDescription_serviceCrash_showsStopped() {
mServiceInfo.crashed = true;
@@ -334,7 +304,6 @@
}
@Test
- @Ignore
public void getServiceDescription_haveDescription_showsDescription() {
doReturn(DEFAULT_DESCRIPTION).when(mServiceInfo).loadDescription(any());
@@ -345,42 +314,66 @@
}
@Test
- @Ignore
- @Config(shadows = {ShadowFragment.class, ShadowUserManager.class})
public void onCreate_haveRegisterToSpecificUrisAndActions() {
- mFragment.onAttach(mContext);
+ setupFragment();
- mFragment.onCreate(Bundle.EMPTY);
-
- verify(mContentResolver).registerContentObserver(
- eq(Settings.Secure.getUriFor(Settings.Secure.ACCESSIBILITY_BUTTON_TARGETS)),
- anyBoolean(),
- any(AccessibilitySettingsContentObserver.class));
- verify(mContentResolver).registerContentObserver(eq(Settings.Secure.getUriFor(
- Settings.Secure.ACCESSIBILITY_SHORTCUT_TARGET_SERVICE)), anyBoolean(),
- any(AccessibilitySettingsContentObserver.class));
- verify(mActivity, atLeast(1)).registerReceiver(
- any(PackageMonitor.class), any(), isNull(), any());
+ ShadowContentResolver shadowContentResolver = shadowOf(mContext.getContentResolver());
+ Collection<ContentObserver> a11yButtonTargetsObservers =
+ shadowContentResolver.getContentObservers(
+ Settings.Secure.getUriFor(Settings.Secure.ACCESSIBILITY_BUTTON_TARGETS));
+ Collection<ContentObserver> a11yShortcutTargetServiceObservers =
+ shadowContentResolver.getContentObservers(Settings.Secure.getUriFor(
+ Settings.Secure.ACCESSIBILITY_SHORTCUT_TARGET_SERVICE));
+ List<BroadcastReceiver> broadcastReceivers =
+ shadowOf((Application) ApplicationProvider.getApplicationContext())
+ .getRegisteredReceivers()
+ .stream().map(wrapper -> wrapper.broadcastReceiver).toList();
+ assertThat(
+ a11yButtonTargetsObservers.stream()
+ .anyMatch(contentObserver ->
+ contentObserver instanceof AccessibilitySettingsContentObserver))
+ .isTrue();
+ assertThat(
+ a11yShortcutTargetServiceObservers.stream()
+ .anyMatch(contentObserver ->
+ contentObserver instanceof AccessibilitySettingsContentObserver))
+ .isTrue();
+ assertThat(broadcastReceivers.stream().anyMatch(
+ broadcastReceiver -> broadcastReceiver instanceof PackageMonitor)).isTrue();
}
@Test
- @Ignore
- @Config(shadows = {ShadowFragment.class, ShadowUserManager.class})
public void onDestroy_unregisterObserverAndReceiver() {
setupFragment();
- mFragment.onPause();
- mFragment.onStop();
- mFragment.onDestroy();
+ mActivityController.pause().stop().destroy();
- verify(mContentResolver).unregisterContentObserver(
- any(AccessibilitySettingsContentObserver.class));
- verify(mActivity).unregisterReceiver(any(PackageMonitor.class));
+ ShadowContentResolver shadowContentResolver = shadowOf(mContext.getContentResolver());
+ Collection<ContentObserver> a11yButtonTargetsObservers =
+ shadowContentResolver.getContentObservers(
+ Settings.Secure.getUriFor(Settings.Secure.ACCESSIBILITY_BUTTON_TARGETS));
+ Collection<ContentObserver> a11yShortcutTargetServiceObservers =
+ shadowContentResolver.getContentObservers(Settings.Secure.getUriFor(
+ Settings.Secure.ACCESSIBILITY_SHORTCUT_TARGET_SERVICE));
+ List<BroadcastReceiver> broadcastReceivers =
+ shadowOf((Application) ApplicationProvider.getApplicationContext())
+ .getRegisteredReceivers()
+ .stream().map(wrapper -> wrapper.broadcastReceiver).toList();
+ assertThat(
+ a11yButtonTargetsObservers.stream()
+ .anyMatch(contentObserver ->
+ contentObserver instanceof AccessibilitySettingsContentObserver))
+ .isFalse();
+ assertThat(
+ a11yShortcutTargetServiceObservers.stream()
+ .anyMatch(contentObserver ->
+ contentObserver instanceof AccessibilitySettingsContentObserver))
+ .isFalse();
+ assertThat(broadcastReceivers.stream().anyMatch(
+ broadcastReceiver -> broadcastReceiver instanceof PackageMonitor)).isFalse();
}
@Test
- @Ignore
- @Config(shadows = {ShadowFragment.class, ShadowUserManager.class})
public void onContentChanged_updatePreferenceInForeground_preferenceUpdated() {
setupFragment();
mShadowAccessibilityManager.setInstalledAccessibilityServiceList(
@@ -396,8 +389,6 @@
}
@Test
- @Ignore
- @Config(shadows = {ShadowFragment.class, ShadowUserManager.class})
public void onContentChanged_updatePreferenceInBackground_preferenceUpdated() {
setupFragment();
mFragment.onPause();
@@ -417,8 +408,6 @@
}
@Test
- @Ignore
- @Config(shadows = {ShadowFragment.class, ShadowUserManager.class})
public void testAccessibilityMenuInSystem_IncludedInInteractionControl() {
mShadowAccessibilityManager.setInstalledAccessibilityServiceList(
List.of(getMockAccessibilityServiceInfo(
@@ -433,8 +422,6 @@
}
@Test
- @Ignore
- @Config(shadows = {ShadowFragment.class, ShadowUserManager.class})
public void testAccessibilityMenuInSystem_NoPrefWhenNotInstalled() {
mShadowAccessibilityManager.setInstalledAccessibilityServiceList(List.of());
setupFragment();
@@ -487,10 +474,14 @@
}
private void setupFragment() {
- mFragment.onAttach(mContext);
- mFragment.onCreate(Bundle.EMPTY);
- mFragment.onStart();
- mFragment.onResume();
+ mActivityController.create().start().resume();
+ Fragment fragment = mActivityController.get().getSupportFragmentManager().findFragmentById(
+ R.id.main_content);
+
+ assertThat(fragment).isNotNull();
+ assertThat(fragment).isInstanceOf(AccessibilitySettings.class);
+
+ mFragment = (AccessibilitySettings) fragment;
}
private void setShortcutEnabled(ComponentName componentName, boolean enabled) {
diff --git a/tests/robotests/src/com/android/settings/accessibility/ToggleScreenMagnificationPreferenceFragmentTest.java b/tests/robotests/src/com/android/settings/accessibility/ToggleScreenMagnificationPreferenceFragmentTest.java
index 72e9b54..f0b2fbe 100644
--- a/tests/robotests/src/com/android/settings/accessibility/ToggleScreenMagnificationPreferenceFragmentTest.java
+++ b/tests/robotests/src/com/android/settings/accessibility/ToggleScreenMagnificationPreferenceFragmentTest.java
@@ -57,7 +57,6 @@
import com.google.common.truth.Correspondence;
import org.junit.Before;
-import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.robolectric.RobolectricTestRunner;
@@ -78,7 +77,6 @@
ShadowUserManager.class,
ShadowStorageManager.class,
ShadowSettings.ShadowSecure.class,
- com.android.settings.testutils.shadow.ShadowFragment.class,
})
public class ToggleScreenMagnificationPreferenceFragmentTest {
@@ -101,7 +99,6 @@
private static final String KEY_FOLLOW_TYPING =
Settings.Secure.ACCESSIBILITY_MAGNIFICATION_FOLLOW_TYPING_ENABLED;
-
private FragmentController<ToggleScreenMagnificationPreferenceFragment> mFragController;
private Context mContext;
private Resources mSpyResources;
@@ -109,6 +106,7 @@
@Before
public void setUpTestFragment() {
+
mContext = ApplicationProvider.getApplicationContext();
// Set up the fragment that support window magnification feature
@@ -130,7 +128,6 @@
}
@Test
- @Ignore
public void onResume_defaultStateForFollowingTyping_switchPreferenceShouldReturnTrue() {
setKeyFollowTypingEnabled(true);
@@ -144,7 +141,6 @@
}
@Test
- @Ignore
public void onResume_disableFollowingTyping_switchPreferenceShouldReturnFalse() {
setKeyFollowTypingEnabled(false);
@@ -158,7 +154,6 @@
}
@Test
- @Ignore
public void onResume_haveRegisterToSpecificUris() {
ShadowContentResolver shadowContentResolver = Shadows.shadowOf(
mContext.getContentResolver());
@@ -187,7 +182,6 @@
}
@Test
- @Ignore
public void hasValueInSettings_putValue_hasValue() {
setMagnificationTripleTapEnabled(/* enabled= */ true);
@@ -196,7 +190,6 @@
}
@Test
- @Ignore
public void optInAllValuesToSettings_optInValue_haveMatchString() {
int shortcutTypes = UserShortcutType.SOFTWARE | UserShortcutType.TRIPLETAP;
@@ -210,7 +203,6 @@
}
@Test
- @Ignore
public void optInAllValuesToSettings_existOtherValue_optInValue_haveMatchString() {
putStringIntoSettings(SOFTWARE_SHORTCUT_KEY, PLACEHOLDER_COMPONENT_NAME.flattenToString());
@@ -222,7 +214,6 @@
}
@Test
- @Ignore
public void optInAllValuesToSettings_software_sizeValueIsNull_putLargeSizeValue() {
ShadowSettings.ShadowSecure.reset();
@@ -236,7 +227,6 @@
}
@Test
- @Ignore
public void optInAllValuesToSettings_software_sizeValueIsNotNull_sizeValueIsNotChanged() {
for (int size : new int[] {FloatingMenuSizePreferenceController.Size.LARGE,
FloatingMenuSizePreferenceController.Size.SMALL}) {
@@ -255,7 +245,6 @@
}
@Test
- @Ignore
public void optInAllValuesToSettings_hardware_sizeValueIsNotChanged() {
for (int size : new int[] {FloatingMenuSizePreferenceController.Size.UNKNOWN,
FloatingMenuSizePreferenceController.Size.LARGE,
@@ -274,7 +263,6 @@
}
@Test
- @Ignore
public void optInAllValuesToSettings_tripletap_sizeValueIsNotChanged() {
for (int size : new int[] {FloatingMenuSizePreferenceController.Size.UNKNOWN,
FloatingMenuSizePreferenceController.Size.LARGE,
@@ -293,7 +281,6 @@
}
@Test
- @Ignore
public void optOutAllValuesToSettings_optOutValue_emptyString() {
putStringIntoSettings(SOFTWARE_SHORTCUT_KEY, MAGNIFICATION_CONTROLLER_NAME);
putStringIntoSettings(HARDWARE_SHORTCUT_KEY, MAGNIFICATION_CONTROLLER_NAME);
@@ -310,7 +297,6 @@
}
@Test
- @Ignore
public void optOutValueFromSettings_existOtherValue_optOutValue_haveMatchString() {
putStringIntoSettings(SOFTWARE_SHORTCUT_KEY,
PLACEHOLDER_COMPONENT_NAME.flattenToString() + ":" + MAGNIFICATION_CONTROLLER_NAME);
@@ -328,7 +314,6 @@
}
@Test
- @Ignore
public void updateShortcutPreferenceData_assignDefaultValueToVariable() {
mFragController.create(R.id.main_content, /* bundle= */ null).start().resume();
@@ -341,7 +326,6 @@
}
@Test
- @Ignore
public void updateShortcutPreferenceData_hasValueInSettings_assignToVariable() {
putStringIntoSettings(SOFTWARE_SHORTCUT_KEY, MAGNIFICATION_CONTROLLER_NAME);
setMagnificationTripleTapEnabled(/* enabled= */ true);
@@ -355,7 +339,6 @@
}
@Test
- @Ignore
public void updateShortcutPreferenceData_hasValueInSharedPreference_assignToVariable() {
final PreferredShortcut tripleTapShortcut = new PreferredShortcut(
MAGNIFICATION_CONTROLLER_NAME, UserShortcutType.TRIPLETAP);
@@ -370,7 +353,6 @@
}
@Test
- @Ignore
public void setupMagnificationEditShortcutDialog_shortcutPreferenceOff_checkboxIsEmptyValue() {
ToggleScreenMagnificationPreferenceFragment fragment =
mFragController.create(R.id.main_content, /* bundle= */
@@ -386,7 +368,6 @@
}
@Test
- @Ignore
public void setupMagnificationEditShortcutDialog_shortcutPreferenceOn_checkboxIsSavedValue() {
ToggleScreenMagnificationPreferenceFragment fragment =
mFragController.create(R.id.main_content, /* bundle= */
@@ -407,7 +388,6 @@
}
@Test
- @Ignore
public void restoreValueFromSavedInstanceState_assignToVariable() {
final Bundle fragmentState = createFragmentSavedInstanceState(
UserShortcutType.HARDWARE | UserShortcutType.TRIPLETAP);
@@ -429,7 +409,6 @@
}
@Test
- @Ignore
public void onCreateView_magnificationAreaNotSupported_settingsPreferenceIsNull() {
setWindowMagnificationSupported(
/* magnificationAreaSupported= */ false,
@@ -441,7 +420,6 @@
}
@Test
- @Ignore
public void onCreateView_windowMagnificationNotSupported_settingsPreferenceIsNull() {
setWindowMagnificationSupported(
/* magnificationAreaSupported= */ true,
@@ -453,7 +431,6 @@
}
@Test
- @Ignore
public void onCreateView_setDialogDelegateAndAddTheControllerToLifeCycleObserver() {
Correspondence instanceOf = Correspondence.transforming(
observer -> (observer instanceof MagnificationModePreferenceController),
@@ -471,7 +448,6 @@
}
@Test
- @Ignore
public void onCreateDialog_setDialogDelegate_invokeDialogDelegate() {
ToggleScreenMagnificationPreferenceFragment fragment =
mFragController.create(
@@ -488,7 +464,6 @@
}
@Test
- @Ignore
public void getMetricsCategory_returnsCorrectCategory() {
ToggleScreenMagnificationPreferenceFragment fragment =
mFragController.create(
@@ -499,7 +474,6 @@
}
@Test
- @Ignore
public void getHelpResource_returnsCorrectHelpResource() {
ToggleScreenMagnificationPreferenceFragment fragment =
mFragController.create(
@@ -509,7 +483,6 @@
}
@Test
- @Ignore
public void onProcessArguments_defaultArgumentUnavailable_shouldSetDefaultArguments() {
ToggleScreenMagnificationPreferenceFragment fragment =
mFragController.create(
@@ -524,7 +497,6 @@
}
@Test
- @Ignore
public void getSummary_magnificationEnabled_returnShortcutOnWithSummary() {
setMagnificationTripleTapEnabled(true);
@@ -535,7 +507,6 @@
}
@Test
- @Ignore
public void getSummary_magnificationDisabled_returnShortcutOffWithSummary() {
setMagnificationTripleTapEnabled(false);
diff --git a/tests/robotests/src/com/android/settings/biometrics/fingerprint/FingerprintEnrollFindSensorTest.java b/tests/robotests/src/com/android/settings/biometrics/fingerprint/FingerprintEnrollFindSensorTest.java
index 72f1ab8..adf76f4 100644
--- a/tests/robotests/src/com/android/settings/biometrics/fingerprint/FingerprintEnrollFindSensorTest.java
+++ b/tests/robotests/src/com/android/settings/biometrics/fingerprint/FingerprintEnrollFindSensorTest.java
@@ -19,6 +19,7 @@
import static android.hardware.fingerprint.FingerprintSensorProperties.TYPE_POWER_BUTTON;
import static android.hardware.fingerprint.FingerprintSensorProperties.TYPE_REAR;
import static android.hardware.fingerprint.FingerprintSensorProperties.TYPE_UDFPS_OPTICAL;
+import static android.text.Layout.HYPHENATION_FREQUENCY_NORMAL;
import static com.android.settings.biometrics.BiometricEnrollBase.RESULT_FINISHED;
import static com.android.settings.biometrics.BiometricEnrollBase.RESULT_SKIP;
@@ -49,6 +50,7 @@
import android.os.Bundle;
import android.os.CancellationSignal;
import android.view.View;
+import android.widget.TextView;
import androidx.fragment.app.Fragment;
@@ -62,6 +64,7 @@
import com.google.android.setupcompat.template.FooterBarMixin;
import com.google.android.setupcompat.template.FooterButton;
import com.google.android.setupdesign.GlifLayout;
+import com.google.android.setupdesign.template.HeaderMixin;
import org.junit.After;
import org.junit.Before;
@@ -568,6 +571,15 @@
assertThat(appliedThemes.contains("SetupWizardPartnerResource")).isTrue();
}
+ @Test
+ public void fingerprintEnrollFindSensor_setHyphenationFrequencyNormalOnHeader() {
+ setupActivity_onUdfpsDevice();
+ PartnerCustomizationLayout layout = mActivity.findViewById(R.id.setup_wizard_layout);
+ final TextView textView = layout.getMixin(HeaderMixin.class).getTextView();
+
+ assertThat(textView.getHyphenationFrequency()).isEqualTo(HYPHENATION_FREQUENCY_NORMAL);
+ }
+
private void triggerEnrollProgressAndError_onRearDevice() {
EnrollmentCallback enrollmentCallback = verifyAndCaptureEnrollmentCallback();
enrollmentCallback.onEnrollmentProgress(123);
diff --git a/tests/robotests/src/com/android/settings/bluetooth/BluetoothDetailsProfilesControllerTest.java b/tests/robotests/src/com/android/settings/bluetooth/BluetoothDetailsProfilesControllerTest.java
index 76023c5..ad7c984 100644
--- a/tests/robotests/src/com/android/settings/bluetooth/BluetoothDetailsProfilesControllerTest.java
+++ b/tests/robotests/src/com/android/settings/bluetooth/BluetoothDetailsProfilesControllerTest.java
@@ -28,6 +28,7 @@
import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothProfile;
import android.content.Context;
+import android.sysprop.BluetoothProperties;
import androidx.preference.Preference;
import androidx.preference.PreferenceCategory;
@@ -41,6 +42,8 @@
import com.android.settingslib.bluetooth.MapProfile;
import com.android.settingslib.bluetooth.PbapServerProfile;
+import com.google.common.collect.Lists;
+
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -60,6 +63,8 @@
@Config(shadows = ShadowBluetoothDevice.class)
public class BluetoothDetailsProfilesControllerTest extends BluetoothDetailsControllerTestBase {
+ private static final String LE_DEVICE_MODEL = "le_audio_headset";
+ private static final String NON_LE_DEVICE_MODEL = "non_le_audio_headset";
private BluetoothDetailsProfilesController mController;
private List<LocalBluetoothProfile> mConnectableProfiles;
private PreferenceCategory mProfiles;
@@ -88,6 +93,7 @@
mProfiles.setKey(mController.getPreferenceKey());
mController.mProfilesContainer = mProfiles;
mScreen.addPreference(mProfiles);
+ BluetoothProperties.le_audio_allow_list(Lists.newArrayList(LE_DEVICE_MODEL));
}
static class FakeBluetoothProfile implements LocalBluetoothProfile {
@@ -472,4 +478,15 @@
verify(mProfileManager).removeServiceListener(mController);
}
+
+ @Test
+ public void isDeviceInAllowList_returnTrue() {
+ assertThat(mController.isModelNameInAllowList(LE_DEVICE_MODEL)).isTrue();
+ }
+
+ @Test
+ public void isDeviceInAllowList_returnFalse() {
+ assertThat(mController.isModelNameInAllowList(null)).isFalse();
+ assertThat(mController.isModelNameInAllowList(NON_LE_DEVICE_MODEL)).isFalse();
+ }
}
diff --git a/tests/robotests/src/com/android/settings/development/BluetoothLeAudioAllowListPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/development/BluetoothLeAudioAllowListPreferenceControllerTest.java
index f4e52ba..4ac90a7 100644
--- a/tests/robotests/src/com/android/settings/development/BluetoothLeAudioAllowListPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/development/BluetoothLeAudioAllowListPreferenceControllerTest.java
@@ -19,12 +19,13 @@
import static android.bluetooth.BluetoothStatusCodes.FEATURE_SUPPORTED;
import static com.android.settings.development.BluetoothLeAudioAllowListPreferenceController
- .LE_AUDIO_ALLOW_LIST_ENABLED_PROPERTY;
+ .BYPASS_LE_AUDIO_ALLOWLIST_PROPERTY;
import static com.google.common.truth.Truth.assertThat;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.when;
+import static org.mockito.Mockito.verify;
import android.bluetooth.BluetoothAdapter;
import android.content.Context;
@@ -48,20 +49,18 @@
private PreferenceScreen mPreferenceScreen;
@Mock
private DevelopmentSettingsDashboardFragment mFragment;
-
@Mock
private BluetoothAdapter mBluetoothAdapter;
-
- private Context mContext;
+ @Mock
private SwitchPreference mPreference;
- private BluetoothLeAudioPreferenceController mController;
+ private Context mContext;
+ private BluetoothLeAudioAllowListPreferenceController mController;
@Before
public void setup() {
MockitoAnnotations.initMocks(this);
mContext = RuntimeEnvironment.application;
- mPreference = new SwitchPreference(mContext);
- mController = spy(new BluetoothLeAudioPreferenceController(mContext, mFragment));
+ mController = spy(new BluetoothLeAudioAllowListPreferenceController(mContext, mFragment));
when(mPreferenceScreen.findPreference(mController.getPreferenceKey()))
.thenReturn(mPreference);
mController.mBluetoothAdapter = mBluetoothAdapter;
@@ -71,36 +70,38 @@
}
@Test
- public void onRebootDialogConfirmedAsLeAudioAllowListDisabled_shouldSwitchStatus() {
- SystemProperties.set(LE_AUDIO_ALLOW_LIST_ENABLED_PROPERTY, Boolean.toString(false));
- mController.mChanged = true;
-
- mController.onRebootDialogConfirmed();
- final boolean mode = SystemProperties.getBoolean(
- LE_AUDIO_ALLOW_LIST_ENABLED_PROPERTY, false);
- assertThat(mode).isFalse();
- }
-
-
- @Test
- public void onRebootDialogConfirmedAsLeAudioAllowListEnabled_shouldSwitchStatus() {
- SystemProperties.set(LE_AUDIO_ALLOW_LIST_ENABLED_PROPERTY, Boolean.toString(true));
- mController.mChanged = true;
-
- mController.onRebootDialogConfirmed();
- final boolean status = SystemProperties.getBoolean(
- LE_AUDIO_ALLOW_LIST_ENABLED_PROPERTY, false);
- assertThat(status).isTrue();
+ public void onPreferenceChange_setCheck_shouldBypassLeAudioAllowlist() {
+ mController.onPreferenceChange(mPreference, Boolean.TRUE);
+ assertThat(SystemProperties.getBoolean(BYPASS_LE_AUDIO_ALLOWLIST_PROPERTY,
+ false)).isTrue();
}
@Test
- public void onRebootDialogCanceled_shouldNotSwitchStatus() {
- SystemProperties.set(LE_AUDIO_ALLOW_LIST_ENABLED_PROPERTY, Boolean.toString(false));
- mController.mChanged = true;
+ public void onPreferenceChange_setUnCheck_shouldNotBypassLeAudioAllowlist() {
+ mController.onPreferenceChange(mPreference, Boolean.FALSE);
+ assertThat(SystemProperties.getBoolean(BYPASS_LE_AUDIO_ALLOWLIST_PROPERTY,
+ true)).isFalse();
+ }
- mController.onRebootDialogCanceled();
- final boolean status = SystemProperties.getBoolean(
- LE_AUDIO_ALLOW_LIST_ENABLED_PROPERTY, false);
- assertThat(status).isFalse();
+ @Test
+ public void updateState_bluetoothOff_shouldDisableToggle() {
+ mController.mBluetoothAdapter = null;
+ mController.updateState(mPreference);
+ verify(mPreference).setEnabled(false);
+ }
+
+ @Test
+ public void updateState_bluetoothOn_shouldShowStatus() {
+ SystemProperties.set(BYPASS_LE_AUDIO_ALLOWLIST_PROPERTY, Boolean.toString(true));
+ mController.updateState(mPreference);
+ verify(mPreference).setChecked(true);
+ }
+
+ @Test
+ public void onDeveloperOptionsSwitchDisabled_shouldSetBypassLeAudioAllowlistToFalse() {
+ SystemProperties.set(BYPASS_LE_AUDIO_ALLOWLIST_PROPERTY, Boolean.toString(true));
+ mController.onDeveloperOptionsSwitchDisabled();
+ verify(mPreference).setEnabled(false);
+ assertThat(SystemProperties.getBoolean(BYPASS_LE_AUDIO_ALLOWLIST_PROPERTY, true)).isFalse();
}
}
diff --git a/tests/robotests/src/com/android/settings/development/BluetoothLeAudioDeviceDetailsPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/development/BluetoothLeAudioDeviceDetailsPreferenceControllerTest.java
index 13bc6a4..36c9231 100644
--- a/tests/robotests/src/com/android/settings/development/BluetoothLeAudioDeviceDetailsPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/development/BluetoothLeAudioDeviceDetailsPreferenceControllerTest.java
@@ -114,6 +114,7 @@
@Test
public void isAvailable_leAudioSupported() {
+ mController.mLeAudioEnabledByDefault = false;
mController.sLeAudioSupportedStateCache = BluetoothStatusCodes.ERROR_UNKNOWN;
when(mBluetoothAdapter.isLeAudioSupported())
.thenReturn(BluetoothStatusCodes.FEATURE_SUPPORTED);
@@ -122,9 +123,16 @@
@Test
public void isAvailable_leAudioNotSupported() {
+ mController.mLeAudioEnabledByDefault = false;
mController.sLeAudioSupportedStateCache = BluetoothStatusCodes.ERROR_UNKNOWN;
when(mBluetoothAdapter.isLeAudioSupported())
.thenReturn(BluetoothStatusCodes.FEATURE_NOT_SUPPORTED);
assertThat(mController.isAvailable()).isFalse();
}
+
+ @Test
+ public void isUnAvailable_ifLeAudioConnectionByDefault() {
+ mController.mLeAudioEnabledByDefault = true;
+ assertThat(mController.isAvailable()).isFalse();
+ }
}
diff --git a/tests/robotests/src/com/android/settings/fuelgauge/AdvancedPowerUsageDetailTest.java b/tests/robotests/src/com/android/settings/fuelgauge/AdvancedPowerUsageDetailTest.java
index 5827498..9131051 100644
--- a/tests/robotests/src/com/android/settings/fuelgauge/AdvancedPowerUsageDetailTest.java
+++ b/tests/robotests/src/com/android/settings/fuelgauge/AdvancedPowerUsageDetailTest.java
@@ -30,7 +30,6 @@
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyNoInteractions;
import static org.mockito.Mockito.when;
-import static org.robolectric.shadows.ShadowLooper.shadowMainLooper;
import android.app.AppOpsManager;
import android.app.backup.BackupManager;
@@ -42,7 +41,6 @@
import android.content.pm.PackageManager;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
-import android.os.Process;
import android.os.UserHandle;
import androidx.fragment.app.FragmentActivity;
@@ -77,6 +75,8 @@
import org.robolectric.annotation.Config;
import org.robolectric.util.ReflectionHelpers;
+import java.util.concurrent.TimeUnit;
+
@RunWith(RobolectricTestRunner.class)
@Config(shadows = {
ShadowEntityHeaderController.class,
@@ -88,7 +88,6 @@
private static final String SUMMARY = "summary";
private static final String[] PACKAGE_NAME = {"com.android.app"};
private static final String USAGE_PERCENT = "16%";
- private static final String SLOT_TIME = "12 am-2 am";
private static final int ICON_ID = 123;
private static final int UID = 1;
private static final long BACKGROUND_TIME_MS = 100;
@@ -96,7 +95,6 @@
private static final long FOREGROUND_SERVICE_TIME_MS = 444;
private static final long FOREGROUND_TIME_MS =
FOREGROUND_ACTIVITY_TIME_MS + FOREGROUND_SERVICE_TIME_MS;
- private static final long FOREGROUND_SERVICE_TIME_US = FOREGROUND_SERVICE_TIME_MS * 1000;
private static final String KEY_PREF_UNRESTRICTED = "unrestricted_pref";
private static final String KEY_PREF_OPTIMIZED = "optimized_pref";
private static final String KEY_PREF_RESTRICTED = "restricted_pref";
@@ -264,405 +262,6 @@
}
@Test
- public void initHeader_noAnyTimeNoConsumedPower_hasEmptySummary() {
- Bundle bundle = new Bundle();
- bundle.putLong(AdvancedPowerUsageDetail.EXTRA_BACKGROUND_TIME, /* value */ 0);
- bundle.putLong(AdvancedPowerUsageDetail.EXTRA_FOREGROUND_TIME, /* value */ 0);
- bundle.putLong(AdvancedPowerUsageDetail.EXTRA_SCREEN_ON_TIME, /* value */ 0);
- when(mFragment.getArguments()).thenReturn(bundle);
-
- mFragment.initHeader();
-
- ArgumentCaptor<CharSequence> captor = ArgumentCaptor.forClass(CharSequence.class);
- verify(mEntityHeaderController).setSummary(captor.capture());
- assertThat(captor.getValue().toString()).isEmpty();
- }
-
- @Test
- public void initHeader_noAnyTimeButConsumedPower_hasEmptySummary() {
- Bundle bundle = new Bundle();
- bundle.putLong(AdvancedPowerUsageDetail.EXTRA_BACKGROUND_TIME, /* value */ 0);
- bundle.putLong(AdvancedPowerUsageDetail.EXTRA_FOREGROUND_TIME, /* value */ 0);
- bundle.putLong(AdvancedPowerUsageDetail.EXTRA_SCREEN_ON_TIME, /* value */ 0);
- bundle.putInt(AdvancedPowerUsageDetail.EXTRA_POWER_USAGE_AMOUNT, /* value */ 10);
- when(mFragment.getArguments()).thenReturn(bundle);
-
- mFragment.initHeader();
-
- ArgumentCaptor<CharSequence> captor = ArgumentCaptor.forClass(CharSequence.class);
- verify(mEntityHeaderController).setSummary(captor.capture());
- assertThat(captor.getValue().toString()).isEmpty();
- }
-
- @Test
- public void initHeader_ScreenTimeZerobackgroundTwoMin_hasCorrectSummary() {
- final long backgroundTimeTwoMinutes = 120000;
- final long foregroundTimeZero = 0;
- final long screenOnTimeZero = 0;
- Bundle bundle = new Bundle();
- bundle.putLong(AdvancedPowerUsageDetail.EXTRA_BACKGROUND_TIME, backgroundTimeTwoMinutes);
- bundle.putLong(AdvancedPowerUsageDetail.EXTRA_FOREGROUND_TIME, foregroundTimeZero);
- bundle.putLong(AdvancedPowerUsageDetail.EXTRA_SCREEN_ON_TIME, screenOnTimeZero);
- when(mFragment.getArguments()).thenReturn(bundle);
-
- mFragment.initHeader();
-
- ArgumentCaptor<CharSequence> captor = ArgumentCaptor.forClass(CharSequence.class);
- verify(mEntityHeaderController).setSummary(captor.capture());
- assertThat(captor.getValue().toString())
- .isEqualTo("Background: 2 min\n(since last full charge)");
- }
-
- @Test
- public void initHeader_ScreenTimeZerobackgroundLessThanAMin_hasCorrectSummary() {
- final long backgroundTimeLessThanAMinute = 59999;
- final long foregroundTimeZero = 0;
- final long screenOnTimeZero = 0;
- Bundle bundle = new Bundle();
- bundle.putLong(
- AdvancedPowerUsageDetail.EXTRA_BACKGROUND_TIME, backgroundTimeLessThanAMinute);
- bundle.putLong(AdvancedPowerUsageDetail.EXTRA_FOREGROUND_TIME, foregroundTimeZero);
- bundle.putLong(AdvancedPowerUsageDetail.EXTRA_SCREEN_ON_TIME, screenOnTimeZero);
- when(mFragment.getArguments()).thenReturn(bundle);
-
- mFragment.initHeader();
-
- ArgumentCaptor<CharSequence> captor = ArgumentCaptor.forClass(CharSequence.class);
- verify(mEntityHeaderController).setSummary(captor.capture());
- assertThat(captor.getValue().toString())
- .isEqualTo("Background: less than a min\n(since last full charge)");
- }
-
- @Test
- public void initHeader_ScreenTimeAMinuteBackgroundTwoMin_hasCorrectSummary() {
- final long backgroundTimeTwoMinutes = 120000;
- final long foregroundTimeTwoMinutes = 120000;
- final long screenOnTimeAMinute = 60000;
- Bundle bundle = new Bundle();
- bundle.putLong(AdvancedPowerUsageDetail.EXTRA_BACKGROUND_TIME, backgroundTimeTwoMinutes);
- bundle.putLong(AdvancedPowerUsageDetail.EXTRA_FOREGROUND_TIME, foregroundTimeTwoMinutes);
- bundle.putLong(AdvancedPowerUsageDetail.EXTRA_SCREEN_ON_TIME, screenOnTimeAMinute);
- when(mFragment.getArguments()).thenReturn(bundle);
-
- mFragment.initHeader();
-
- ArgumentCaptor<CharSequence> captor = ArgumentCaptor.forClass(CharSequence.class);
- verify(mEntityHeaderController).setSummary(captor.capture());
- assertThat(captor.getValue().toString()).isEqualTo(
- "Screen time: 1 min\nBackground: 2 min\n(since last full charge)");
- }
-
- @Test
- public void initHeader_ScreenTimeAMinuteBackgroundLessThanAMin_hasCorrectSummary() {
- final long backgroundTimeLessThanAMinute = 59999;
- final long foregroundTimeTwoMinutes = 120000;
- final long screenOnTimeAMinute = 60000;
- Bundle bundle = new Bundle();
- bundle.putLong(
- AdvancedPowerUsageDetail.EXTRA_BACKGROUND_TIME, backgroundTimeLessThanAMinute);
- bundle.putLong(AdvancedPowerUsageDetail.EXTRA_FOREGROUND_TIME, foregroundTimeTwoMinutes);
- bundle.putLong(AdvancedPowerUsageDetail.EXTRA_SCREEN_ON_TIME, screenOnTimeAMinute);
- when(mFragment.getArguments()).thenReturn(bundle);
-
- mFragment.initHeader();
-
- ArgumentCaptor<CharSequence> captor = ArgumentCaptor.forClass(CharSequence.class);
- verify(mEntityHeaderController).setSummary(captor.capture());
- assertThat(captor.getValue().toString()).isEqualTo(
- "Screen time: 1 min\nBackground: less than a min\n(since last full charge)");
- }
-
- @Test
- public void initHeader_ScreenTimeAMinuteBackgroundZero_hasCorrectSummary() {
- final long backgroundTimezero = 0;
- final long foregroundTimeTwoMinutes = 120000;
- final long screenOnTimeAMinute = 60000;
- Bundle bundle = new Bundle();
- bundle.putLong(AdvancedPowerUsageDetail.EXTRA_BACKGROUND_TIME, backgroundTimezero);
- bundle.putLong(AdvancedPowerUsageDetail.EXTRA_FOREGROUND_TIME, foregroundTimeTwoMinutes);
- bundle.putLong(AdvancedPowerUsageDetail.EXTRA_SCREEN_ON_TIME, screenOnTimeAMinute);
- when(mFragment.getArguments()).thenReturn(bundle);
-
- mFragment.initHeader();
-
- ArgumentCaptor<CharSequence> captor = ArgumentCaptor.forClass(CharSequence.class);
- verify(mEntityHeaderController).setSummary(captor.capture());
- assertThat(captor.getValue().toString()).isEqualTo(
- "Screen time: 1 min\n(since last full charge)");
- }
-
- @Test
- public void initHeader_ScreenTimeLessThanAMinBackgroundTwoMin_hasCorrectSummary() {
- final long backgroundTimeTwoMinutes = 120000;
- final long foregroundTimeTwoMinutes = 120000;
- final long screenOnTimeLessThanAMinute = 59999;
- Bundle bundle = new Bundle();
- bundle.putLong(AdvancedPowerUsageDetail.EXTRA_BACKGROUND_TIME, backgroundTimeTwoMinutes);
- bundle.putLong(AdvancedPowerUsageDetail.EXTRA_FOREGROUND_TIME, foregroundTimeTwoMinutes);
- bundle.putLong(AdvancedPowerUsageDetail.EXTRA_SCREEN_ON_TIME, screenOnTimeLessThanAMinute);
- when(mFragment.getArguments()).thenReturn(bundle);
-
- mFragment.initHeader();
-
- ArgumentCaptor<CharSequence> captor = ArgumentCaptor.forClass(CharSequence.class);
- verify(mEntityHeaderController).setSummary(captor.capture());
- assertThat(captor.getValue().toString()).isEqualTo(
- "Screen time: less than a min\nBackground: 2 min\n(since last full charge)");
- }
-
- @Test
- public void initHeader_ScreenTimeLessThanAMinBackgroundLessThanAMin_hasCorrectSummary() {
- final long backgroundTimeLessThanAMinute = 59999;
- final long foregroundTimeTwoMinutes = 120000;
- final long screenOnTimeLessThanAMinute = 59999;
- Bundle bundle = new Bundle();
- bundle.putLong(
- AdvancedPowerUsageDetail.EXTRA_BACKGROUND_TIME, backgroundTimeLessThanAMinute);
- bundle.putLong(AdvancedPowerUsageDetail.EXTRA_FOREGROUND_TIME, foregroundTimeTwoMinutes);
- bundle.putLong(AdvancedPowerUsageDetail.EXTRA_SCREEN_ON_TIME, screenOnTimeLessThanAMinute);
- when(mFragment.getArguments()).thenReturn(bundle);
-
- mFragment.initHeader();
-
- ArgumentCaptor<CharSequence> captor = ArgumentCaptor.forClass(CharSequence.class);
- verify(mEntityHeaderController).setSummary(captor.capture());
- assertThat(captor.getValue().toString()).isEqualTo(
- "Screen time: less than a min\nBackground: less than a min\n(since last full "
- + "charge)");
- }
-
- @Test
- public void initHeader_ScreenTimeLessThanAMinBackgroundZero_hasCorrectSummary() {
- final long backgroundTimezero = 0;
- final long foregroundTimeTwoMinutes = 120000;
- final long screenOnTimeLessThanAMinute = 59999;
- Bundle bundle = new Bundle();
- bundle.putLong(AdvancedPowerUsageDetail.EXTRA_BACKGROUND_TIME, backgroundTimezero);
- bundle.putLong(AdvancedPowerUsageDetail.EXTRA_FOREGROUND_TIME, foregroundTimeTwoMinutes);
- bundle.putLong(AdvancedPowerUsageDetail.EXTRA_SCREEN_ON_TIME, screenOnTimeLessThanAMinute);
- when(mFragment.getArguments()).thenReturn(bundle);
-
- mFragment.initHeader();
-
- ArgumentCaptor<CharSequence> captor = ArgumentCaptor.forClass(CharSequence.class);
- verify(mEntityHeaderController).setSummary(captor.capture());
- assertThat(captor.getValue().toString()).isEqualTo(
- "Screen time: less than a min\n(since last full charge)");
- }
-
- @Test
- public void initHeader_noAnyTimeNoConsumedPowerWithSlotTime_hasEmptySummary() {
- Bundle bundle = new Bundle();
- bundle.putLong(AdvancedPowerUsageDetail.EXTRA_BACKGROUND_TIME, /* value */ 0);
- bundle.putLong(AdvancedPowerUsageDetail.EXTRA_FOREGROUND_TIME, /* value */ 0);
- bundle.putLong(AdvancedPowerUsageDetail.EXTRA_SCREEN_ON_TIME, /* value */ 0);
- bundle.putString(AdvancedPowerUsageDetail.EXTRA_SLOT_TIME, SLOT_TIME);
- when(mFragment.getArguments()).thenReturn(bundle);
-
- mFragment.initHeader();
-
- ArgumentCaptor<CharSequence> captor = ArgumentCaptor.forClass(CharSequence.class);
- verify(mEntityHeaderController).setSummary(captor.capture());
- assertThat(captor.getValue().toString()).isEmpty();
- }
-
- @Test
- public void initHeader_noAnyTimeButConsumedPowerWithSlotTime_hasEmptySummary() {
- Bundle bundle = new Bundle();
- bundle.putLong(AdvancedPowerUsageDetail.EXTRA_BACKGROUND_TIME, /* value */ 0);
- bundle.putLong(AdvancedPowerUsageDetail.EXTRA_FOREGROUND_TIME, /* value */ 0);
- bundle.putLong(AdvancedPowerUsageDetail.EXTRA_SCREEN_ON_TIME, /* value */ 0);
- bundle.putInt(AdvancedPowerUsageDetail.EXTRA_POWER_USAGE_AMOUNT, /* value */ 10);
- bundle.putString(AdvancedPowerUsageDetail.EXTRA_SLOT_TIME, SLOT_TIME);
- when(mFragment.getArguments()).thenReturn(bundle);
-
- mFragment.initHeader();
-
- ArgumentCaptor<CharSequence> captor = ArgumentCaptor.forClass(CharSequence.class);
- verify(mEntityHeaderController).setSummary(captor.capture());
- assertThat(captor.getValue().toString()).isEmpty();
- }
-
- @Test
- public void initHeader_ScreenTimeZerobackgroundTwoMinWithSlotTime_hasCorrectSummary() {
- final long backgroundTimeTwoMinutes = 120000;
- final long foregroundTimeZero = 0;
- final long screenOnTimeZero = 0;
- Bundle bundle = new Bundle();
- bundle.putLong(AdvancedPowerUsageDetail.EXTRA_BACKGROUND_TIME, backgroundTimeTwoMinutes);
- bundle.putLong(AdvancedPowerUsageDetail.EXTRA_FOREGROUND_TIME, foregroundTimeZero);
- bundle.putLong(AdvancedPowerUsageDetail.EXTRA_SCREEN_ON_TIME, screenOnTimeZero);
- bundle.putString(AdvancedPowerUsageDetail.EXTRA_SLOT_TIME, SLOT_TIME);
- when(mFragment.getArguments()).thenReturn(bundle);
-
- mFragment.initHeader();
-
- ArgumentCaptor<CharSequence> captor = ArgumentCaptor.forClass(CharSequence.class);
- verify(mEntityHeaderController).setSummary(captor.capture());
- assertThat(captor.getValue().toString())
- .isEqualTo("Background: 2 min\n(12 am-2 am)");
- }
-
- @Test
- public void initHeader_ScreenTimeZerobackgroundLessThanAMinWithSlotTime_hasCorrectSummary() {
- final long backgroundTimeLessThanAMinute = 59999;
- final long foregroundTimeZero = 0;
- final long screenOnTimeZero = 0;
- Bundle bundle = new Bundle();
- bundle.putLong(
- AdvancedPowerUsageDetail.EXTRA_BACKGROUND_TIME, backgroundTimeLessThanAMinute);
- bundle.putLong(AdvancedPowerUsageDetail.EXTRA_FOREGROUND_TIME, foregroundTimeZero);
- bundle.putLong(AdvancedPowerUsageDetail.EXTRA_SCREEN_ON_TIME, screenOnTimeZero);
- bundle.putString(AdvancedPowerUsageDetail.EXTRA_SLOT_TIME, SLOT_TIME);
- when(mFragment.getArguments()).thenReturn(bundle);
-
- mFragment.initHeader();
-
- ArgumentCaptor<CharSequence> captor = ArgumentCaptor.forClass(CharSequence.class);
- verify(mEntityHeaderController).setSummary(captor.capture());
- assertThat(captor.getValue().toString())
- .isEqualTo("Background: less than a min\n(12 am-2 am)");
- }
-
- @Test
- public void initHeader_ScreenTimeAMinuteBackgroundTwoMinWithSlotTime_hasCorrectSummary() {
- final long backgroundTimeTwoMinutes = 120000;
- final long foregroundTimeTwoMinutes = 120000;
- final long screenOnTimeAMinute = 60000;
- Bundle bundle = new Bundle();
- bundle.putLong(AdvancedPowerUsageDetail.EXTRA_BACKGROUND_TIME, backgroundTimeTwoMinutes);
- bundle.putLong(AdvancedPowerUsageDetail.EXTRA_FOREGROUND_TIME, foregroundTimeTwoMinutes);
- bundle.putLong(AdvancedPowerUsageDetail.EXTRA_SCREEN_ON_TIME, screenOnTimeAMinute);
- bundle.putString(AdvancedPowerUsageDetail.EXTRA_SLOT_TIME, SLOT_TIME);
- when(mFragment.getArguments()).thenReturn(bundle);
-
- mFragment.initHeader();
-
- ArgumentCaptor<CharSequence> captor = ArgumentCaptor.forClass(CharSequence.class);
- verify(mEntityHeaderController).setSummary(captor.capture());
- assertThat(captor.getValue().toString()).isEqualTo(
- "Screen time: 1 min\nBackground: 2 min\n(12 am-2 am)");
- }
-
- @Test
- public void initHeader_ScreenTimeAMinuteBackgroundLessThanAMinWithSlotTime_hasCorrectSummary() {
- final long backgroundTimeLessThanAMinute = 59999;
- final long foregroundTimeTwoMinutes = 120000;
- final long screenOnTimeAMinute = 60000;
- Bundle bundle = new Bundle();
- bundle.putLong(
- AdvancedPowerUsageDetail.EXTRA_BACKGROUND_TIME, backgroundTimeLessThanAMinute);
- bundle.putLong(AdvancedPowerUsageDetail.EXTRA_FOREGROUND_TIME, foregroundTimeTwoMinutes);
- bundle.putLong(AdvancedPowerUsageDetail.EXTRA_SCREEN_ON_TIME, screenOnTimeAMinute);
- bundle.putString(AdvancedPowerUsageDetail.EXTRA_SLOT_TIME, SLOT_TIME);
- when(mFragment.getArguments()).thenReturn(bundle);
-
- mFragment.initHeader();
-
- ArgumentCaptor<CharSequence> captor = ArgumentCaptor.forClass(CharSequence.class);
- verify(mEntityHeaderController).setSummary(captor.capture());
- assertThat(captor.getValue().toString()).isEqualTo(
- "Screen time: 1 min\nBackground: less than a min\n(12 am-2 am)");
- }
-
- @Test
- public void initHeader_ScreenTimeAMinuteBackgroundZeroWithSlotTime_hasCorrectSummary() {
- final long backgroundTimezero = 0;
- final long foregroundTimeTwoMinutes = 120000;
- final long screenOnTimeAMinute = 60000;
- Bundle bundle = new Bundle();
- bundle.putLong(AdvancedPowerUsageDetail.EXTRA_BACKGROUND_TIME, backgroundTimezero);
- bundle.putLong(AdvancedPowerUsageDetail.EXTRA_FOREGROUND_TIME, foregroundTimeTwoMinutes);
- bundle.putLong(AdvancedPowerUsageDetail.EXTRA_SCREEN_ON_TIME, screenOnTimeAMinute);
- bundle.putString(AdvancedPowerUsageDetail.EXTRA_SLOT_TIME, SLOT_TIME);
- when(mFragment.getArguments()).thenReturn(bundle);
-
- mFragment.initHeader();
-
- ArgumentCaptor<CharSequence> captor = ArgumentCaptor.forClass(CharSequence.class);
- verify(mEntityHeaderController).setSummary(captor.capture());
- assertThat(captor.getValue().toString()).isEqualTo(
- "Screen time: 1 min\n(12 am-2 am)");
- }
-
- @Test
- public void initHeader_ScreenTimeLessThanAMinBackgroundTwoMinWithSlotTime_hasCorrectSummary() {
- final long backgroundTimeTwoMinutes = 120000;
- final long foregroundTimeTwoMinutes = 120000;
- final long screenOnTimeLessThanAMinute = 59999;
- Bundle bundle = new Bundle();
- bundle.putLong(AdvancedPowerUsageDetail.EXTRA_BACKGROUND_TIME, backgroundTimeTwoMinutes);
- bundle.putLong(AdvancedPowerUsageDetail.EXTRA_FOREGROUND_TIME, foregroundTimeTwoMinutes);
- bundle.putLong(AdvancedPowerUsageDetail.EXTRA_SCREEN_ON_TIME, screenOnTimeLessThanAMinute);
- bundle.putString(AdvancedPowerUsageDetail.EXTRA_SLOT_TIME, SLOT_TIME);
- when(mFragment.getArguments()).thenReturn(bundle);
-
- mFragment.initHeader();
-
- ArgumentCaptor<CharSequence> captor = ArgumentCaptor.forClass(CharSequence.class);
- verify(mEntityHeaderController).setSummary(captor.capture());
- assertThat(captor.getValue().toString()).isEqualTo(
- "Screen time: less than a min\nBackground: 2 min\n(12 am-2 am)");
- }
-
- @Test
- public void initHeader_ScreenTimeLessAMinBackgroundLessAMinWithSlotTime_hasCorrectSummary() {
- final long backgroundTimeLessThanAMinute = 59999;
- final long foregroundTimeTwoMinutes = 120000;
- final long screenOnTimeLessThanAMinute = 59999;
- Bundle bundle = new Bundle();
- bundle.putLong(
- AdvancedPowerUsageDetail.EXTRA_BACKGROUND_TIME, backgroundTimeLessThanAMinute);
- bundle.putLong(AdvancedPowerUsageDetail.EXTRA_FOREGROUND_TIME, foregroundTimeTwoMinutes);
- bundle.putLong(AdvancedPowerUsageDetail.EXTRA_SCREEN_ON_TIME, screenOnTimeLessThanAMinute);
- bundle.putString(AdvancedPowerUsageDetail.EXTRA_SLOT_TIME, SLOT_TIME);
- when(mFragment.getArguments()).thenReturn(bundle);
-
- mFragment.initHeader();
-
- ArgumentCaptor<CharSequence> captor = ArgumentCaptor.forClass(CharSequence.class);
- verify(mEntityHeaderController).setSummary(captor.capture());
- assertThat(captor.getValue().toString()).isEqualTo(
- "Screen time: less than a min\nBackground: less than a min\n(12 am-2 am)");
- }
-
- @Test
- public void initHeader_ScreenTimeLessThanAMinBackgroundZeroWithSlotTime_hasCorrectSummary() {
- final long backgroundTimezero = 0;
- final long foregroundTimeTwoMinutes = 120000;
- final long screenOnTimeLessThanAMinute = 59999;
- Bundle bundle = new Bundle();
- bundle.putLong(AdvancedPowerUsageDetail.EXTRA_BACKGROUND_TIME, backgroundTimezero);
- bundle.putLong(AdvancedPowerUsageDetail.EXTRA_FOREGROUND_TIME, foregroundTimeTwoMinutes);
- bundle.putLong(AdvancedPowerUsageDetail.EXTRA_SCREEN_ON_TIME, screenOnTimeLessThanAMinute);
- bundle.putString(AdvancedPowerUsageDetail.EXTRA_SLOT_TIME, SLOT_TIME);
- when(mFragment.getArguments()).thenReturn(bundle);
-
- mFragment.initHeader();
-
- ArgumentCaptor<CharSequence> captor = ArgumentCaptor.forClass(CharSequence.class);
- verify(mEntityHeaderController).setSummary(captor.capture());
- assertThat(captor.getValue().toString()).isEqualTo(
- "Screen time: less than a min\n(12 am-2 am)");
- }
-
- @Test
- public void initHeader_systemUidWithChartIsEnabled_notNullSummary() {
- Bundle bundle = new Bundle();
- bundle.putLong(AdvancedPowerUsageDetail.EXTRA_BACKGROUND_TIME, 240000);
- bundle.putLong(AdvancedPowerUsageDetail.EXTRA_FOREGROUND_TIME, 120000);
- bundle.putLong(AdvancedPowerUsageDetail.EXTRA_SCREEN_ON_TIME, 120000);
- bundle.putInt(AdvancedPowerUsageDetail.EXTRA_UID, Process.SYSTEM_UID);
- when(mFragment.getArguments()).thenReturn(bundle);
-
- mFragment.initHeader();
-
- ArgumentCaptor<CharSequence> captor = ArgumentCaptor.forClass(CharSequence.class);
- verify(mEntityHeaderController).setSummary(captor.capture());
- assertThat(captor.getValue()).isNotNull();
- }
-
- @Test
public void startBatteryDetailPage_invalidToShowSummary_noFGBDData() {
AdvancedPowerUsageDetail.startBatteryDetailPage(mActivity, mFragment,
mBatteryEntry, USAGE_PERCENT);
@@ -767,7 +366,7 @@
mFragment.onRadioButtonClicked(mOptimizePreference);
mFragment.onPause();
- shadowMainLooper().idle();
+ TimeUnit.SECONDS.sleep(1);
verify(mMetricsFeatureProvider)
.action(
SettingsEnums.OPEN_APP_BATTERY_USAGE,
@@ -791,7 +390,7 @@
mFragment.onRadioButtonClicked(mOptimizePreference);
mFragment.onPause();
- shadowMainLooper().idle();
+ TimeUnit.SECONDS.sleep(1);
verifyNoInteractions(mMetricsFeatureProvider);
}
diff --git a/tests/robotests/src/com/android/settings/fuelgauge/PowerUsageTimeControllerTest.java b/tests/robotests/src/com/android/settings/fuelgauge/PowerUsageTimeControllerTest.java
new file mode 100644
index 0000000..2449040
--- /dev/null
+++ b/tests/robotests/src/com/android/settings/fuelgauge/PowerUsageTimeControllerTest.java
@@ -0,0 +1,248 @@
+/*
+ * Copyright (C) 2023 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.fuelgauge;
+
+import static org.mockito.ArgumentMatchers.anyString;
+import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.spy;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+
+import android.content.Context;
+
+import androidx.preference.Preference;
+import androidx.preference.PreferenceCategory;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+import org.robolectric.RobolectricTestRunner;
+import org.robolectric.RuntimeEnvironment;
+
+@RunWith(RobolectricTestRunner.class)
+public final class PowerUsageTimeControllerTest {
+ private static final String SLOT_TIME = "12 am-2 am";
+ private static final String KEY_SCREEN_ON_TIME_PREF = "battery_usage_screen_time";
+ private static final String KEY_BACKGROUND_TIME_PREF = "battery_usage_background_time";
+ private static final String TEST_ANOMALY_HINT_TEXT = "test_anomaly_hint_text";
+
+ private Context mContext;
+ private PowerUsageTimeController mPowerUsageTimeController;
+
+ @Mock
+ private PreferenceCategory mPowerUsageTimeCategory;
+ @Mock
+ private PowerUsageTimePreference mScreenTimePreference;
+ @Mock
+ private PowerUsageTimePreference mBackgroundTimePreference;
+
+ @Before
+ public void setUp() {
+ MockitoAnnotations.initMocks(this);
+ mContext = spy(RuntimeEnvironment.application);
+ mPowerUsageTimeController = new PowerUsageTimeController(mContext);
+ mPowerUsageTimeController.mPowerUsageTimeCategory = mPowerUsageTimeCategory;
+ mPowerUsageTimeController.mScreenTimePreference = mScreenTimePreference;
+ mPowerUsageTimeController.mBackgroundTimePreference = mBackgroundTimePreference;
+ doReturn(KEY_SCREEN_ON_TIME_PREF).when(mScreenTimePreference).getKey();
+ doReturn(KEY_BACKGROUND_TIME_PREF).when(mBackgroundTimePreference).getKey();
+ }
+
+ @Test
+ public void handleScreenTimeUpdated_noInfo_prefInvisible() {
+ mPowerUsageTimeController.handleScreenTimeUpdated(/*slotTime=*/ null,
+ /*screenOnTimeInMs=*/ 0, /*backgroundTimeInMs=*/ 0,
+ /*anomalyHintPrefKey=*/ null, /*anomalyHintText=*/ null);
+
+ verifyAllPreferencesVisible(false);
+ }
+
+ @Test
+ public void handleScreenTimeUpdated_onlySlotTime_prefInvisible() {
+ mPowerUsageTimeController.handleScreenTimeUpdated(SLOT_TIME,
+ /*screenOnTimeInMs=*/ 0, /*backgroundTimeInMs=*/ 0,
+ /*anomalyHintPrefKey=*/ null, /*anomalyHintText=*/ null);
+
+ verifyAllPreferencesVisible(false);
+ }
+
+ @Test
+ public void handleScreenTimeUpdated_lackBackgroundTime_onlyScreenOnTime() {
+ final long screenOnTimeAMinute = 60000;
+ final long backgroundTimeZero = 0;
+
+ mPowerUsageTimeController.handleScreenTimeUpdated(SLOT_TIME,
+ screenOnTimeAMinute, backgroundTimeZero,
+ /*anomalyHintPrefKey=*/ null, /*anomalyHintText=*/ null);
+
+ verifyOnePreferenceInvisible(mBackgroundTimePreference);
+ verify(mScreenTimePreference).setTimeTitle("Screen time");
+ verify(mScreenTimePreference).setTimeSummary("1 min");
+ verify(mScreenTimePreference, never()).setAnomalyHint(anyString());
+ }
+
+ @Test
+ public void handleScreenTimeUpdated_lackScreenOnTime_onlyBackgroundTime() {
+ final long screenOnTimeZero = 0;
+ final long backgroundTimeTwoMinutes = 120000;
+
+ mPowerUsageTimeController.handleScreenTimeUpdated(SLOT_TIME,
+ screenOnTimeZero, backgroundTimeTwoMinutes,
+ /*anomalyHintPrefKey=*/ null, /*anomalyHintText=*/ null);
+
+ verifyOnePreferenceInvisible(mScreenTimePreference);
+ verify(mBackgroundTimePreference).setTimeTitle("Background time");
+ verify(mBackgroundTimePreference).setTimeSummary("2 min");
+ verify(mBackgroundTimePreference, never()).setAnomalyHint(anyString());
+ }
+
+ @Test
+ public void handleScreenTimeUpdated_categoryTitleWithSlotTime_expectedResult() {
+ final long screenOnTimeAMinute = 60000;
+ final long backgroundTimeTwoMinutes = 120000;
+
+ mPowerUsageTimeController.handleScreenTimeUpdated(SLOT_TIME,
+ screenOnTimeAMinute, backgroundTimeTwoMinutes,
+ /*anomalyHintPrefKey=*/ null, /*anomalyHintText=*/ null);
+
+ verifyAllPreferencesVisible(true);
+ verify(mScreenTimePreference).setTimeTitle("Screen time");
+ verify(mScreenTimePreference).setTimeSummary("1 min");
+ verify(mScreenTimePreference, never()).setAnomalyHint(anyString());
+ verify(mBackgroundTimePreference).setTimeTitle("Background time");
+ verify(mBackgroundTimePreference).setTimeSummary("2 min");
+ verify(mBackgroundTimePreference, never()).setAnomalyHint(anyString());
+ verify(mPowerUsageTimeCategory).setTitle("App usage for 12 am-2 am");
+ }
+
+ @Test
+ public void handleScreenTimeUpdated_categoryTitleWithoutSlotTime_expectedResult() {
+ final long backgroundTimeTwoMinutes = 120000;
+ final long screenOnTimeAMinute = 60000;
+
+ mPowerUsageTimeController.handleScreenTimeUpdated(/*slotTime=*/ null,
+ screenOnTimeAMinute, backgroundTimeTwoMinutes,
+ /*anomalyHintPrefKey=*/ null, /*anomalyHintText=*/ null);
+
+ verifyAllPreferencesVisible(true);
+ verify(mPowerUsageTimeCategory).setTitle("App usage since last full charge");
+ }
+
+ @Test
+ public void handleScreenTimeUpdated_BackgroundLessThanAMinWithSlotTime_expectedResult() {
+ final long screenOnTimeAMinute = 60000;
+ final long backgroundTimeLessThanAMinute = 59999;
+
+ mPowerUsageTimeController.handleScreenTimeUpdated(SLOT_TIME,
+ screenOnTimeAMinute, backgroundTimeLessThanAMinute,
+ /*anomalyHintPrefKey=*/ null, /*anomalyHintText=*/ null);
+
+ verifyAllPreferencesVisible(true);
+ verify(mScreenTimePreference).setTimeSummary("1 min");
+ verify(mBackgroundTimePreference).setTimeSummary("Less than a min");
+ }
+
+ @Test
+ public void handleScreenTimeUpdated_ScreenTimeLessThanAMin_expectedResult() {
+ final long screenOnTimeLessThanAMinute = 59999;
+ final long backgroundTimeTwoMinutes = 120000;
+
+ mPowerUsageTimeController.handleScreenTimeUpdated(SLOT_TIME,
+ screenOnTimeLessThanAMinute, backgroundTimeTwoMinutes,
+ /*anomalyHintPrefKey=*/ null, /*anomalyHintText=*/ null);
+
+ verifyAllPreferencesVisible(true);
+ verify(mScreenTimePreference).setTimeSummary("Less than a min");
+ verify(mBackgroundTimePreference).setTimeSummary("2 min");
+ }
+
+ @Test
+ public void handleScreenTimeUpdated_bothLessThanAMin_expectedResult() {
+ final long screenOnTimeLessThanAMinute = 59999;
+ final long backgroundTimeLessThanAMinute = 59999;
+
+ mPowerUsageTimeController.handleScreenTimeUpdated(SLOT_TIME,
+ screenOnTimeLessThanAMinute, backgroundTimeLessThanAMinute,
+ /*anomalyHintPrefKey=*/ null, /*anomalyHintText=*/ null);
+
+ verifyAllPreferencesVisible(true);
+ verify(mScreenTimePreference).setTimeSummary("Less than a min");
+ verify(mBackgroundTimePreference).setTimeSummary("Less than a min");
+ }
+
+ @Test
+ public void handleScreenTimeUpdated_anomalyOfScreenOnTime_expectedResult() {
+ final long screenOnTimeAMinute = 60000;
+ final long backgroundTimeTwoMinutes = 120000;
+
+ mPowerUsageTimeController.handleScreenTimeUpdated(SLOT_TIME,
+ screenOnTimeAMinute, backgroundTimeTwoMinutes,
+ KEY_SCREEN_ON_TIME_PREF, TEST_ANOMALY_HINT_TEXT);
+
+ verifyAllPreferencesVisible(true);
+ verify(mScreenTimePreference).setAnomalyHint(TEST_ANOMALY_HINT_TEXT);
+ verify(mBackgroundTimePreference, never()).setAnomalyHint(anyString());
+ }
+
+ @Test
+ public void handleScreenTimeUpdated_anomalyOfBackgroundTime_expectedResult() {
+ final long screenOnTimeAMinute = 60000;
+ final long backgroundTimeTwoMinutes = 120000;
+
+ mPowerUsageTimeController.handleScreenTimeUpdated(SLOT_TIME,
+ screenOnTimeAMinute, backgroundTimeTwoMinutes,
+ KEY_BACKGROUND_TIME_PREF, TEST_ANOMALY_HINT_TEXT);
+
+ verifyAllPreferencesVisible(true);
+ verify(mScreenTimePreference, never()).setAnomalyHint(anyString());
+ verify(mBackgroundTimePreference).setAnomalyHint(TEST_ANOMALY_HINT_TEXT);
+ }
+
+ @Test
+ public void handleScreenTimeUpdated_anomalyOfScreenOnTimeWithoutTimeInfo_expectedResult() {
+ final long screenOnTimeZero = 0;
+ final long backgroundTimeTwoMinutes = 120000;
+
+ mPowerUsageTimeController.handleScreenTimeUpdated(SLOT_TIME,
+ screenOnTimeZero, backgroundTimeTwoMinutes,
+ KEY_SCREEN_ON_TIME_PREF, TEST_ANOMALY_HINT_TEXT);
+
+ verifyAllPreferencesVisible(true);
+ verify(mScreenTimePreference).setTimeSummary("Less than a min");
+ verify(mScreenTimePreference).setAnomalyHint(TEST_ANOMALY_HINT_TEXT);
+ verify(mBackgroundTimePreference, never()).setAnomalyHint(anyString());
+ }
+
+ private void verifySetPrefToVisible(Preference pref, boolean isVisible) {
+ verify(pref, isVisible ? times(1) : never()).setVisible(true);
+ }
+
+ private void verifyAllPreferencesVisible(boolean isVisible) {
+ verifySetPrefToVisible(mScreenTimePreference, isVisible);
+ verifySetPrefToVisible(mBackgroundTimePreference, isVisible);
+ verifySetPrefToVisible(mPowerUsageTimeCategory, isVisible);
+ }
+
+ private void verifyOnePreferenceInvisible(Preference pref) {
+ verifySetPrefToVisible(mScreenTimePreference, mScreenTimePreference != pref);
+ verifySetPrefToVisible(mBackgroundTimePreference, mBackgroundTimePreference != pref);
+ verifySetPrefToVisible(mPowerUsageTimeCategory, mPowerUsageTimeCategory != pref);
+ }
+}
diff --git a/tests/robotests/src/com/android/settings/network/BluetoothWiFiResetPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/network/BluetoothWiFiResetPreferenceControllerTest.java
deleted file mode 100644
index 3aea4a8..0000000
--- a/tests/robotests/src/com/android/settings/network/BluetoothWiFiResetPreferenceControllerTest.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * Copyright (C) 2022 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.network;
-
-import static com.google.common.truth.Truth.assertThat;
-import static org.mockito.Mockito.doReturn;
-import static org.mockito.Mockito.never;
-import static org.mockito.Mockito.spy;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-
-import android.content.Context;
-import android.content.res.Resources;
-import android.net.ConnectivityManager;
-import android.os.UserManager;
-import android.telephony.TelephonyManager;
-
-import com.android.settings.R;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
-import org.robolectric.RobolectricTestRunner;
-import org.robolectric.RuntimeEnvironment;
-import org.robolectric.shadows.ShadowToast;
-
-@RunWith(RobolectricTestRunner.class)
-public class BluetoothWiFiResetPreferenceControllerTest {
-
- private static final String PREFERENCE_KEY = "network_reset_bluetooth_wifi_pref";
-
- @Mock
- private UserManager mUserManager;
- @Mock
- private Resources mResources;
- @Mock
- private ConnectivityManager mConnectivityManager;
- @Mock
- private TelephonyManager mTelephonyManager;
-
- private Context mContext;
-
- @Before
- public void setUp() {
- MockitoAnnotations.initMocks(this);
- mContext = spy(RuntimeEnvironment.application);
- when(mContext.getResources()).thenReturn(mResources);
-
- mockService(Context.CONNECTIVITY_SERVICE, ConnectivityManager.class,
- mConnectivityManager);
- mockService(Context.TELEPHONY_SERVICE, TelephonyManager.class, mTelephonyManager);
- }
-
- @Test
- public void getAvailabilityStatus_returnAvailable_asOwnerUser() {
- mockService(Context.USER_SERVICE, UserManager.class, mUserManager);
- doReturn(true).when(mUserManager).isAdminUser();
-
- BluetoothWiFiResetPreferenceController target =
- new BluetoothWiFiResetPreferenceController(mContext, PREFERENCE_KEY);
-
- assertThat(target.getAvailabilityStatus()).isEqualTo(
- BluetoothWiFiResetPreferenceController.AVAILABLE);
- }
-
- @Test
- public void resetOperation_notResetConnectivity_onDeviceWithSimVisible() {
- mockService(Context.CONNECTIVITY_SERVICE, ConnectivityManager.class,
- mConnectivityManager);
- when(mResources.getBoolean(R.bool.config_show_sim_info)).thenReturn(true);
-
- BluetoothWiFiResetPreferenceController target =
- new BluetoothWiFiResetPreferenceController(mContext, PREFERENCE_KEY);
-
- try {
- target.resetOperation().run();
- } catch (Exception exception) {}
- verify(mConnectivityManager, never()).factoryReset();
- }
-
- @Test
- public void endOfReset_toastMessage_whenSuccess() {
- String testText = "reset_bluetooth_wifi_complete_toast";
- when(mResources.getString(R.string.reset_bluetooth_wifi_complete_toast)).thenReturn(testText);
- BluetoothWiFiResetPreferenceController target =
- new BluetoothWiFiResetPreferenceController(mContext, PREFERENCE_KEY);
-
- target.endOfReset(null);
-
- assertThat(ShadowToast.getTextOfLatestToast()).isEqualTo(testText);
- }
-
- private <T> void mockService(String serviceName, Class<T> serviceClass, T service) {
- when(mContext.getSystemServiceName(serviceClass)).thenReturn(serviceName);
- when(mContext.getSystemService(serviceName)).thenReturn(service);
- }
-}
diff --git a/tests/robotests/src/com/android/settings/security/MemtagPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/security/MemtagPreferenceControllerTest.java
index e3fc3cc..7d2c6dd 100644
--- a/tests/robotests/src/com/android/settings/security/MemtagPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/security/MemtagPreferenceControllerTest.java
@@ -24,11 +24,9 @@
import static com.google.common.truth.Truth.assertThat;
import android.content.Context;
-import android.os.Bundle;
-import androidx.fragment.app.FragmentActivity;
-import androidx.fragment.app.FragmentContainerView;
-import androidx.test.rule.ActivityTestRule;
+import androidx.test.core.app.ApplicationProvider;
+import androidx.test.ext.junit.rules.ActivityScenarioRule;
import com.android.settings.R;
import com.android.settings.testutils.shadow.ShadowDeviceConfig;
@@ -37,11 +35,11 @@
import com.android.settingslib.testutils.shadow.ShadowInteractionJankMonitor;
import org.junit.Before;
+import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.robolectric.RobolectricTestRunner;
-import org.robolectric.RuntimeEnvironment;
import org.robolectric.annotation.Config;
import org.robolectric.shadows.ShadowSystemProperties;
@@ -57,8 +55,8 @@
private final String mMemtagSupportedProperty = "ro.arm64.memtag.bootctl_supported";
@Rule
- public ActivityTestRule<TestActivity> mActivityTestRule =
- new ActivityTestRule<>(TestActivity.class);
+ public ActivityScenarioRule<TestActivity> mActivityScenario =
+ new ActivityScenarioRule<>(TestActivity.class);
private MemtagPage mMemtagPage;
private MemtagPreferenceController mController;
@@ -70,17 +68,18 @@
@Before
public void setUp() {
ShadowSystemProperties.override(mMemtagSupportedProperty, "true");
-
- mContext = RuntimeEnvironment.application;
+ mContext = ApplicationProvider.getApplicationContext();
mMemtagPage = new MemtagPage();
- mActivity = mActivityTestRule.getActivity();
- mActivity
- .getSupportFragmentManager()
- .beginTransaction()
- .add(TestActivity.CONTAINER_VIEW_ID, mMemtagPage)
- .commit();
- mController = new MemtagPreferenceController(mContext, FRAGMENT_TAG);
- mController.setFragment(mMemtagPage);
+ System.out.println("Activity: " + mActivity);
+ mActivityScenario.getScenario().onActivity(a -> {
+ a.getSupportFragmentManager()
+ .beginTransaction()
+ .add(TestActivity.CONTAINER_VIEW_ID, mMemtagPage)
+ .commitNow();
+ mController = new MemtagPreferenceController(a, FRAGMENT_TAG);
+ mController.setFragment(mMemtagPage);
+ });
+ System.out.println("Committed");
}
@Test
@@ -135,6 +134,7 @@
}
@Test
+ @Ignore
public void setChecked_isChecked_doesNotShowDialog() {
ZygoteShadow.setSupportsMemoryTagging(false);
mController.setChecked(false);
@@ -142,6 +142,7 @@
}
@Test
+ @Ignore
public void setChecked_isUnchecked_doesNotShowDialog() {
ZygoteShadow.setSupportsMemoryTagging(true);
mController.setChecked(true);
@@ -155,18 +156,4 @@
mController.updateState(preference);
assertThat(preference.isDisabledByAdmin()).isTrue();
}
-
- private static final class TestActivity extends FragmentActivity {
-
- private static final int CONTAINER_VIEW_ID = 1234;
-
- @Override
- protected void onCreate(Bundle bundle) {
- super.onCreate(bundle);
-
- FragmentContainerView contentView = new FragmentContainerView(this);
- contentView.setId(CONTAINER_VIEW_ID);
- setContentView(contentView);
- }
- }
}
diff --git a/tests/robotests/src/com/android/settings/security/TestActivity.java b/tests/robotests/src/com/android/settings/security/TestActivity.java
new file mode 100644
index 0000000..70b5cf5
--- /dev/null
+++ b/tests/robotests/src/com/android/settings/security/TestActivity.java
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2022 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.security;
+
+import android.os.Bundle;
+
+import androidx.fragment.app.FragmentActivity;
+import androidx.fragment.app.FragmentContainerView;
+
+public final class TestActivity extends FragmentActivity {
+
+ static final int CONTAINER_VIEW_ID = 1234;
+
+ @Override
+ protected void onCreate(Bundle bundle) {
+ super.onCreate(bundle);
+
+ FragmentContainerView contentView = new FragmentContainerView(this);
+ contentView.setId(CONTAINER_VIEW_ID);
+ setContentView(contentView);
+ }
+}
diff --git a/tests/robotests/src/com/android/settings/testutils/shadow/ShadowApplicationPackageManager.java b/tests/robotests/src/com/android/settings/testutils/shadow/ShadowApplicationPackageManager.java
index 7ff2e5d..e6b0307 100644
--- a/tests/robotests/src/com/android/settings/testutils/shadow/ShadowApplicationPackageManager.java
+++ b/tests/robotests/src/com/android/settings/testutils/shadow/ShadowApplicationPackageManager.java
@@ -16,9 +16,12 @@
package com.android.settings.testutils.shadow;
+import android.annotation.NonNull;
import android.app.ApplicationPackageManager;
import android.content.pm.PackageInfo;
+import android.os.IRemoteCallback;
+import org.robolectric.annotation.Implementation;
import org.robolectric.annotation.Implements;
import java.util.ArrayList;
@@ -49,4 +52,10 @@
}
return packages;
}
+
+ @Implementation
+ public void registerPackageMonitorCallback(@NonNull IRemoteCallback callback, int userId) {}
+
+ @Implementation
+ public void unregisterPackageMonitorCallback(@NonNull IRemoteCallback callback) {}
}
diff --git a/tests/robotests/testutils/com/android/settings/testutils/FakeFeatureFactory.java b/tests/robotests/testutils/com/android/settings/testutils/FakeFeatureFactory.java
index 52a5f24..9156cae 100644
--- a/tests/robotests/testutils/com/android/settings/testutils/FakeFeatureFactory.java
+++ b/tests/robotests/testutils/com/android/settings/testutils/FakeFeatureFactory.java
@@ -24,6 +24,7 @@
import com.android.settings.accounts.AccountFeatureProvider;
import com.android.settings.applications.ApplicationFeatureProvider;
import com.android.settings.biometrics.face.FaceFeatureProvider;
+import com.android.settings.biometrics.fingerprint.FingerprintFeatureProvider;
import com.android.settings.biometrics2.factory.BiometricsRepositoryProvider;
import com.android.settings.bluetooth.BluetoothFeatureProvider;
import com.android.settings.connecteddevice.fastpair.FastPairFeatureProvider;
@@ -80,6 +81,7 @@
public final AccountFeatureProvider mAccountFeatureProvider;
public final BluetoothFeatureProvider mBluetoothFeatureProvider;
public final FaceFeatureProvider mFaceFeatureProvider;
+ public final FingerprintFeatureProvider mFingerprintFeatureProvider;
public final BiometricsRepositoryProvider mBiometricsRepositoryProvider;
public PanelFeatureProvider panelFeatureProvider;
@@ -132,6 +134,7 @@
panelFeatureProvider = mock(PanelFeatureProvider.class);
mBluetoothFeatureProvider = mock(BluetoothFeatureProvider.class);
mFaceFeatureProvider = mock(FaceFeatureProvider.class);
+ mFingerprintFeatureProvider = mock(FingerprintFeatureProvider.class);
mBiometricsRepositoryProvider = mock(BiometricsRepositoryProvider.class);
wifiTrackerLibProvider = mock(WifiTrackerLibProvider.class);
securitySettingsFeatureProvider = mock(SecuritySettingsFeatureProvider.class);
@@ -257,6 +260,11 @@
}
@Override
+ public FingerprintFeatureProvider getFingerprintFeatureProvider() {
+ return mFingerprintFeatureProvider;
+ }
+
+ @Override
public BiometricsRepositoryProvider getBiometricsRepositoryProvider() {
return mBiometricsRepositoryProvider;
}
diff --git a/tests/screenshot/Android.bp b/tests/screenshot/Android.bp
new file mode 100644
index 0000000..05ceef8
--- /dev/null
+++ b/tests/screenshot/Android.bp
@@ -0,0 +1,68 @@
+//
+// Copyright (C) 2023 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.
+
+android_app {
+ name: "ScreenshotTestStub",
+ defaults: [
+ "SettingsLibDefaults",
+ ],
+ platform_apis: true,
+ certificate: "platform",
+ privileged: true,
+ use_resource_processor: true,
+
+ static_libs: [
+ "Settings-core",
+ "androidx.fragment_fragment-testing",
+ "androidx.fragment_fragment",
+ ],
+
+ aaptflags: ["--extra-packages com.android.settings"],
+}
+
+android_test {
+ name: "SettingsScreenshotTests",
+ platform_apis: true,
+ certificate: "platform",
+ test_suites: ["device-tests"],
+ srcs: [
+ "src/**/*.kt",
+ ],
+ static_libs: [
+ "androidx.fragment_fragment-testing",
+ "androidx.fragment_fragment",
+ "androidx.test.rules",
+ "androidx.test.ext.junit",
+ "platform-screenshot-diff-core",
+ "Settings-testutils2",
+ "androidx.test.core",
+ "androidx.test.espresso.core",
+ "kotlinx-coroutines-android",
+ "androidx.lifecycle_lifecycle-runtime-testing",
+ "kotlinx_coroutines_test",
+ "Settings-core",
+ ],
+ libs: [
+ "android.test.runner",
+ "android.test.base",
+ "android.test.mock",
+ ],
+ compile_multilib: "both",
+ manifest: "AndroidManifest.xml",
+ test_config: "AndroidTest.xml",
+ use_embedded_native_libs: false,
+ asset_dirs: ["assets"],
+ instrumentation_for: "ScreenshotTestStub",
+}
diff --git a/tests/screenshot/AndroidManifest.xml b/tests/screenshot/AndroidManifest.xml
new file mode 100644
index 0000000..c9a426c
--- /dev/null
+++ b/tests/screenshot/AndroidManifest.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2023 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.
+-->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
+ package="com.android.settings.tests.screenshot"
+ >
+
+ <application>
+ <uses-library android:name="android.test.runner" />
+ <provider
+ android:name="com.android.settings.slices.SettingsSliceProvider"
+ android:authorities="com.android.settings.tests.screenshot.disabled"
+ android:enabled="false"
+ tools:node="remove"
+ tools:replace="android:authorities" />
+ </application>
+
+ <uses-permission android:name="android.permission.PACKAGE_USAGE_STATS" />
+ <uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS" />
+ <uses-permission android:name="android.permission.READ_LOGS" />
+ <uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" />
+ <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
+ <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
+ <uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />
+ <uses-permission android:name="android.permission.READ_DEVICE_CONFIG" />
+
+ <instrumentation
+ android:name="androidx.test.runner.AndroidJUnitRunner"
+ android:label="Android Settings Screenshot tests"
+ android:targetPackage="com.android.settings.tests.screenshot" />
+
+</manifest>
diff --git a/tests/screenshot/AndroidTest.xml b/tests/screenshot/AndroidTest.xml
new file mode 100644
index 0000000..7496ffd
--- /dev/null
+++ b/tests/screenshot/AndroidTest.xml
@@ -0,0 +1,36 @@
+<!--
+ ~ Copyright (C) 2023 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.
+ -->
+
+<configuration description="Runs settings screendiff tests.">
+ <option name="test-suite-tag" value="apct-instrumentation" />
+ <option name="test-suite-tag" value="apct" />
+ <target_preparer class="com.android.tradefed.targetprep.DeviceSetup">
+ <option name="optimized-property-setting" value="true" />
+ </target_preparer>
+ <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
+ <option name="cleanup-apks" value="true" />
+ <option name="test-file-name" value="SettingsScreenshotTests.apk" />
+ </target_preparer>
+ <metrics_collector class="com.android.tradefed.device.metric.FilePullerLogCollector">
+ <option name="directory-keys"
+ value="/data/user/0/com.android.settings.tests.screenshot/" />
+ <option name="collect-on-run-ended-only" value="true" />
+ </metrics_collector>
+ <test class="com.android.tradefed.testtype.AndroidJUnitTest">
+ <option name="package" value="com.android.settings.tests.screenshot" />
+ <option name="runner" value="androidx.test.runner.AndroidJUnitRunner" />
+ </test>
+</configuration>
diff --git "a/tests/screenshot/assets/pixel_4a_\0505g\051/fp_enroll_intro.png" "b/tests/screenshot/assets/pixel_4a_\0505g\051/fp_enroll_intro.png"
new file mode 100644
index 0000000..1129250
--- /dev/null
+++ "b/tests/screenshot/assets/pixel_4a_\0505g\051/fp_enroll_intro.png"
Binary files differ
diff --git a/tests/screenshot/src/com/android/settings/tests/screenshot/BasicScreenshotTest.kt b/tests/screenshot/src/com/android/settings/tests/screenshot/BasicScreenshotTest.kt
new file mode 100644
index 0000000..3b3b170
--- /dev/null
+++ b/tests/screenshot/src/com/android/settings/tests/screenshot/BasicScreenshotTest.kt
@@ -0,0 +1,140 @@
+/*
+ * Copyright (C) 2023 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.tests.screenshot
+
+import android.content.Context
+import android.graphics.Bitmap
+import android.graphics.Canvas
+import android.graphics.Color
+import android.os.Bundle
+import android.view.View
+import androidx.fragment.app.testing.FragmentScenario
+import androidx.fragment.app.testing.launchFragmentInContainer
+import androidx.lifecycle.ViewModel
+import androidx.lifecycle.ViewModelProvider
+import androidx.test.core.app.ApplicationProvider
+import androidx.test.ext.junit.runners.AndroidJUnit4
+import androidx.test.platform.app.InstrumentationRegistry
+import com.android.settings.R
+import com.android.settings.biometrics.fingerprint2.ui.enrollment.fragment.FingerprintEnrollIntroV2Fragment
+import com.android.settings.biometrics.fingerprint2.ui.enrollment.viewmodel.FingerprintEnrollNavigationViewModel
+import com.android.settings.biometrics.fingerprint2.ui.enrollment.viewmodel.FingerprintEnrollViewModel
+import com.android.settings.biometrics.fingerprint2.ui.enrollment.viewmodel.FingerprintGatekeeperViewModel
+import com.android.settings.biometrics.fingerprint2.ui.enrollment.viewmodel.FingerprintScrollViewModel
+import com.android.settings.biometrics.fingerprint2.ui.enrollment.viewmodel.GatekeeperInfo
+import com.android.settings.testutils2.FakeFingerprintManagerInteractor
+import kotlinx.coroutines.test.StandardTestDispatcher
+import org.junit.Before
+import org.junit.Rule
+import org.junit.Test
+import org.junit.runner.RunWith
+import platform.test.screenshot.GoldenImagePathManager
+import platform.test.screenshot.ScreenshotTestRule
+import platform.test.screenshot.matchers.MSSIMMatcher
+
+@RunWith(AndroidJUnit4::class)
+class BasicScreenshotTest {
+ @Rule
+ @JvmField
+ var rule: ScreenshotTestRule =
+ ScreenshotTestRule(
+ GoldenImagePathManager(
+ InstrumentationRegistry.getInstrumentation().getContext(),
+ InstrumentationRegistry.getInstrumentation()
+ .getTargetContext()
+ .getFilesDir()
+ .getAbsolutePath() + "/settings_screenshots"
+ )
+ )
+
+ private var context: Context = ApplicationProvider.getApplicationContext()
+ private var interactor = FakeFingerprintManagerInteractor()
+
+ private val gatekeeperViewModel =
+ FingerprintGatekeeperViewModel(
+ GatekeeperInfo.GatekeeperPasswordInfo(byteArrayOf(1, 2, 3), 100L),
+ interactor
+ )
+
+ private val backgroundDispatcher = StandardTestDispatcher()
+ private lateinit var fragmentScenario: FragmentScenario<FingerprintEnrollIntroV2Fragment>
+
+ private val navigationViewModel =
+ FingerprintEnrollNavigationViewModel(
+ backgroundDispatcher,
+ interactor,
+ gatekeeperViewModel,
+ canSkipConfirm = true,
+ )
+ private var fingerprintViewModel = FingerprintEnrollViewModel(interactor, backgroundDispatcher)
+ private var fingerprintScrollViewModel = FingerprintScrollViewModel()
+
+ @Before
+ fun setup() {
+ val factory =
+ object : ViewModelProvider.Factory {
+ @Suppress("UNCHECKED_CAST")
+ override fun <T : ViewModel> create(
+ modelClass: Class<T>,
+ ): T {
+ return when (modelClass) {
+ FingerprintEnrollViewModel::class.java -> fingerprintViewModel
+ FingerprintScrollViewModel::class.java -> fingerprintScrollViewModel
+ FingerprintEnrollNavigationViewModel::class.java -> navigationViewModel
+ FingerprintGatekeeperViewModel::class.java -> gatekeeperViewModel
+ else -> null
+ }
+ as T
+ }
+ }
+
+ fragmentScenario =
+ launchFragmentInContainer(Bundle(), R.style.SudThemeGlif) {
+ FingerprintEnrollIntroV2Fragment(factory)
+ }
+ }
+
+ /** Renders a [view] into a [Bitmap]. */
+ private fun viewToBitmap(view: View): Bitmap {
+ val bitmap =
+ Bitmap.createBitmap(
+ view.measuredWidth,
+ view.measuredHeight,
+ Bitmap.Config.ARGB_8888,
+ )
+ val canvas = Canvas(bitmap)
+ view.draw(canvas)
+ return bitmap
+ }
+
+ @Test
+ fun testEnrollIntro() {
+ fragmentScenario.onFragment { fragment ->
+ val view = fragment.requireView().findViewById<View>(R.id.enroll_intro_content_view)!!
+ view.setBackgroundColor(Color.BLACK)
+ }
+ fragmentScenario.onFragment { fragment ->
+ val view = fragment.requireView().findViewById<View>(R.id.enroll_intro_content_view)!!
+ rule.assertBitmapAgainstGolden(
+ viewToBitmap(view),
+ "fp_enroll_intro",
+ MSSIMMatcher()
+ )
+ }
+
+ }
+}
diff --git a/tests/spa_unit/src/com/android/settings/datausage/DataUsageListHeaderControllerTest.kt b/tests/spa_unit/src/com/android/settings/datausage/DataUsageListHeaderControllerTest.kt
index 3580e68..6d5be6b 100644
--- a/tests/spa_unit/src/com/android/settings/datausage/DataUsageListHeaderControllerTest.kt
+++ b/tests/spa_unit/src/com/android/settings/datausage/DataUsageListHeaderControllerTest.kt
@@ -69,7 +69,7 @@
sourceMetricsCategory = 0,
viewLifecycleOwner = testLifecycleOwner,
onCyclesLoad = {},
- onItemSelected = {},
+ updateSelectedCycle = {},
repository = repository,
)
diff --git a/tests/spa_unit/src/com/android/settings/datausage/lib/AppDataUsageDetailsRepositoryTest.kt b/tests/spa_unit/src/com/android/settings/datausage/lib/AppDataUsageDetailsRepositoryTest.kt
index 7072b46..85431a4 100644
--- a/tests/spa_unit/src/com/android/settings/datausage/lib/AppDataUsageDetailsRepositoryTest.kt
+++ b/tests/spa_unit/src/com/android/settings/datausage/lib/AppDataUsageDetailsRepositoryTest.kt
@@ -16,7 +16,7 @@
package com.android.settings.datausage.lib
-import android.app.usage.NetworkStats.Bucket
+import android.app.usage.NetworkStats
import android.content.Context
import android.net.NetworkTemplate
import android.util.Range
@@ -28,8 +28,8 @@
import org.junit.runner.RunWith
import org.mockito.kotlin.doReturn
import org.mockito.kotlin.mock
-import org.mockito.kotlin.spy
-import org.mockito.kotlin.whenever
+import org.mockito.kotlin.stub
+import com.android.settings.datausage.lib.NetworkStatsRepository.Companion.Bucket
@RunWith(AndroidJUnit4::class)
class AppDataUsageDetailsRepositoryTest {
@@ -41,58 +41,78 @@
on { getCycles() } doReturn listOf(Range(CYCLE1_END_TIME, CYCLE2_END_TIME))
}
+ private val networkStatsRepository = mock<NetworkStatsRepository>()
+
@Test
fun queryDetailsForCycles_hasCycles(): Unit = runBlocking {
- val range = Range(CYCLE1_START_TIME, CYCLE1_END_TIME)
- val repository = spy(
- AppDataUsageDetailsRepository(
- context = context,
- cycles = listOf(CYCLE1_END_TIME, CYCLE1_START_TIME),
- template = template,
- uids = listOf(UID),
- networkCycleDataRepository = networkCycleDataRepository,
+ networkStatsRepository.stub {
+ on { queryBuckets(CYCLE1_START_TIME, CYCLE1_END_TIME) } doReturn listOf(
+ Bucket(
+ uid = UID,
+ state = NetworkStats.Bucket.STATE_DEFAULT,
+ bytes = BACKGROUND_USAGE,
+ ),
+ Bucket(
+ uid = UID,
+ state = NetworkStats.Bucket.STATE_FOREGROUND,
+ bytes = FOREGROUND_USAGE,
+ ),
)
- ) {
- doReturn(ALL_USAGE).whenever(mock).getUsage(range, UID, Bucket.STATE_ALL)
- doReturn(FOREGROUND_USAGE).whenever(mock).getUsage(range, UID, Bucket.STATE_FOREGROUND)
}
+ val repository = AppDataUsageDetailsRepository(
+ context = context,
+ cycles = listOf(CYCLE1_END_TIME, CYCLE1_START_TIME),
+ template = template,
+ uids = listOf(UID),
+ networkCycleDataRepository = networkCycleDataRepository,
+ networkStatsRepository = networkStatsRepository,
+ )
val detailsForCycles = repository.queryDetailsForCycles()
assertThat(detailsForCycles).containsExactly(
NetworkUsageDetailsData(
- range = range,
- totalUsage = ALL_USAGE,
+ range = Range(CYCLE1_START_TIME, CYCLE1_END_TIME),
+ totalUsage = BACKGROUND_USAGE + FOREGROUND_USAGE,
foregroundUsage = FOREGROUND_USAGE,
- backgroundUsage = ALL_USAGE - FOREGROUND_USAGE,
+ backgroundUsage = BACKGROUND_USAGE,
)
)
}
@Test
fun queryDetailsForCycles_defaultCycles(): Unit = runBlocking {
- val range = Range(CYCLE1_END_TIME, CYCLE2_END_TIME)
- val repository = spy(
- AppDataUsageDetailsRepository(
- context = context,
- cycles = null,
- template = template,
- uids = listOf(UID),
- networkCycleDataRepository = networkCycleDataRepository,
+ networkStatsRepository.stub {
+ on { queryBuckets(CYCLE1_END_TIME, CYCLE2_END_TIME) } doReturn listOf(
+ Bucket(
+ uid = UID,
+ state = NetworkStats.Bucket.STATE_DEFAULT,
+ bytes = BACKGROUND_USAGE,
+ ),
+ Bucket(
+ uid = UID,
+ state = NetworkStats.Bucket.STATE_FOREGROUND,
+ bytes = FOREGROUND_USAGE,
+ ),
)
- ) {
- doReturn(ALL_USAGE).whenever(mock).getUsage(range, UID, Bucket.STATE_ALL)
- doReturn(FOREGROUND_USAGE).whenever(mock).getUsage(range, UID, Bucket.STATE_FOREGROUND)
}
+ val repository = AppDataUsageDetailsRepository(
+ context = context,
+ cycles = null,
+ template = template,
+ uids = listOf(UID),
+ networkCycleDataRepository = networkCycleDataRepository,
+ networkStatsRepository = networkStatsRepository,
+ )
val detailsForCycles = repository.queryDetailsForCycles()
assertThat(detailsForCycles).containsExactly(
NetworkUsageDetailsData(
- range = range,
- totalUsage = ALL_USAGE,
+ range = Range(CYCLE1_END_TIME, CYCLE2_END_TIME),
+ totalUsage = BACKGROUND_USAGE + FOREGROUND_USAGE,
foregroundUsage = FOREGROUND_USAGE,
- backgroundUsage = ALL_USAGE - FOREGROUND_USAGE,
+ backgroundUsage = BACKGROUND_USAGE,
)
)
}
@@ -103,7 +123,7 @@
const val CYCLE2_END_TIME = 1695566666000L
const val UID = 10000
- const val ALL_USAGE = 10L
+ const val BACKGROUND_USAGE = 8L
const val FOREGROUND_USAGE = 2L
}
}
diff --git a/tests/spa_unit/src/com/android/settings/network/BluetoothWiFiResetPreferenceControllerTest.kt b/tests/spa_unit/src/com/android/settings/network/BluetoothWiFiResetPreferenceControllerTest.kt
new file mode 100644
index 0000000..210a0c7
--- /dev/null
+++ b/tests/spa_unit/src/com/android/settings/network/BluetoothWiFiResetPreferenceControllerTest.kt
@@ -0,0 +1,120 @@
+/*
+ * Copyright (C) 2023 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.network
+
+import android.bluetooth.BluetoothAdapter
+import android.bluetooth.BluetoothManager
+import android.content.Context
+import android.content.res.Resources
+import android.net.ConnectivityManager
+import android.net.NetworkPolicyManager
+import android.net.VpnManager
+import android.os.UserManager
+import androidx.test.core.app.ApplicationProvider
+import androidx.test.ext.junit.runners.AndroidJUnit4
+import com.android.settings.R
+import com.android.settings.core.BasePreferenceController.AVAILABLE
+import com.android.settings.core.BasePreferenceController.CONDITIONALLY_UNAVAILABLE
+import com.google.common.truth.Truth.assertThat
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.mockito.kotlin.doReturn
+import org.mockito.kotlin.mock
+import org.mockito.kotlin.never
+import org.mockito.kotlin.spy
+import org.mockito.kotlin.stub
+import org.mockito.kotlin.verify
+
+@RunWith(AndroidJUnit4::class)
+class BluetoothWiFiResetPreferenceControllerTest {
+
+ private val mockUserManager = mock<UserManager>()
+ private val mockBluetoothAdapter = mock<BluetoothAdapter>()
+ private val mockBluetoothManager = mock<BluetoothManager> {
+ on { adapter } doReturn mockBluetoothAdapter
+ }
+ private val mockConnectivityManager = mock<ConnectivityManager>()
+ private val mockNetworkPolicyManager = mock<NetworkPolicyManager>()
+ private val mockVpnManager = mock<VpnManager>()
+ private val mockResources = mock<Resources>()
+
+ private val context: Context = spy(ApplicationProvider.getApplicationContext()) {
+ on { getSystemService(Context.USER_SERVICE) } doReturn mockUserManager
+ on { getSystemService(Context.BLUETOOTH_SERVICE) } doReturn mockBluetoothManager
+ on { getSystemService(Context.CONNECTIVITY_SERVICE) } doReturn mockConnectivityManager
+ on { getSystemService(Context.NETWORK_POLICY_SERVICE) } doReturn mockNetworkPolicyManager
+ on { getSystemService(Context.VPN_MANAGEMENT_SERVICE) } doReturn mockVpnManager
+ on { resources } doReturn mockResources
+ }
+
+ private val controller = BluetoothWiFiResetPreferenceController(context, TEST_KEY)
+
+ @Test
+ fun getAvailabilityStatus_isAdminUser_returnAvailable() {
+ mockUserManager.stub {
+ on { isAdminUser } doReturn true
+ }
+
+ val availabilityStatus = controller.getAvailabilityStatus()
+
+ assertThat(availabilityStatus).isEqualTo(AVAILABLE)
+ }
+
+ @Test
+ fun getAvailabilityStatus_notAdminUser_returnConditionallyUnavailable() {
+ mockUserManager.stub {
+ on { isAdminUser } doReturn false
+ }
+
+ val availabilityStatus = controller.getAvailabilityStatus()
+
+ assertThat(availabilityStatus).isEqualTo(CONDITIONALLY_UNAVAILABLE)
+ }
+
+ @Test
+ fun resetOperation_resetBluetooth() {
+ controller.resetOperation().run()
+
+ verify(mockBluetoothAdapter).clearBluetooth()
+ }
+
+ @Test
+ fun resetOperation_onDeviceWithSimVisible_notResetConnectivity() {
+ mockResources.stub {
+ on { getBoolean(R.bool.config_show_sim_info) } doReturn true
+ }
+
+ controller.resetOperation().run()
+
+ verify(mockConnectivityManager, never()).factoryReset()
+ }
+
+ @Test
+ fun resetOperation_onDeviceWithSimInvisible_resetVpn() {
+ mockResources.stub {
+ on { getBoolean(R.bool.config_show_sim_info) } doReturn false
+ }
+
+ controller.resetOperation().run()
+
+ verify(mockVpnManager).factoryReset()
+ }
+
+ private companion object {
+ const val TEST_KEY = "test_key"
+ }
+}
diff --git a/tests/spa_unit/src/com/android/settings/spa/preference/ComposePreferenceControllerTest.kt b/tests/spa_unit/src/com/android/settings/spa/preference/ComposePreferenceControllerTest.kt
new file mode 100644
index 0000000..36817d1
--- /dev/null
+++ b/tests/spa_unit/src/com/android/settings/spa/preference/ComposePreferenceControllerTest.kt
@@ -0,0 +1,73 @@
+/*
+ * Copyright (C) 2023 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.spa.preference
+
+import android.content.Context
+import androidx.compose.material3.Text
+import androidx.compose.runtime.Composable
+import androidx.compose.ui.test.assertIsDisplayed
+import androidx.compose.ui.test.junit4.createComposeRule
+import androidx.compose.ui.test.onNodeWithText
+import androidx.preference.PreferenceManager
+import androidx.test.core.app.ApplicationProvider
+import androidx.test.ext.junit.runners.AndroidJUnit4
+import org.junit.Rule
+import org.junit.Test
+import org.junit.runner.RunWith
+
+@RunWith(AndroidJUnit4::class)
+class ComposePreferenceControllerTest {
+
+ @get:Rule
+ val composeTestRule = createComposeRule()
+
+ private val context: Context = ApplicationProvider.getApplicationContext()
+
+ private val controller = object : ComposePreferenceController(
+ context = context,
+ preferenceKey = TEST_KEY,
+ ) {
+ override fun getAvailabilityStatus() = AVAILABLE
+
+ @Composable
+ override fun Content() {
+ Text(TEXT)
+ }
+ }
+
+ private val preference = ComposePreference(context).apply {
+ key = TEST_KEY
+ }
+
+ private val preferenceScreen = PreferenceManager(context).createPreferenceScreen(context)
+ .apply { addPreference(preference) }
+
+ @Test
+ fun displayPreference() {
+ controller.displayPreference(preferenceScreen)
+
+ composeTestRule.setContent {
+ preference.content()
+ }
+ composeTestRule.onNodeWithText(TEXT).assertIsDisplayed()
+ }
+
+ private companion object {
+ const val TEST_KEY = "test_key"
+ const val TEXT = "Text"
+ }
+}
diff --git a/tests/spa_unit/src/com/android/settings/spa/preference/ComposePreferenceTest.kt b/tests/spa_unit/src/com/android/settings/spa/preference/ComposePreferenceTest.kt
new file mode 100644
index 0000000..28bde3a
--- /dev/null
+++ b/tests/spa_unit/src/com/android/settings/spa/preference/ComposePreferenceTest.kt
@@ -0,0 +1,61 @@
+/*
+ * Copyright (C) 2023 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.spa.preference
+
+import android.content.Context
+import androidx.compose.material3.Text
+import androidx.compose.ui.platform.ComposeView
+import androidx.compose.ui.test.assertIsDisplayed
+import androidx.compose.ui.test.junit4.createComposeRule
+import androidx.compose.ui.test.onNodeWithText
+import androidx.preference.PreferenceViewHolder
+import androidx.test.core.app.ApplicationProvider
+import androidx.test.ext.junit.runners.AndroidJUnit4
+import org.junit.Rule
+import org.junit.Test
+import org.junit.runner.RunWith
+
+@RunWith(AndroidJUnit4::class)
+class ComposePreferenceTest {
+
+ @get:Rule
+ val composeTestRule = createComposeRule()
+
+ private val context: Context = ApplicationProvider.getApplicationContext()
+
+ private val preference = ComposePreference(context)
+
+ private val composeView = ComposeView(context)
+
+ @Test
+ fun onBindViewHolder() {
+ preference.content = {
+ Text(TEXT)
+ }
+
+ preference.onBindViewHolder(PreferenceViewHolder.createInstanceForTests(composeView))
+
+ composeTestRule.setContent {
+ composeView.Content()
+ }
+ composeTestRule.onNodeWithText(TEXT).assertIsDisplayed()
+ }
+
+ private companion object {
+ const val TEXT = "Text"
+ }
+}
diff --git a/tests/spa_unit/src/com/android/settings/testutils/FakeFeatureFactory.kt b/tests/spa_unit/src/com/android/settings/testutils/FakeFeatureFactory.kt
index 95f25ad..54299eb 100644
--- a/tests/spa_unit/src/com/android/settings/testutils/FakeFeatureFactory.kt
+++ b/tests/spa_unit/src/com/android/settings/testutils/FakeFeatureFactory.kt
@@ -22,6 +22,7 @@
import com.android.settings.accounts.AccountFeatureProvider
import com.android.settings.applications.ApplicationFeatureProvider
import com.android.settings.biometrics.face.FaceFeatureProvider
+import com.android.settings.biometrics.fingerprint.FingerprintFeatureProvider
import com.android.settings.biometrics2.factory.BiometricsRepositoryProvider
import com.android.settings.bluetooth.BluetoothFeatureProvider
import com.android.settings.connecteddevice.fastpair.FastPairFeatureProvider
@@ -120,6 +121,8 @@
get() = TODO("Not yet implemented")
override val faceFeatureProvider: FaceFeatureProvider
get() = TODO("Not yet implemented")
+ override val fingerprintFeatureProvider: FingerprintFeatureProvider
+ get() = TODO("Not yet implemented")
override val biometricsRepositoryProvider: BiometricsRepositoryProvider
get() = TODO("Not yet implemented")
override val wifiTrackerLibProvider: WifiTrackerLibProvider
diff --git a/tests/unit/src/com/android/settings/DefaultRingtonePreferenceTest.java b/tests/unit/src/com/android/settings/DefaultRingtonePreferenceTest.java
index 7877684..c580fc5 100644
--- a/tests/unit/src/com/android/settings/DefaultRingtonePreferenceTest.java
+++ b/tests/unit/src/com/android/settings/DefaultRingtonePreferenceTest.java
@@ -16,16 +16,20 @@
package com.android.settings;
+import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
+import android.content.ContentInterface;
import android.content.ContentResolver;
import android.content.Context;
-import android.media.RingtoneManager;
+import android.content.pm.UserProperties;
import android.net.Uri;
+import android.os.UserHandle;
+import android.os.UserManager;
import androidx.test.core.app.ApplicationProvider;
import androidx.test.ext.junit.runners.AndroidJUnit4;
@@ -34,17 +38,22 @@
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
+import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
/** Unittest for DefaultRingtonePreference. */
@RunWith(AndroidJUnit4.class)
public class DefaultRingtonePreferenceTest {
+ private static final int OWNER_USER_ID = 1;
+ private static final int OTHER_USER_ID = 10;
+ private static final int INVALID_RINGTONE_TYPE = 0;
private DefaultRingtonePreference mDefaultRingtonePreference;
@Mock
private ContentResolver mContentResolver;
@Mock
+ private UserManager mUserManager;
private Uri mRingtoneUri;
@Before
@@ -52,14 +61,29 @@
MockitoAnnotations.initMocks(this);
Context context = spy(ApplicationProvider.getApplicationContext());
- doReturn(mContentResolver).when(context).getContentResolver();
+ mContentResolver = ContentResolver.wrap(Mockito.mock(ContentInterface.class));
+ when(context.getContentResolver()).thenReturn(mContentResolver);
mDefaultRingtonePreference = spy(new DefaultRingtonePreference(context, null /* attrs */));
doReturn(context).when(mDefaultRingtonePreference).getContext();
+
+ // Use INVALID_RINGTONE_TYPE to return early in RingtoneManager.setActualDefaultRingtoneUri
when(mDefaultRingtonePreference.getRingtoneType())
- .thenReturn(RingtoneManager.TYPE_RINGTONE);
- mDefaultRingtonePreference.setUserId(1);
+ .thenReturn(INVALID_RINGTONE_TYPE);
+
+ mDefaultRingtonePreference.setUserId(OWNER_USER_ID);
mDefaultRingtonePreference.mUserContext = context;
+ when(mDefaultRingtonePreference.isDefaultRingtone(any(Uri.class))).thenReturn(false);
+
+ when(context.getSystemServiceName(UserManager.class)).thenReturn(Context.USER_SERVICE);
+ when(context.getSystemService(Context.USER_SERVICE)).thenReturn(mUserManager);
+
+ UserProperties userProperties = new UserProperties.Builder().setMediaSharedWithParent(false)
+ .build();
+ when(mUserManager.getUserProperties(UserHandle.of(OTHER_USER_ID))).thenReturn(
+ userProperties);
+
+ mRingtoneUri = Uri.parse("content://none");
}
@Test
@@ -79,4 +103,53 @@
verify(mDefaultRingtonePreference, never()).setActualDefaultRingtoneUri(mRingtoneUri);
}
+
+ @Test
+ public void onSaveRingtone_notManagedProfile_shouldNotSetRingtone() {
+ mRingtoneUri = Uri.parse("content://" + OTHER_USER_ID + "@ringtone");
+ when(mContentResolver.getType(mRingtoneUri)).thenReturn("audio/*");
+ when(mUserManager.isSameProfileGroup(OWNER_USER_ID, OTHER_USER_ID)).thenReturn(true);
+ when(mUserManager.getProfileParent(UserHandle.of(OTHER_USER_ID))).thenReturn(
+ UserHandle.of(OWNER_USER_ID));
+ when(mUserManager.isManagedProfile(OTHER_USER_ID)).thenReturn(false);
+
+ mDefaultRingtonePreference.onSaveRingtone(mRingtoneUri);
+
+ verify(mDefaultRingtonePreference, never()).setActualDefaultRingtoneUri(mRingtoneUri);
+ }
+
+ @Test
+ public void onSaveRingtone_notSameUser_shouldNotSetRingtone() {
+ mRingtoneUri = Uri.parse("content://" + OTHER_USER_ID + "@ringtone");
+ when(mContentResolver.getType(mRingtoneUri)).thenReturn("audio/*");
+ when(mUserManager.isSameProfileGroup(OWNER_USER_ID, OTHER_USER_ID)).thenReturn(false);
+
+ mDefaultRingtonePreference.onSaveRingtone(mRingtoneUri);
+
+ verify(mDefaultRingtonePreference, never()).setActualDefaultRingtoneUri(mRingtoneUri);
+ }
+
+ @Test
+ public void onSaveRingtone_isManagedProfile_shouldSetRingtone() {
+ mRingtoneUri = Uri.parse("content://" + OTHER_USER_ID + "@ringtone");
+ when(mContentResolver.getType(mRingtoneUri)).thenReturn("audio/*");
+ when(mUserManager.isSameProfileGroup(OWNER_USER_ID, OTHER_USER_ID)).thenReturn(true);
+ when(mUserManager.getProfileParent(UserHandle.of(OTHER_USER_ID))).thenReturn(
+ UserHandle.of(OWNER_USER_ID));
+ when(mUserManager.isManagedProfile(OTHER_USER_ID)).thenReturn(true);
+
+ mDefaultRingtonePreference.onSaveRingtone(mRingtoneUri);
+
+ verify(mDefaultRingtonePreference).setActualDefaultRingtoneUri(mRingtoneUri);
+ }
+
+ @Test
+ public void onSaveRingtone_defaultUri_shouldSetRingtone() {
+ mRingtoneUri = Uri.parse("default_ringtone");
+ when(mDefaultRingtonePreference.isDefaultRingtone(any(Uri.class))).thenReturn(true);
+
+ mDefaultRingtonePreference.onSaveRingtone(mRingtoneUri);
+
+ verify(mDefaultRingtonePreference).setActualDefaultRingtoneUri(mRingtoneUri);
+ }
}
diff --git a/tests/unit/src/com/android/settings/fingerprint2/enrollment/viewmodel/FingerprintEnrollFindSensorViewModelV2Test.kt b/tests/unit/src/com/android/settings/fingerprint2/enrollment/viewmodel/FingerprintEnrollFindSensorViewModelV2Test.kt
new file mode 100644
index 0000000..509b0ed
--- /dev/null
+++ b/tests/unit/src/com/android/settings/fingerprint2/enrollment/viewmodel/FingerprintEnrollFindSensorViewModelV2Test.kt
@@ -0,0 +1,255 @@
+/*
+ * Copyright (C) 2023 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.fingerprint2.enrollment.viewmodel
+
+import android.content.Context
+import android.content.res.Configuration
+import android.view.accessibility.AccessibilityManager
+import androidx.arch.core.executor.testing.InstantTaskExecutorRule
+import androidx.test.core.app.ApplicationProvider
+import com.android.settings.biometrics.fingerprint2.ui.enrollment.viewmodel.AccessibilityViewModel
+import com.android.settings.biometrics.fingerprint2.ui.enrollment.viewmodel.Education
+import com.android.settings.biometrics.fingerprint2.ui.enrollment.viewmodel.FingerprintEnrollFindSensorViewModel
+import com.android.settings.biometrics.fingerprint2.ui.enrollment.viewmodel.FingerprintEnrollNavigationViewModel
+import com.android.settings.biometrics.fingerprint2.ui.enrollment.viewmodel.FingerprintEnrollViewModel
+import com.android.settings.biometrics.fingerprint2.ui.enrollment.viewmodel.FingerprintGatekeeperViewModel
+import com.android.settings.biometrics.fingerprint2.ui.enrollment.viewmodel.FoldStateViewModel
+import com.android.settings.biometrics.fingerprint2.ui.enrollment.viewmodel.NextStepViewModel
+import com.android.settings.biometrics.fingerprint2.ui.enrollment.viewmodel.OrientationStateViewModel
+import com.android.settings.testutils2.FakeFingerprintManagerInteractor
+import com.android.systemui.biometrics.shared.model.FingerprintSensor
+import com.android.systemui.biometrics.shared.model.FingerprintSensorType
+import com.android.systemui.biometrics.shared.model.SensorStrength
+import com.google.common.truth.Truth.assertThat
+import kotlinx.coroutines.Dispatchers
+import kotlinx.coroutines.flow.collectLatest
+import kotlinx.coroutines.launch
+import kotlinx.coroutines.test.StandardTestDispatcher
+import kotlinx.coroutines.test.TestScope
+import kotlinx.coroutines.test.advanceUntilIdle
+import kotlinx.coroutines.test.resetMain
+import kotlinx.coroutines.test.runTest
+import kotlinx.coroutines.test.setMain
+import org.junit.After
+import org.junit.Before
+import org.junit.Rule
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.mockito.junit.MockitoJUnit
+import org.mockito.junit.MockitoJUnitRunner
+
+/** consistent with [ScreenSizeFoldProvider.INNER_SCREEN_SMALLEST_SCREEN_WIDTH_THRESHOLD_DP] */
+private const val INNER_SCREEN_SMALLEST_SCREEN_WIDTH_THRESHOLD_DP = 600
+
+@RunWith(MockitoJUnitRunner::class)
+class FingerprintEnrollFindSensorViewModelV2Test {
+ @JvmField @Rule var rule = MockitoJUnit.rule()
+ @get:Rule val instantTaskRule = InstantTaskExecutorRule()
+
+ private var backgroundDispatcher = StandardTestDispatcher()
+ private var testScope = TestScope(backgroundDispatcher)
+ private lateinit var fakeFingerprintManagerInteractor: FakeFingerprintManagerInteractor
+ private lateinit var gatekeeperViewModel: FingerprintGatekeeperViewModel
+ private lateinit var enrollViewModel: FingerprintEnrollViewModel
+ private lateinit var navigationViewModel: FingerprintEnrollNavigationViewModel
+ private lateinit var accessibilityViewModel: AccessibilityViewModel
+ private lateinit var foldStateViewModel: FoldStateViewModel
+ private lateinit var orientationStateViewModel: OrientationStateViewModel
+ private lateinit var underTest: FingerprintEnrollFindSensorViewModel
+ private val context: Context = ApplicationProvider.getApplicationContext()
+ private val accessibilityManager: AccessibilityManager =
+ context.getSystemService(AccessibilityManager::class.java)!!
+
+ @Before
+ fun setup() {
+ backgroundDispatcher = StandardTestDispatcher()
+ testScope = TestScope(backgroundDispatcher)
+ Dispatchers.setMain(backgroundDispatcher)
+
+ fakeFingerprintManagerInteractor = FakeFingerprintManagerInteractor()
+ gatekeeperViewModel =
+ FingerprintGatekeeperViewModel.FingerprintGatekeeperViewModelFactory(
+ null,
+ fakeFingerprintManagerInteractor
+ )
+ .create(FingerprintGatekeeperViewModel::class.java)
+ navigationViewModel =
+ FingerprintEnrollNavigationViewModel.FingerprintEnrollNavigationViewModelFactory(
+ backgroundDispatcher,
+ fakeFingerprintManagerInteractor,
+ gatekeeperViewModel,
+ canSkipConfirm = true,
+ )
+ .create(FingerprintEnrollNavigationViewModel::class.java)
+ enrollViewModel =
+ FingerprintEnrollViewModel.FingerprintEnrollViewModelFactory(
+ fakeFingerprintManagerInteractor,
+ backgroundDispatcher
+ )
+ .create(FingerprintEnrollViewModel::class.java)
+ accessibilityViewModel =
+ AccessibilityViewModel.AccessibilityViewModelFactory(accessibilityManager)
+ .create(AccessibilityViewModel::class.java)
+ foldStateViewModel =
+ FoldStateViewModel.FoldStateViewModelFactory(context).create(FoldStateViewModel::class.java)
+ orientationStateViewModel =
+ OrientationStateViewModel.OrientationViewModelFactory(context)
+ .create(OrientationStateViewModel::class.java)
+ underTest =
+ FingerprintEnrollFindSensorViewModel.FingerprintEnrollFindSensorViewModelFactory(
+ navigationViewModel,
+ enrollViewModel,
+ gatekeeperViewModel,
+ accessibilityViewModel,
+ foldStateViewModel,
+ orientationStateViewModel
+ )
+ .create(FingerprintEnrollFindSensorViewModel::class.java)
+
+ // Navigate to Education page
+ navigationViewModel.nextStep()
+ }
+ @After
+ fun tearDown() {
+ Dispatchers.resetMain()
+ }
+
+ // TODO(b/305094585): test enroll() logic
+
+ @Test
+ fun currentStepIsEducation() =
+ testScope.runTest {
+ var step: NextStepViewModel? = null
+ val job = launch {
+ navigationViewModel.navigationViewModel.collectLatest { step = it.currStep }
+ }
+ advanceUntilIdle()
+ assertThat(step).isEqualTo(Education)
+ job.cancel()
+ }
+
+ @Test
+ fun udfpsLottieInfo() =
+ testScope.runTest {
+ fakeFingerprintManagerInteractor.sensorProp =
+ FingerprintSensor(
+ 0 /* sensorId */,
+ SensorStrength.STRONG,
+ 5,
+ FingerprintSensorType.UDFPS_OPTICAL
+ )
+
+ var udfpsLottieInfo: Boolean? = null
+ val job = launch { underTest.udfpsLottieInfo.collect { udfpsLottieInfo = it } }
+
+ advanceUntilIdle()
+ assertThat(udfpsLottieInfo).isNotNull()
+ job.cancel()
+ }
+
+ @Test
+ fun sfpsLottieInfoWhenFolded() =
+ testScope.runTest {
+ var isFolded = false
+ var rotation: Int = -1
+ val job = launch {
+ underTest.sfpsLottieInfo.collect {
+ isFolded = it.first
+ rotation = it.second
+ }
+ }
+
+ val config = createConfiguration(isFolded = true)
+ foldStateViewModel.onConfigurationChange(config)
+ advanceUntilIdle()
+ assertThat(isFolded).isTrue()
+ assertThat(rotation).isEqualTo(context.display!!.rotation)
+ job.cancel()
+ }
+
+ @Test
+ fun sfpsLottieInfoWhenUnFolded() =
+ testScope.runTest {
+ var isFolded = false
+ var rotation: Int = -1
+ val job = launch {
+ underTest.sfpsLottieInfo.collect {
+ isFolded = it.first
+ rotation = it.second
+ }
+ }
+
+ val config = createConfiguration(isFolded = false)
+ foldStateViewModel.onConfigurationChange(config)
+ advanceUntilIdle()
+ assertThat(isFolded).isFalse()
+ assertThat(rotation).isEqualTo(context.display!!.rotation)
+ job.cancel()
+ }
+
+ @Test
+ fun rfpsAnimation() =
+ testScope.runTest {
+ fakeFingerprintManagerInteractor.sensorProp =
+ FingerprintSensor(0 /* sensorId */, SensorStrength.STRONG, 5, FingerprintSensorType.REAR)
+
+ var showRfpsAnimation: Boolean? = null
+ val job = launch { underTest.showRfpsAnimation.collect { showRfpsAnimation = it } }
+
+ advanceUntilIdle()
+ assertThat(showRfpsAnimation).isTrue()
+ job.cancel()
+ }
+
+ @Test
+ fun showPrimaryButton_ifUdfps() =
+ testScope.runTest {
+ fakeFingerprintManagerInteractor.sensorProp =
+ FingerprintSensor(
+ 0 /* sensorId */,
+ SensorStrength.STRONG,
+ 5,
+ FingerprintSensorType.UDFPS_OPTICAL
+ )
+
+ var showPrimaryButton: Boolean? = null
+ val job = launch { underTest.showPrimaryButton.collect { showPrimaryButton = it } }
+
+ advanceUntilIdle()
+ assertThat(showPrimaryButton).isTrue()
+ job.cancel()
+ }
+
+ @Test
+ fun doesNotShowPrimaryButton_ifNonUdfps() =
+ testScope.runTest {
+ var showPrimaryButton: Boolean? = null
+ val job = launch { underTest.showPrimaryButton.collect { showPrimaryButton = it } }
+
+ advanceUntilIdle()
+ assertThat(showPrimaryButton).isNull()
+ job.cancel()
+ }
+
+ private fun createConfiguration(isFolded: Boolean): Configuration {
+ val config = Configuration()
+ config.smallestScreenWidthDp =
+ if (isFolded) INNER_SCREEN_SMALLEST_SCREEN_WIDTH_THRESHOLD_DP - 1
+ else INNER_SCREEN_SMALLEST_SCREEN_WIDTH_THRESHOLD_DP + 1
+ return config
+ }
+}
diff --git a/tests/unit/src/com/android/settings/testutils/FakeFeatureFactory.java b/tests/unit/src/com/android/settings/testutils/FakeFeatureFactory.java
index a3a92a3..b5062a0 100644
--- a/tests/unit/src/com/android/settings/testutils/FakeFeatureFactory.java
+++ b/tests/unit/src/com/android/settings/testutils/FakeFeatureFactory.java
@@ -24,6 +24,7 @@
import com.android.settings.accounts.AccountFeatureProvider;
import com.android.settings.applications.ApplicationFeatureProvider;
import com.android.settings.biometrics.face.FaceFeatureProvider;
+import com.android.settings.biometrics.fingerprint.FingerprintFeatureProvider;
import com.android.settings.biometrics2.factory.BiometricsRepositoryProvider;
import com.android.settings.bluetooth.BluetoothFeatureProvider;
import com.android.settings.connecteddevice.fastpair.FastPairFeatureProvider;
@@ -79,6 +80,7 @@
public final AccountFeatureProvider mAccountFeatureProvider;
public final BluetoothFeatureProvider mBluetoothFeatureProvider;
public final FaceFeatureProvider mFaceFeatureProvider;
+ public final FingerprintFeatureProvider mFingerprintFeatureProvider;
public final BiometricsRepositoryProvider mBiometricsRepositoryProvider;
public PanelFeatureProvider panelFeatureProvider;
@@ -131,6 +133,7 @@
panelFeatureProvider = mock(PanelFeatureProvider.class);
mBluetoothFeatureProvider = mock(BluetoothFeatureProvider.class);
mFaceFeatureProvider = mock(FaceFeatureProvider.class);
+ mFingerprintFeatureProvider = mock(FingerprintFeatureProvider.class);
mBiometricsRepositoryProvider = mock(BiometricsRepositoryProvider.class);
wifiTrackerLibProvider = mock(WifiTrackerLibProvider.class);
securitySettingsFeatureProvider = mock(SecuritySettingsFeatureProvider.class);
@@ -256,6 +259,11 @@
}
@Override
+ public FingerprintFeatureProvider getFingerprintFeatureProvider() {
+ return mFingerprintFeatureProvider;
+ }
+
+ @Override
public BiometricsRepositoryProvider getBiometricsRepositoryProvider() {
return mBiometricsRepositoryProvider;
}