Remove old code from SoundSettings not used in new IA.
- remove the old sound settings xml - merge Sound Dashboard metadata into SiybdSettingsActivity instead and remove Sound Dashboard. - remove OtherSoundSettings Bug: 35764802 Test: make RunSettingsRoboTests Change-Id: I25bb94b375cfe0277b3c961e4bee6fec9a14fb98
This commit is contained in:
@@ -2575,15 +2575,21 @@
|
|||||||
<category android:name="android.intent.category.VOICE_LAUNCH" />
|
<category android:name="android.intent.category.VOICE_LAUNCH" />
|
||||||
<category android:name="com.android.settings.SHORTCUT" />
|
<category android:name="com.android.settings.SHORTCUT" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
<intent-filter android:priority="7">
|
<intent-filter android:priority="1">
|
||||||
|
<action android:name="android.settings.ACTION_OTHER_SOUND_SETTINGS" />
|
||||||
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
|
</intent-filter>
|
||||||
|
<intent-filter android:priority="6">
|
||||||
<action android:name="com.android.settings.action.SETTINGS" />
|
<action android:name="com.android.settings.action.SETTINGS" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
<meta-data android:name="com.android.settings.category"
|
<meta-data android:name="com.android.settings.category"
|
||||||
android:value="com.android.settings.category.device" />
|
android:value="com.android.settings.category.ia.homepage" />
|
||||||
<meta-data android:name="com.android.settings.FRAGMENT_CLASS"
|
<meta-data android:name="com.android.settings.FRAGMENT_CLASS"
|
||||||
android:value="com.android.settings.notification.SoundSettings" />
|
android:value="com.android.settings.notification.SoundSettings" />
|
||||||
<meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED"
|
<meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED"
|
||||||
android:value="true" />
|
android:value="true" />
|
||||||
|
<meta-data android:name="com.android.settings.summary"
|
||||||
|
android:value="@string/sound_dashboard_summary"/>
|
||||||
</activity>
|
</activity>
|
||||||
|
|
||||||
<!-- Keep compatibility with old shortcuts. -->
|
<!-- Keep compatibility with old shortcuts. -->
|
||||||
@@ -2595,24 +2601,6 @@
|
|||||||
android:value="com.android.settings.notification.SoundSettings" />
|
android:value="com.android.settings.notification.SoundSettings" />
|
||||||
</activity-alias>
|
</activity-alias>
|
||||||
|
|
||||||
<activity android:name="Settings$OtherSoundSettingsActivity"
|
|
||||||
android:label="@string/other_sound_settings"
|
|
||||||
android:exported="true"
|
|
||||||
android:taskAffinity="">
|
|
||||||
<intent-filter android:priority="1">
|
|
||||||
<action android:name="android.settings.ACTION_OTHER_SOUND_SETTINGS" />
|
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
|
||||||
</intent-filter>
|
|
||||||
<intent-filter>
|
|
||||||
<action android:name="android.intent.action.MAIN" />
|
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
|
||||||
</intent-filter>
|
|
||||||
<meta-data android:name="com.android.settings.FRAGMENT_CLASS"
|
|
||||||
android:value="com.android.settings.notification.OtherSoundSettings" />
|
|
||||||
<meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED"
|
|
||||||
android:value="true" />
|
|
||||||
</activity>
|
|
||||||
|
|
||||||
<!-- Show apps for which application-level notification settings are applicable -->
|
<!-- Show apps for which application-level notification settings are applicable -->
|
||||||
<activity android:name="Settings$NotificationAppListActivity"
|
<activity android:name="Settings$NotificationAppListActivity"
|
||||||
android:label="@string/app_notifications_title"
|
android:label="@string/app_notifications_title"
|
||||||
@@ -3057,22 +3045,6 @@
|
|||||||
android:value="com.android.settings.category.ia.homepage"/>
|
android:value="com.android.settings.category.ia.homepage"/>
|
||||||
</activity-alias>
|
</activity-alias>
|
||||||
|
|
||||||
<activity-alias android:name="SoundDashboardAlias"
|
|
||||||
android:targetActivity="Settings$SoundSettingsActivity"
|
|
||||||
android:icon="@drawable/ic_dashboard_sound">
|
|
||||||
<intent-filter android:priority="6">
|
|
||||||
<action android:name="com.android.settings.action.SETTINGS" />
|
|
||||||
</intent-filter>
|
|
||||||
<meta-data android:name="com.android.settings.category"
|
|
||||||
android:value="com.android.settings.category.ia.homepage" />
|
|
||||||
<meta-data android:name="com.android.settings.FRAGMENT_CLASS"
|
|
||||||
android:value="com.android.settings.notification.SoundSettings" />
|
|
||||||
<meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED"
|
|
||||||
android:value="true" />
|
|
||||||
<meta-data android:name="com.android.settings.summary"
|
|
||||||
android:value="@string/sound_dashboard_summary"/>
|
|
||||||
</activity-alias>
|
|
||||||
|
|
||||||
<activity android:name=".Settings$StorageDashboardActivity"
|
<activity android:name=".Settings$StorageDashboardActivity"
|
||||||
android:label="@string/storage_settings"
|
android:label="@string/storage_settings"
|
||||||
android:icon="@drawable/ic_dashboard_storage">
|
android:icon="@drawable/ic_dashboard_storage">
|
||||||
|
@@ -1,109 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!-- Copyright (C) 2015 The Android Open Source Project
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
|
|
||||||
android:title="@string/sound_settings"
|
|
||||||
android:key="sound_settings"
|
|
||||||
settings:keywords="@string/keywords_sounds">
|
|
||||||
|
|
||||||
<!-- Media volume -->
|
|
||||||
<com.android.settings.notification.VolumeSeekBarPreference
|
|
||||||
android:key="media_volume"
|
|
||||||
android:icon="@*android:drawable/ic_audio_media"
|
|
||||||
android:title="@string/media_volume_option_title" />
|
|
||||||
|
|
||||||
<!-- Alarm volume -->
|
|
||||||
<com.android.settings.notification.VolumeSeekBarPreference
|
|
||||||
android:key="alarm_volume"
|
|
||||||
android:icon="@*android:drawable/ic_audio_alarm"
|
|
||||||
android:title="@string/alarm_volume_option_title" />
|
|
||||||
|
|
||||||
<!-- Ring volume -->
|
|
||||||
<com.android.settings.notification.VolumeSeekBarPreference
|
|
||||||
android:key="ring_volume"
|
|
||||||
android:icon="@*android:drawable/ic_audio_ring_notif"
|
|
||||||
android:title="@string/ring_volume_option_title" />
|
|
||||||
|
|
||||||
<!-- Notification volume -->
|
|
||||||
<com.android.settings.notification.VolumeSeekBarPreference
|
|
||||||
android:key="notification_volume"
|
|
||||||
android:icon="@*android:drawable/ic_audio_ring_notif"
|
|
||||||
android:title="@string/notification_volume_option_title" />
|
|
||||||
|
|
||||||
<!-- Also vibrate for calls -->
|
|
||||||
<SwitchPreference
|
|
||||||
android:key="vibrate_when_ringing"
|
|
||||||
android:title="@string/vibrate_when_ringing_title" />
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Interruptions -->
|
|
||||||
<com.android.settingslib.RestrictedPreference
|
|
||||||
android:key="zen_mode"
|
|
||||||
android:title="@string/zen_mode_settings_title"
|
|
||||||
settings:useAdminDisabledSummary="true"
|
|
||||||
settings:keywords="@string/keywords_sounds_and_notifications_interruptions"
|
|
||||||
android:fragment="com.android.settings.notification.ZenModeSettings" />
|
|
||||||
|
|
||||||
<!-- Phone ringtone -->
|
|
||||||
<com.android.settings.DefaultRingtonePreference
|
|
||||||
android:key="ringtone"
|
|
||||||
android:title="@string/ringtone_title"
|
|
||||||
android:dialogTitle="@string/ringtone_title"
|
|
||||||
android:summary="@string/ringtone_summary"
|
|
||||||
android:ringtoneType="ringtone" />
|
|
||||||
|
|
||||||
<!-- Default notification ringtone -->
|
|
||||||
<com.android.settings.DefaultRingtonePreference
|
|
||||||
android:key="notification_ringtone"
|
|
||||||
android:title="@string/notification_ringtone_title"
|
|
||||||
android:dialogTitle="@string/notification_ringtone_title"
|
|
||||||
android:summary="@string/ringtone_summary"
|
|
||||||
android:ringtoneType="notification" />
|
|
||||||
|
|
||||||
<!-- Default alarm ringtone -->
|
|
||||||
<com.android.settings.DefaultRingtonePreference
|
|
||||||
android:key="alarm_ringtone"
|
|
||||||
android:title="@string/alarm_ringtone_title"
|
|
||||||
android:dialogTitle="@string/alarm_ringtone_title"
|
|
||||||
android:summary="@string/ringtone_summary"
|
|
||||||
android:persistent="false"
|
|
||||||
android:ringtoneType="alarm" />
|
|
||||||
|
|
||||||
<com.android.settingslib.RestrictedPreference
|
|
||||||
android:key="cell_broadcast_settings"
|
|
||||||
android:title="@string/cell_broadcast_settings"
|
|
||||||
settings:useAdminDisabledSummary="true">
|
|
||||||
<intent
|
|
||||||
android:action="android.intent.action.MAIN"
|
|
||||||
android:targetPackage="com.android.cellbroadcastreceiver"
|
|
||||||
android:targetClass="com.android.cellbroadcastreceiver.CellBroadcastSettings" />
|
|
||||||
</com.android.settingslib.RestrictedPreference>
|
|
||||||
|
|
||||||
<!-- Other sounds -->
|
|
||||||
<Preference
|
|
||||||
android:key="other_sounds"
|
|
||||||
android:title="@string/other_sound_settings"
|
|
||||||
android:persistent="false"
|
|
||||||
android:fragment="com.android.settings.notification.OtherSoundSettings" />
|
|
||||||
|
|
||||||
<!-- Cast -->
|
|
||||||
<Preference
|
|
||||||
android:key="wifi_display"
|
|
||||||
android:title="@string/wifi_display_settings_title"
|
|
||||||
android:fragment="com.android.settings.wfd.WifiDisplaySettings" />
|
|
||||||
|
|
||||||
</PreferenceScreen>
|
|
@@ -121,7 +121,6 @@ public class Settings extends SettingsActivity {
|
|||||||
public static class NotificationAppListActivity extends SettingsActivity { /* empty */ }
|
public static class NotificationAppListActivity extends SettingsActivity { /* empty */ }
|
||||||
public static class AppNotificationSettingsActivity extends SettingsActivity { /* empty */ }
|
public static class AppNotificationSettingsActivity extends SettingsActivity { /* empty */ }
|
||||||
public static class ChannelNotificationSettingsActivity extends SettingsActivity { /* empty */ }
|
public static class ChannelNotificationSettingsActivity extends SettingsActivity { /* empty */ }
|
||||||
public static class OtherSoundSettingsActivity extends SettingsActivity { /* empty */ }
|
|
||||||
public static class ManageDomainUrlsActivity extends SettingsActivity { /* empty */ }
|
public static class ManageDomainUrlsActivity extends SettingsActivity { /* empty */ }
|
||||||
public static class AutomaticStorageManagerSettingsActivity extends SettingsActivity { /* empty */ }
|
public static class AutomaticStorageManagerSettingsActivity extends SettingsActivity { /* empty */ }
|
||||||
public static class GamesStorageActivity extends SettingsActivity { /* empty */ }
|
public static class GamesStorageActivity extends SettingsActivity { /* empty */ }
|
||||||
|
@@ -104,7 +104,6 @@ import com.android.settings.notification.ChannelNotificationSettings;
|
|||||||
import com.android.settings.notification.ConfigureNotificationSettings;
|
import com.android.settings.notification.ConfigureNotificationSettings;
|
||||||
import com.android.settings.notification.NotificationAccessSettings;
|
import com.android.settings.notification.NotificationAccessSettings;
|
||||||
import com.android.settings.notification.NotificationStation;
|
import com.android.settings.notification.NotificationStation;
|
||||||
import com.android.settings.notification.OtherSoundSettings;
|
|
||||||
import com.android.settings.notification.SoundSettings;
|
import com.android.settings.notification.SoundSettings;
|
||||||
import com.android.settings.notification.ZenAccessSettings;
|
import com.android.settings.notification.ZenAccessSettings;
|
||||||
import com.android.settings.notification.ZenModeAutomationSettings;
|
import com.android.settings.notification.ZenModeAutomationSettings;
|
||||||
@@ -208,7 +207,6 @@ public class SettingsGateway {
|
|||||||
BatterySaverSettings.class.getName(),
|
BatterySaverSettings.class.getName(),
|
||||||
AppNotificationSettings.class.getName(),
|
AppNotificationSettings.class.getName(),
|
||||||
ChannelNotificationSettings.class.getName(),
|
ChannelNotificationSettings.class.getName(),
|
||||||
OtherSoundSettings.class.getName(),
|
|
||||||
ApnSettings.class.getName(),
|
ApnSettings.class.getName(),
|
||||||
ApnEditor.class.getName(),
|
ApnEditor.class.getName(),
|
||||||
WifiCallingSettings.class.getName(),
|
WifiCallingSettings.class.getName(),
|
||||||
|
@@ -1,109 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (C) 2014 The Android Open Source Project
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.android.settings.notification;
|
|
||||||
|
|
||||||
import android.content.Context;
|
|
||||||
import android.provider.SearchIndexableResource;
|
|
||||||
|
|
||||||
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
|
|
||||||
import com.android.settings.R;
|
|
||||||
import com.android.settings.core.PreferenceController;
|
|
||||||
import com.android.settings.core.lifecycle.Lifecycle;
|
|
||||||
import com.android.settings.dashboard.DashboardFragment;
|
|
||||||
import com.android.settings.search.BaseSearchIndexProvider;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/* This class has been deprecated Modifications to Other Sounds settings should be made in
|
|
||||||
{@link SoundSettings } instead. */
|
|
||||||
@Deprecated
|
|
||||||
public class OtherSoundSettings extends DashboardFragment {
|
|
||||||
private static final String TAG = "OtherSoundSettings";
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getMetricsCategory() {
|
|
||||||
return MetricsEvent.NOTIFICATION_OTHER_SOUND;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected int getHelpResource() {
|
|
||||||
return R.string.help_uri_other_sounds;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected String getLogTag() {
|
|
||||||
return TAG;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected int getPreferenceScreenResId() {
|
|
||||||
return R.xml.other_sound_settings;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected List<PreferenceController> getPreferenceControllers(Context context) {
|
|
||||||
final List<PreferenceController> controllers = new ArrayList<>();
|
|
||||||
Lifecycle lifecycle = getLifecycle();
|
|
||||||
controllers.add(new DialPadTonePreferenceController(context, this, lifecycle));
|
|
||||||
controllers.add(new ScreenLockSoundPreferenceController(context, this, lifecycle));
|
|
||||||
controllers.add(new ChargingSoundPreferenceController(context, this, lifecycle));
|
|
||||||
controllers.add(new DockingSoundPreferenceController(context, this, lifecycle));
|
|
||||||
controllers.add(new TouchSoundPreferenceController(context, this, lifecycle));
|
|
||||||
controllers.add(new VibrateOnTouchPreferenceController(context, this, lifecycle));
|
|
||||||
controllers.add(new DockAudioMediaPreferenceController(context, this, lifecycle));
|
|
||||||
controllers.add(new BootSoundPreferenceController(context));
|
|
||||||
controllers.add(new EmergencyTonePreferenceController(context, this, lifecycle));
|
|
||||||
return controllers;
|
|
||||||
}
|
|
||||||
|
|
||||||
// === Indexing ===
|
|
||||||
|
|
||||||
public static final BaseSearchIndexProvider SEARCH_INDEX_DATA_PROVIDER =
|
|
||||||
new BaseSearchIndexProvider() {
|
|
||||||
|
|
||||||
public List<SearchIndexableResource> getXmlResourcesToIndex(
|
|
||||||
Context context, boolean enabled) {
|
|
||||||
final SearchIndexableResource sir = new SearchIndexableResource(context);
|
|
||||||
sir.xmlResId = R.xml.other_sound_settings;
|
|
||||||
return Arrays.asList(sir);
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<String> getNonIndexableKeys(Context context) {
|
|
||||||
final ArrayList<String> rt = new ArrayList<String>();
|
|
||||||
new DialPadTonePreferenceController(context, null /* SettingsPreferenceFragment */,
|
|
||||||
null /* Lifecycle */).updateNonIndexableKeys(rt);
|
|
||||||
new ScreenLockSoundPreferenceController(context, null /* SettingsPreferenceFragment */,
|
|
||||||
null /* Lifecycle */).updateNonIndexableKeys(rt);
|
|
||||||
new ChargingSoundPreferenceController(context, null /* SettingsPreferenceFragment */,
|
|
||||||
null /* Lifecycle */).updateNonIndexableKeys(rt);
|
|
||||||
new DockingSoundPreferenceController(context, null /* SettingsPreferenceFragment */,
|
|
||||||
null /* Lifecycle */).updateNonIndexableKeys(rt);
|
|
||||||
new TouchSoundPreferenceController(context, null /* SettingsPreferenceFragment */,
|
|
||||||
null /* Lifecycle */).updateNonIndexableKeys(rt);
|
|
||||||
new VibrateOnTouchPreferenceController(context, null /* SettingsPreferenceFragment */,
|
|
||||||
null /* Lifecycle */).updateNonIndexableKeys(rt);
|
|
||||||
new DockAudioMediaPreferenceController(context, null /* SettingsPreferenceFragment */,
|
|
||||||
null /* Lifecycle */).updateNonIndexableKeys(rt);
|
|
||||||
new BootSoundPreferenceController(context).updateNonIndexableKeys(rt);
|
|
||||||
new EmergencyTonePreferenceController(context, null /* SettingsPreferenceFragment */,
|
|
||||||
null /* Lifecycle */).updateNonIndexableKeys(rt);
|
|
||||||
return rt;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
@@ -100,17 +100,13 @@ public class SoundSettings extends DashboardFragment {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int getPreferenceScreenResId() {
|
protected int getPreferenceScreenResId() {
|
||||||
return mDashboardFeatureProvider.isEnabled()
|
return R.xml.ia_sound_settings;
|
||||||
? R.xml.ia_sound_settings : R.xml.sound_settings;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected List<PreferenceController> getPreferenceControllers(Context context) {
|
protected List<PreferenceController> getPreferenceControllers(Context context) {
|
||||||
final List<PreferenceController> controllers = new ArrayList<>();
|
final List<PreferenceController> controllers = new ArrayList<>();
|
||||||
Lifecycle lifecycle = getLifecycle();
|
Lifecycle lifecycle = getLifecycle();
|
||||||
if (!mDashboardFeatureProvider.isEnabled()) {
|
|
||||||
controllers.add(new CastPreferenceController(context));
|
|
||||||
}
|
|
||||||
controllers.add(new ZenModePreferenceController(context));
|
controllers.add(new ZenModePreferenceController(context));
|
||||||
controllers.add(new EmergencyBroadcastPreferenceController(context));
|
controllers.add(new EmergencyBroadcastPreferenceController(context));
|
||||||
controllers.add(new VibrateWhenRingPreferenceController(context));
|
controllers.add(new VibrateWhenRingPreferenceController(context));
|
||||||
@@ -132,17 +128,15 @@ public class SoundSettings extends DashboardFragment {
|
|||||||
controllers.add(mWorkSoundController);
|
controllers.add(mWorkSoundController);
|
||||||
|
|
||||||
// === Other Sound Settings ===
|
// === Other Sound Settings ===
|
||||||
if (mDashboardFeatureProvider.isEnabled()) {
|
controllers.add(new DialPadTonePreferenceController(context, this, lifecycle));
|
||||||
controllers.add(new DialPadTonePreferenceController(context, this, lifecycle));
|
controllers.add(new ScreenLockSoundPreferenceController(context, this, lifecycle));
|
||||||
controllers.add(new ScreenLockSoundPreferenceController(context, this, lifecycle));
|
controllers.add(new ChargingSoundPreferenceController(context, this, lifecycle));
|
||||||
controllers.add(new ChargingSoundPreferenceController(context, this, lifecycle));
|
controllers.add(new DockingSoundPreferenceController(context, this, lifecycle));
|
||||||
controllers.add(new DockingSoundPreferenceController(context, this, lifecycle));
|
controllers.add(new TouchSoundPreferenceController(context, this, lifecycle));
|
||||||
controllers.add(new TouchSoundPreferenceController(context, this, lifecycle));
|
controllers.add(new VibrateOnTouchPreferenceController(context, this, lifecycle));
|
||||||
controllers.add(new VibrateOnTouchPreferenceController(context, this, lifecycle));
|
controllers.add(new DockAudioMediaPreferenceController(context, this, lifecycle));
|
||||||
controllers.add(new DockAudioMediaPreferenceController(context, this, lifecycle));
|
controllers.add(new BootSoundPreferenceController(context));
|
||||||
controllers.add(new BootSoundPreferenceController(context));
|
controllers.add(new EmergencyTonePreferenceController(context, this, lifecycle));
|
||||||
controllers.add(new EmergencyTonePreferenceController(context, this, lifecycle));
|
|
||||||
}
|
|
||||||
|
|
||||||
return controllers;
|
return controllers;
|
||||||
}
|
}
|
||||||
@@ -192,8 +186,6 @@ public class SoundSettings extends DashboardFragment {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
// === Callbacks ===
|
// === Callbacks ===
|
||||||
|
|
||||||
|
|
||||||
@@ -222,7 +214,7 @@ public class SoundSettings extends DashboardFragment {
|
|||||||
public List<SearchIndexableResource> getXmlResourcesToIndex(
|
public List<SearchIndexableResource> getXmlResourcesToIndex(
|
||||||
Context context, boolean enabled) {
|
Context context, boolean enabled) {
|
||||||
final SearchIndexableResource sir = new SearchIndexableResource(context);
|
final SearchIndexableResource sir = new SearchIndexableResource(context);
|
||||||
sir.xmlResId = R.xml.sound_settings;
|
sir.xmlResId = R.xml.ia_sound_settings;
|
||||||
return Arrays.asList(sir);
|
return Arrays.asList(sir);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -237,36 +229,31 @@ public class SoundSettings extends DashboardFragment {
|
|||||||
new PhoneRingtonePreferenceController(context).updateNonIndexableKeys(rt);
|
new PhoneRingtonePreferenceController(context).updateNonIndexableKeys(rt);
|
||||||
new VibrateWhenRingPreferenceController(context).updateNonIndexableKeys(rt);
|
new VibrateWhenRingPreferenceController(context).updateNonIndexableKeys(rt);
|
||||||
new EmergencyBroadcastPreferenceController(context).updateNonIndexableKeys(rt);
|
new EmergencyBroadcastPreferenceController(context).updateNonIndexableKeys(rt);
|
||||||
if (FeatureFactory.getFactory(context).getDashboardFeatureProvider(context)
|
new DialPadTonePreferenceController(context,
|
||||||
.isEnabled()) {
|
null /* SettingsPreferenceFragment */,
|
||||||
new DialPadTonePreferenceController(context,
|
null /* Lifecycle */).updateNonIndexableKeys(rt);
|
||||||
null /* SettingsPreferenceFragment */,
|
new ScreenLockSoundPreferenceController(context,
|
||||||
null /* Lifecycle */).updateNonIndexableKeys(rt);
|
null /* SettingsPreferenceFragment */,
|
||||||
new ScreenLockSoundPreferenceController(context,
|
null /* Lifecycle */).updateNonIndexableKeys(rt);
|
||||||
null /* SettingsPreferenceFragment */,
|
new ChargingSoundPreferenceController(context,
|
||||||
null /* Lifecycle */).updateNonIndexableKeys(rt);
|
null /* SettingsPreferenceFragment */,
|
||||||
new ChargingSoundPreferenceController(context,
|
null /* Lifecycle */).updateNonIndexableKeys(rt);
|
||||||
null /* SettingsPreferenceFragment */,
|
new DockingSoundPreferenceController(context,
|
||||||
null /* Lifecycle */).updateNonIndexableKeys(rt);
|
null /* SettingsPreferenceFragment */,
|
||||||
new DockingSoundPreferenceController(context,
|
null /* Lifecycle */).updateNonIndexableKeys(rt);
|
||||||
null /* SettingsPreferenceFragment */,
|
new TouchSoundPreferenceController(context, null /*
|
||||||
null /* Lifecycle */).updateNonIndexableKeys(rt);
|
|
||||||
new TouchSoundPreferenceController(context, null /*
|
|
||||||
SettingsPreferenceFragment */,
|
SettingsPreferenceFragment */,
|
||||||
null /* Lifecycle */).updateNonIndexableKeys(rt);
|
null /* Lifecycle */).updateNonIndexableKeys(rt);
|
||||||
new VibrateOnTouchPreferenceController(context,
|
new VibrateOnTouchPreferenceController(context,
|
||||||
null /* SettingsPreferenceFragment */,
|
null /* SettingsPreferenceFragment */,
|
||||||
null /* Lifecycle */).updateNonIndexableKeys(rt);
|
null /* Lifecycle */).updateNonIndexableKeys(rt);
|
||||||
new DockAudioMediaPreferenceController(context,
|
new DockAudioMediaPreferenceController(context,
|
||||||
null /* SettingsPreferenceFragment */,
|
null /* SettingsPreferenceFragment */,
|
||||||
null /* Lifecycle */).updateNonIndexableKeys(rt);
|
null /* Lifecycle */).updateNonIndexableKeys(rt);
|
||||||
new BootSoundPreferenceController(context).updateNonIndexableKeys(rt);
|
new BootSoundPreferenceController(context).updateNonIndexableKeys(rt);
|
||||||
new EmergencyTonePreferenceController(context,
|
new EmergencyTonePreferenceController(context,
|
||||||
null /* SettingsPreferenceFragment */,
|
null /* SettingsPreferenceFragment */,
|
||||||
null /* Lifecycle */).updateNonIndexableKeys(rt);
|
null /* Lifecycle */).updateNonIndexableKeys(rt);
|
||||||
} else {
|
|
||||||
new CastPreferenceController(context).updateNonIndexableKeys(rt);
|
|
||||||
}
|
|
||||||
|
|
||||||
return rt;
|
return rt;
|
||||||
}
|
}
|
||||||
|
@@ -46,7 +46,6 @@ import com.android.settings.inputmethod.InputMethodAndLanguageSettings;
|
|||||||
import com.android.settings.location.LocationSettings;
|
import com.android.settings.location.LocationSettings;
|
||||||
import com.android.settings.location.ScanningSettings;
|
import com.android.settings.location.ScanningSettings;
|
||||||
import com.android.settings.notification.ConfigureNotificationSettings;
|
import com.android.settings.notification.ConfigureNotificationSettings;
|
||||||
import com.android.settings.notification.OtherSoundSettings;
|
|
||||||
import com.android.settings.notification.SoundSettings;
|
import com.android.settings.notification.SoundSettings;
|
||||||
import com.android.settings.notification.ZenModeAutomationSettings;
|
import com.android.settings.notification.ZenModeAutomationSettings;
|
||||||
import com.android.settings.notification.ZenModePrioritySettings;
|
import com.android.settings.notification.ZenModePrioritySettings;
|
||||||
@@ -133,7 +132,6 @@ public final class Ranking {
|
|||||||
|
|
||||||
// Notifications
|
// Notifications
|
||||||
sRankMap.put(ConfigureNotificationSettings.class.getName(), RANK_NOTIFICATIONS);
|
sRankMap.put(ConfigureNotificationSettings.class.getName(), RANK_NOTIFICATIONS);
|
||||||
sRankMap.put(OtherSoundSettings.class.getName(), RANK_NOTIFICATIONS);
|
|
||||||
sRankMap.put(ZenModeSettings.class.getName(), RANK_NOTIFICATIONS);
|
sRankMap.put(ZenModeSettings.class.getName(), RANK_NOTIFICATIONS);
|
||||||
sRankMap.put(ZenModePrioritySettings.class.getName(), RANK_NOTIFICATIONS);
|
sRankMap.put(ZenModePrioritySettings.class.getName(), RANK_NOTIFICATIONS);
|
||||||
sRankMap.put(ZenModeAutomationSettings.class.getName(), RANK_NOTIFICATIONS);
|
sRankMap.put(ZenModeAutomationSettings.class.getName(), RANK_NOTIFICATIONS);
|
||||||
|
@@ -69,7 +69,6 @@ import com.android.settings.location.ScanningSettings;
|
|||||||
import com.android.settings.network.NetworkDashboardFragment;
|
import com.android.settings.network.NetworkDashboardFragment;
|
||||||
import com.android.settings.nfc.PaymentSettings;
|
import com.android.settings.nfc.PaymentSettings;
|
||||||
import com.android.settings.notification.ConfigureNotificationSettings;
|
import com.android.settings.notification.ConfigureNotificationSettings;
|
||||||
import com.android.settings.notification.OtherSoundSettings;
|
|
||||||
import com.android.settings.notification.SoundSettings;
|
import com.android.settings.notification.SoundSettings;
|
||||||
import com.android.settings.notification.ZenModePrioritySettings;
|
import com.android.settings.notification.ZenModePrioritySettings;
|
||||||
import com.android.settings.notification.ZenModeSettings;
|
import com.android.settings.notification.ZenModeSettings;
|
||||||
@@ -122,7 +121,6 @@ public final class SearchIndexableResources {
|
|||||||
addIndex(AppAndNotificationDashboardFragment.class, NO_DATA_RES_ID,
|
addIndex(AppAndNotificationDashboardFragment.class, NO_DATA_RES_ID,
|
||||||
R.drawable.ic_settings_applications);
|
R.drawable.ic_settings_applications);
|
||||||
addIndex(SoundSettings.class, NO_DATA_RES_ID, R.drawable.ic_settings_sound);
|
addIndex(SoundSettings.class, NO_DATA_RES_ID, R.drawable.ic_settings_sound);
|
||||||
addIndex(OtherSoundSettings.class, NO_DATA_RES_ID, R.drawable.ic_settings_sound);
|
|
||||||
addIndex(ZenModeSettings.class,
|
addIndex(ZenModeSettings.class,
|
||||||
R.xml.zen_mode_settings, R.drawable.ic_settings_notifications);
|
R.xml.zen_mode_settings, R.drawable.ic_settings_notifications);
|
||||||
addIndex(ZenModePrioritySettings.class,
|
addIndex(ZenModePrioritySettings.class,
|
||||||
|
@@ -53,7 +53,7 @@ public class SettingPrefControllerTest {
|
|||||||
@Mock
|
@Mock
|
||||||
private PreferenceScreen mScreen;
|
private PreferenceScreen mScreen;
|
||||||
@Mock
|
@Mock
|
||||||
private OtherSoundSettings mSetting;
|
private SoundSettings mSetting;
|
||||||
@Mock
|
@Mock
|
||||||
private Activity mActivity;
|
private Activity mActivity;
|
||||||
@Mock
|
@Mock
|
||||||
|
Reference in New Issue
Block a user