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
This commit is contained in:
@@ -14,12 +14,15 @@
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
<PreferenceScreen
|
||||||
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:title="@string/sound_settings"
|
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
|
||||||
android:key="sound_settings"
|
android:title="@string/sound_settings"
|
||||||
settings:keywords="@string/keywords_sounds">
|
android:key="sound_settings"
|
||||||
|
settings:keywords="@string/keywords_sounds">
|
||||||
|
|
||||||
|
<PreferenceCategory
|
||||||
|
android:order="-100">
|
||||||
<!-- Media volume -->
|
<!-- Media volume -->
|
||||||
<com.android.settings.notification.VolumeSeekBarPreference
|
<com.android.settings.notification.VolumeSeekBarPreference
|
||||||
android:key="media_volume"
|
android:key="media_volume"
|
||||||
@@ -49,7 +52,6 @@
|
|||||||
android:key="vibrate_when_ringing"
|
android:key="vibrate_when_ringing"
|
||||||
android:title="@string/vibrate_when_ringing_title" />
|
android:title="@string/vibrate_when_ringing_title" />
|
||||||
|
|
||||||
|
|
||||||
<!-- Interruptions -->
|
<!-- Interruptions -->
|
||||||
<com.android.settingslib.RestrictedPreference
|
<com.android.settingslib.RestrictedPreference
|
||||||
android:key="zen_mode"
|
android:key="zen_mode"
|
||||||
@@ -84,11 +86,13 @@
|
|||||||
android:summary="@string/summary_placeholder"
|
android:summary="@string/summary_placeholder"
|
||||||
android:persistent="false"
|
android:persistent="false"
|
||||||
android:ringtoneType="alarm" />
|
android:ringtoneType="alarm" />
|
||||||
|
</PreferenceCategory>
|
||||||
|
|
||||||
<!-- Other sounds -->
|
<!-- Other sounds -->
|
||||||
<PreferenceCategory
|
<PreferenceCategory
|
||||||
android:key="other_sound_preferecence_category"
|
android:key="other_sound_preferecence_category"
|
||||||
android:title="@string/other_sound_category_preference_title" />
|
android:title="@string/other_sound_category_preference_title"
|
||||||
|
android:order="-50">
|
||||||
|
|
||||||
<!-- Dial pad tones -->
|
<!-- Dial pad tones -->
|
||||||
<SwitchPreference
|
<SwitchPreference
|
||||||
@@ -136,21 +140,24 @@
|
|||||||
android:key="emergency_tone"
|
android:key="emergency_tone"
|
||||||
android:title="@string/emergency_tone_title"
|
android:title="@string/emergency_tone_title"
|
||||||
android:summary="%s" />
|
android:summary="%s" />
|
||||||
|
</PreferenceCategory>
|
||||||
|
|
||||||
<com.android.settingslib.RestrictedPreference
|
<com.android.settingslib.RestrictedPreference
|
||||||
android:key="cell_broadcast_settings"
|
android:key="cell_broadcast_settings"
|
||||||
android:title="@string/cell_broadcast_settings"
|
android:title="@string/cell_broadcast_settings"
|
||||||
settings:useAdminDisabledSummary="true"
|
settings:useAdminDisabledSummary="true"
|
||||||
settings:allowDividerAbove="true" >
|
settings:allowDividerAbove="true"
|
||||||
<intent
|
android:order="-1">
|
||||||
android:action="android.intent.action.MAIN"
|
<intent
|
||||||
android:targetPackage="com.android.cellbroadcastreceiver"
|
android:action="android.intent.action.MAIN"
|
||||||
android:targetClass="com.android.cellbroadcastreceiver.CellBroadcastSettings" />
|
android:targetPackage="com.android.cellbroadcastreceiver"
|
||||||
</com.android.settingslib.RestrictedPreference>
|
android:targetClass="com.android.cellbroadcastreceiver.CellBroadcastSettings" />
|
||||||
|
</com.android.settingslib.RestrictedPreference>
|
||||||
|
|
||||||
<com.android.settings.WorkOnlyCategory
|
<com.android.settings.WorkOnlyCategory
|
||||||
android:key="sound_work_settings_section"
|
android:key="sound_work_settings_section"
|
||||||
android:title="@string/sound_work_settings">
|
android:title="@string/sound_work_settings"
|
||||||
|
android:order="100">
|
||||||
|
|
||||||
<!-- Use the same sounds of the work profile -->
|
<!-- Use the same sounds of the work profile -->
|
||||||
<SwitchPreference
|
<SwitchPreference
|
||||||
@@ -184,5 +191,5 @@
|
|||||||
android:ringtoneType="alarm"
|
android:ringtoneType="alarm"
|
||||||
android:dependency="work_use_personal_sounds" />
|
android:dependency="work_use_personal_sounds" />
|
||||||
|
|
||||||
</com.android.settings.WorkOnlyCategory>
|
</com.android.settings.WorkOnlyCategory>
|
||||||
</PreferenceScreen>
|
</PreferenceScreen>
|
||||||
|
@@ -55,6 +55,7 @@ public abstract class SettingPrefController extends AbstractPreferenceController
|
|||||||
@Override
|
@Override
|
||||||
public void displayPreference(PreferenceScreen screen) {
|
public void displayPreference(PreferenceScreen screen) {
|
||||||
mPreference.init(mParent);
|
mPreference.init(mParent);
|
||||||
|
super.displayPreference(screen);
|
||||||
if (isAvailable()) {
|
if (isAvailable()) {
|
||||||
mSettingsObserver = new SettingsObserver();
|
mSettingsObserver = new SettingsObserver();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user