2 * Copyright (C) 2014 The Android Open Source Project
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 package com.android.settings.search;
19 import android.support.annotation.VisibleForTesting;
21 import com.android.settings.DateTimeSettings;
22 import com.android.settings.DisplaySettings;
23 import com.android.settings.LegalSettings;
24 import com.android.settings.connecteddevice.ConnectedDeviceDashboardFragmentOld;
25 import com.android.settings.deviceinfo.aboutphone.MyDeviceInfoFragment;
26 import com.android.settings.accessibility.AccessibilitySettings;
27 import com.android.settings.accessibility.AccessibilityShortcutPreferenceFragment;
28 import com.android.settings.accessibility.MagnificationPreferenceFragment;
29 import com.android.settings.accounts.AccountDashboardFragment;
30 import com.android.settings.applications.AppAndNotificationDashboardFragment;
31 import com.android.settings.applications.DefaultAppSettings;
32 import com.android.settings.applications.SpecialAccessSettings;
33 import com.android.settings.applications.assist.ManageAssist;
34 import com.android.settings.backup.BackupSettingsActivity;
35 import com.android.settings.backup.BackupSettingsFragment;
36 import com.android.settings.bluetooth.BluetoothSettings;
37 import com.android.settings.connecteddevice.AdvancedConnectedDeviceDashboardFragment;
38 import com.android.settings.connecteddevice.ConnectedDeviceDashboardFragment;
39 import com.android.settings.connecteddevice.usb.UsbDetailsFragment;
40 import com.android.settings.datausage.DataUsageSummary;
41 import com.android.settings.deletionhelper.AutomaticStorageManagerSettings;
42 import com.android.settings.development.DevelopmentSettingsDashboardFragment;
43 import com.android.settings.deviceinfo.DeviceInfoSettings;
44 import com.android.settings.deviceinfo.StorageDashboardFragment;
45 import com.android.settings.deviceinfo.StorageSettings;
46 import com.android.settings.deviceinfo.aboutphone.MyDeviceInfoFragment;
47 import com.android.settings.display.AmbientDisplaySettings;
48 import com.android.settings.display.NightDisplaySettings;
49 import com.android.settings.display.ScreenZoomSettings;
50 import com.android.settings.dream.DreamSettings;
51 import com.android.settings.enterprise.EnterprisePrivacySettings;
52 import com.android.settings.fuelgauge.BatterySaverSettings;
53 import com.android.settings.fuelgauge.PowerUsageAdvanced;
54 import com.android.settings.fuelgauge.PowerUsageSummary;
55 import com.android.settings.fuelgauge.SmartBatterySettings;
56 import com.android.settings.gestures.AssistGestureSettings;
57 import com.android.settings.gestures.DoubleTapPowerSettings;
58 import com.android.settings.gestures.DoubleTapScreenSettings;
59 import com.android.settings.gestures.DoubleTwistGestureSettings;
60 import com.android.settings.gestures.GestureSettings;
61 import com.android.settings.gestures.PickupGestureSettings;
62 import com.android.settings.gestures.SwipeToNotificationSettings;
63 import com.android.settings.inputmethod.AvailableVirtualKeyboardFragment;
64 import com.android.settings.inputmethod.PhysicalKeyboardFragment;
65 import com.android.settings.inputmethod.VirtualKeyboardFragment;
66 import com.android.settings.language.LanguageAndInputSettings;
67 import com.android.settings.location.LocationSettings;
68 import com.android.settings.location.ScanningSettings;
69 import com.android.settings.network.NetworkDashboardFragment;
70 import com.android.settings.nfc.PaymentSettings;
71 import com.android.settings.notification.ConfigureNotificationSettings;
72 import com.android.settings.notification.SoundSettings;
73 import com.android.settings.notification.ZenModeAutomationSettings;
74 import com.android.settings.notification.ZenModeBehaviorSettings;
75 import com.android.settings.notification.ZenModeSettings;
76 import com.android.settings.print.PrintSettingsFragment;
77 import com.android.settings.security.EncryptionAndCredential;
78 import com.android.settings.security.LockscreenDashboardFragment;
79 import com.android.settings.security.ScreenPinningSettings;
80 import com.android.settings.security.SecuritySettings;
81 import com.android.settings.security.screenlock.ScreenLockSettings;
82 import com.android.settings.sim.SimSettings;
83 import com.android.settings.support.SupportDashboardActivity;
84 import com.android.settings.system.ResetDashboardFragment;
85 import com.android.settings.system.SystemDashboardFragment;
86 import com.android.settings.tts.TextToSpeechSettings;
87 import com.android.settings.tts.TtsEnginePreferenceFragment;
88 import com.android.settings.users.UserSettings;
89 import com.android.settings.wallpaper.WallpaperTypeSettings;
90 import com.android.settings.wfd.WifiDisplaySettings;
91 import com.android.settings.wifi.ConfigureWifiSettings;
92 import com.android.settings.wifi.WifiSettings;
94 import java.util.Collection;
95 import java.util.HashSet;
98 public class SearchIndexableResourcesImpl implements SearchIndexableResources {
100 private final Set<Class> sProviders = new HashSet<>();
103 void addIndex(Class indexClass) {
104 sProviders.add(indexClass);
107 public SearchIndexableResourcesImpl() {
108 addIndex(WifiSettings.class);
109 addIndex(NetworkDashboardFragment.class);
110 addIndex(ConfigureWifiSettings.class);
111 addIndex(BluetoothSettings.class);
112 addIndex(SimSettings.class);
113 addIndex(DataUsageSummary.class);
114 addIndex(ScreenZoomSettings.class);
115 addIndex(DisplaySettings.class);
116 addIndex(AmbientDisplaySettings.class);
117 addIndex(WallpaperTypeSettings.class);
118 addIndex(AppAndNotificationDashboardFragment.class);
119 addIndex(SoundSettings.class);
120 addIndex(ZenModeSettings.class);
121 addIndex(StorageSettings.class);
122 addIndex(PowerUsageAdvanced.class);
123 addIndex(DefaultAppSettings.class);
124 addIndex(ManageAssist.class);
125 addIndex(SpecialAccessSettings.class);
126 addIndex(UserSettings.class);
127 addIndex(AssistGestureSettings.class);
128 addIndex(PickupGestureSettings.class);
129 addIndex(DoubleTapScreenSettings.class);
130 addIndex(DoubleTapPowerSettings.class);
131 addIndex(DoubleTwistGestureSettings.class);
132 addIndex(SwipeToNotificationSettings.class);
133 addIndex(GestureSettings.class);
134 addIndex(LanguageAndInputSettings.class);
135 addIndex(LocationSettings.class);
136 addIndex(ScanningSettings.class);
137 addIndex(SecuritySettings.class);
138 addIndex(ScreenLockSettings.class);
139 addIndex(EncryptionAndCredential.class);
140 addIndex(ScreenPinningSettings.class);
141 addIndex(AccountDashboardFragment.class);
142 addIndex(VirtualKeyboardFragment.class);
143 addIndex(AvailableVirtualKeyboardFragment.class);
144 addIndex(PhysicalKeyboardFragment.class);
145 addIndex(BackupSettingsActivity.class);
146 addIndex(BackupSettingsFragment.class);
147 addIndex(DateTimeSettings.class);
148 addIndex(AccessibilitySettings.class);
149 addIndex(PrintSettingsFragment.class);
150 addIndex(DevelopmentSettingsDashboardFragment.class);
151 addIndex(DeviceInfoSettings.class);
152 addIndex(LegalSettings.class);
153 addIndex(SystemDashboardFragment.class);
154 addIndex(ResetDashboardFragment.class);
155 addIndex(StorageDashboardFragment.class);
156 addIndex(ConnectedDeviceDashboardFragment.class);
157 addIndex(ConnectedDeviceDashboardFragmentOld.class);
158 addIndex(AdvancedConnectedDeviceDashboardFragment.class);
159 addIndex(EnterprisePrivacySettings.class);
160 addIndex(PaymentSettings.class);
161 addIndex(TextToSpeechSettings.class);
162 addIndex(TtsEnginePreferenceFragment.class);
163 addIndex(MagnificationPreferenceFragment.class);
164 addIndex(AccessibilityShortcutPreferenceFragment.class);
165 addIndex(DreamSettings.class);
166 addIndex(SupportDashboardActivity.class);
167 addIndex(AutomaticStorageManagerSettings.class);
168 addIndex(ConfigureNotificationSettings.class);
169 addIndex(PowerUsageSummary.class);
170 addIndex(BatterySaverSettings.class);
171 addIndex(LockscreenDashboardFragment.class);
172 addIndex(UsbDetailsFragment.class);
173 addIndex(WifiDisplaySettings.class);
174 addIndex(ZenModeBehaviorSettings.class);
175 addIndex(ZenModeAutomationSettings.class);
176 addIndex(NightDisplaySettings.class);
177 addIndex(SmartBatterySettings.class);
178 addIndex(MyDeviceInfoFragment.class);
182 public Collection<Class> getProviderValues() {