summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--res/xml/sound_settings.xml5
-rw-r--r--src/com/android/settings/SoundSettings.java10
2 files changed, 5 insertions, 10 deletions
diff --git a/res/xml/sound_settings.xml b/res/xml/sound_settings.xml
index 392d34b..31783e5 100644
--- a/res/xml/sound_settings.xml
+++ b/res/xml/sound_settings.xml
@@ -40,10 +40,7 @@
<Preference
android:key="musicfx"
- android:title="@string/musicfx_title">
- <intent android:targetPackage="com.android.musicfx"
- android:targetClass="com.android.musicfx.ControlPanelPicker" />
- </Preference>
+ android:title="@string/musicfx_title" />
<!-- Quiet hours -->
<PreferenceScreen
diff --git a/src/com/android/settings/SoundSettings.java b/src/com/android/settings/SoundSettings.java
index d3cac7a..2f7192f 100644
--- a/src/com/android/settings/SoundSettings.java
+++ b/src/com/android/settings/SoundSettings.java
@@ -236,15 +236,13 @@ public class SoundSettings extends SettingsPreferenceFragment implements
mMusicFx = mSoundSettings.findPreference(KEY_MUSICFX);
Intent i = new Intent(AudioEffect.ACTION_DISPLAY_AUDIO_EFFECT_CONTROL_PANEL);
+ mMusicFx.setIntent(i);
PackageManager p = getPackageManager();
List<ResolveInfo> ris = p.queryIntentActivities(i, PackageManager.GET_DISABLED_COMPONENTS);
- if (ris.size() <= 2) {
- // no need to show the item if there is no choice for the user to make
- // note: the built in musicfx panel has two activities (one being a
- // compatibility shim that launches either the other activity, or a
- // third party one), hence the check for <=2. If the implementation
- // of the compatbility layer changes, this check may need to be updated.
+ if (ris.size() == 0) {
mSoundSettings.removePreference(mMusicFx);
+ } else if (ris.size() == 1) {
+ mMusicFx.setSummary(ris.get(0).loadLabel(p));
}
if (!Utils.isVoiceCapable(getActivity())) {