From 4410df7f4216b82b379af5bffd7b91c615031bf6 Mon Sep 17 00:00:00 2001 From: Yiyi Shen Date: Tue, 24 Oct 2023 16:09:49 +0800 Subject: [PATCH] [Audiosharing] Add audio sharing settings with the main switch. Flagged with enable_le_audio_sharing Bug: 305620450 Test: Manual Change-Id: I9ca520014d3f6f7147bb9b8e7648797e79b46f53 --- res/drawable/ic_bt_audio_sharing.xml | 87 +++++++++++++++++++ res/values/strings.xml | 25 ++++-- res/xml/bluetooth_audio_sharing.xml | 22 +++++ res/xml/connected_devices_advanced.xml | 7 ++ .../AudioSharingDashboardFragment.java | 79 +++++++++++++++++ .../AudioSharingPreferenceController.java | 38 ++++++++ .../AudioSharingSwitchBarController.java | 66 ++++++++++++++ 7 files changed, 315 insertions(+), 9 deletions(-) create mode 100644 res/drawable/ic_bt_audio_sharing.xml create mode 100644 res/xml/bluetooth_audio_sharing.xml create mode 100644 src/com/android/settings/connecteddevice/audiosharing/AudioSharingDashboardFragment.java create mode 100644 src/com/android/settings/connecteddevice/audiosharing/AudioSharingPreferenceController.java create mode 100644 src/com/android/settings/connecteddevice/audiosharing/AudioSharingSwitchBarController.java diff --git a/res/drawable/ic_bt_audio_sharing.xml b/res/drawable/ic_bt_audio_sharing.xml new file mode 100644 index 00000000000..618677389ce --- /dev/null +++ b/res/drawable/ic_bt_audio_sharing.xml @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/res/values/strings.xml b/res/values/strings.xml index a2bb40ed809..60a3a01bdc0 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -288,6 +288,11 @@ Stylus + + Audio sharing + + Share audio + Date & time @@ -782,7 +787,7 @@ Delete face model Set up Face Unlock - + Delete face model? Your face model will be permanently and securely deleted.\n\nAfter deletion, you will need your PIN, pattern, or password to unlock your phone or for authentication in apps. @@ -866,7 +871,7 @@ When you set up Face Unlock and Fingerprint Unlock, your phone will ask for your fingerprint when you wear a mask or are in a dark area.\n\nYou can unlock with your watch when your face or fingerprint isn\u2019t recognized. You can unlock with your watch when your fingerprint isn\u2019t recognized. - + You can unlock with your watch when your face isn\u2019t recognized. Use fingerprint or watch to Use face or watch to @@ -2001,7 +2006,7 @@ Use a QR code to add a device to this network QR code isn\u0027t a valid format - + Retry Share with other device users @@ -2569,7 +2574,7 @@ Intensity Will never turn on automatically - + Will turn on automatically at %1$s Will turn on automatically at sunset @@ -2615,7 +2620,7 @@ Will never turn on automatically Will turn on automatically at sunset - + Will turn on automatically at %1$s Will turn on automatically at bedtime @@ -2977,8 +2982,8 @@ System includes files used to run Android version %s - - Guest mode users cannot format SD cards + + Guest mode users cannot format SD cards Formatting ^1\u2026 @@ -3023,7 +3028,7 @@ This ^1 needs to be formatted to store apps, files, and media. \n\nFormatting will erase existing content on the ^2. To avoid losing content, back it up to another ^3 or device. - + This ^1 needs to be formatted to store photos, videos, music, and more. \n\nFormatting will erase existing content on the ^2. To avoid losing content, back it up to another ^3 or device. @@ -6908,6 +6913,8 @@ + + Account for content @@ -7839,7 +7846,7 @@ Notification history turned off - Turn on notification history to see recent notifications and snoozed notifications + Turn on notification history to see recent notifications and snoozed notifications No recent notifications diff --git a/res/xml/bluetooth_audio_sharing.xml b/res/xml/bluetooth_audio_sharing.xml new file mode 100644 index 00000000000..a90da727d39 --- /dev/null +++ b/res/xml/bluetooth_audio_sharing.xml @@ -0,0 +1,22 @@ + + + + + \ No newline at end of file diff --git a/res/xml/connected_devices_advanced.xml b/res/xml/connected_devices_advanced.xml index 11e32884d4e..a1eae919465 100644 --- a/res/xml/connected_devices_advanced.xml +++ b/res/xml/connected_devices_advanced.xml @@ -26,6 +26,13 @@ android:icon="@*android:drawable/ic_settings_bluetooth" android:order="-9"/> + +