From e303658f0d2cb167d6da6e1574aa4db4a5de3c0f Mon Sep 17 00:00:00 2001 From: Alan Huang Date: Wed, 22 Sep 2021 18:18:35 +0000 Subject: [PATCH] Add the Spatial audio toggle in SoundSettings The Spatial audio toggle will be showed only on supported devices Test: robotest, manual checked the UI, but not the actual functionality due to doesn't have supported device in hand Bug: 191870827 Change-Id: I7db264902b03fddb7808676d8cb98cbe045deda1 --- res/values/strings.xml | 3 + res/xml/sound_settings.xml | 7 ++ .../SpatialAudioPreferenceController.java | 56 ++++++++++++ .../SpatialAudioPreferenceControllerTest.java | 91 +++++++++++++++++++ 4 files changed, 157 insertions(+) create mode 100644 src/com/android/settings/notification/SpatialAudioPreferenceController.java create mode 100644 tests/robotests/src/com/android/settings/notification/SpatialAudioPreferenceControllerTest.java diff --git a/res/values/strings.xml b/res/values/strings.xml index 54e6894025b..11625f6016f 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -8489,6 +8489,9 @@ Other sounds + + Spatial audio + Dial pad tones diff --git a/res/xml/sound_settings.xml b/res/xml/sound_settings.xml index 56632a5e993..e30f13915bf 100644 --- a/res/xml/sound_settings.xml +++ b/res/xml/sound_settings.xml @@ -154,6 +154,13 @@ android:ringtoneType="alarm" android:order="-60"/> + + +