From 2e72dda1aafa76c9f2d06b79e77a67849db4aea1 Mon Sep 17 00:00:00 2001 From: Fan Zhang Date: Wed, 28 Jun 2017 18:14:18 -0700 Subject: [PATCH] Add ordering attribute to sound setting preferences. The ordering helps injected settings show up before work profile settings. Change-Id: Id840b721fc3ef82f53591a16b385965f7a719b67 Fix: 62997256 Test: visual --- res/xml/sound_settings.xml | 53 +++++++++++-------- .../notification/SettingPrefController.java | 1 + 2 files changed, 31 insertions(+), 23 deletions(-) diff --git a/res/xml/sound_settings.xml b/res/xml/sound_settings.xml index d288a9dec37..f5705bb8356 100644 --- a/res/xml/sound_settings.xml +++ b/res/xml/sound_settings.xml @@ -14,12 +14,15 @@ limitations under the License. --> - + + - + - - + + android:title="@string/other_sound_category_preference_title" + android:order="-50"> + - - - + + + - + - + diff --git a/src/com/android/settings/notification/SettingPrefController.java b/src/com/android/settings/notification/SettingPrefController.java index 2af1bde3ca3..ac613d18062 100644 --- a/src/com/android/settings/notification/SettingPrefController.java +++ b/src/com/android/settings/notification/SettingPrefController.java @@ -55,6 +55,7 @@ public abstract class SettingPrefController extends AbstractPreferenceController @Override public void displayPreference(PreferenceScreen screen) { mPreference.init(mParent); + super.displayPreference(screen); if (isAvailable()) { mSettingsObserver = new SettingsObserver(); }