Merge "Update Spatial audio settings page" into tm-dev am: 6993aa86eb

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18456662

Change-Id: Iaea4f2e5c760cffb82b97c35e6dca719a9b418d3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
TreeHugger Robot
2022-05-18 21:53:31 +00:00
committed by Automerger Merge Worker
3 changed files with 30 additions and 1 deletions

View File

@@ -8620,7 +8620,7 @@
<string name="spatial_audio_wired_headphones">Wired headphones</string>
<!-- Sound: Summary for the spatializer effect. [CHAR LIMIT=NONE]-->
<string name="spatial_audio_text">Spatial Audio creates immersive sound that seems like its coming from all around you. Only works with some media.</string>
<string name="spatial_audio_text">Audio from compatible media becomes more immersive</string>
<!-- Sound: Summary for the Spatial audio setting when it is off. [CHAR LIMIT=NONE]-->
<string name="spatial_summary_off">Off</string>
@@ -8631,6 +8631,12 @@
<!-- Sound: Summary for the Spatial audio setting when it is on with two output devices enabled. [CHAR LIMIT=NONE]-->
<string name="spatial_summary_on_two">On / <xliff:g id="output device" example="Phone speaker">%1$s</xliff:g> and <xliff:g id="output device" example="Wired headphones">%2$s</xliff:g></string>
<!-- Sound: Footer message for the Spatial audio setting. [CHAR LIMIT=NONE]-->
<string name="spatial_audio_footer_title">You can also turn on Spatial Audio for Bluetooth devices.</string>
<!-- Sound: Footer hyperlink text to launch the Connected devices settings page. [CHAR LIMIT=NONE]-->
<string name="spatial_audio_footer_learn_more_text">Connected devices settings</string>
<!-- Sound: Summary for the Do not Disturb option that describes how many automatic rules (schedules) are enabled [CHAR LIMIT=NONE]-->
<string name="zen_mode_settings_schedules_summary">
{count, plural,

View File

@@ -34,4 +34,9 @@
android:title="@string/spatial_audio_wired_headphones"
settings:controller="com.android.settings.notification.SpatialAudioWiredHeadphonesController"/>
<com.android.settingslib.widget.FooterPreference
android:key="spatial_audio_footer"
android:title="@string/spatial_audio_footer_title"
android:selectable="false"
settings:searchable="false"/>
</PreferenceScreen>

View File

@@ -17,11 +17,15 @@
package com.android.settings.notification;
import android.app.settings.SettingsEnums;
import android.content.Intent;
import android.os.Bundle;
import android.provider.Settings;
import com.android.settings.R;
import com.android.settings.dashboard.DashboardFragment;
import com.android.settings.search.BaseSearchIndexProvider;
import com.android.settingslib.search.SearchIndexable;
import com.android.settingslib.widget.FooterPreference;
/**
* Spatial audio settings located in the sound menu
@@ -30,6 +34,20 @@ import com.android.settingslib.search.SearchIndexable;
public class SpatialAudioSettings extends DashboardFragment {
private static final String TAG = "SpatialAudioSettings";
private static final String KEY_FOOTER = "spatial_audio_footer";
@Override
public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
super.onCreatePreferences(savedInstanceState, rootKey);
FooterPreference footerPreference = findPreference(KEY_FOOTER);
if (footerPreference != null) {
footerPreference.setLearnMoreText(
getString(R.string.spatial_audio_footer_learn_more_text));
footerPreference.setLearnMoreAction(
view -> startActivity(new Intent(Settings.ACTION_BLUETOOTH_SETTINGS)));
}
}
@Override
public int getMetricsCategory() {