Fabrice Di Meglio | 51bfee5 | 2014-03-20 19:52:29 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2014 The Android Open Source Project |
| 3 | * |
| 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 |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 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. |
| 15 | */ |
| 16 | |
| 17 | package com.android.settings.search; |
| 18 | |
Jason Monk | 91e2f89 | 2016-02-23 15:31:09 -0500 | [diff] [blame] | 19 | import android.provider.SearchIndexableResource; |
Tadashi G. Takaoka | b51f6bf | 2016-11-22 23:53:36 +0900 | [diff] [blame] | 20 | import android.support.annotation.DrawableRes; |
| 21 | import android.support.annotation.VisibleForTesting; |
| 22 | import android.support.annotation.XmlRes; |
Fabrice Di Meglio | 51bfee5 | 2014-03-20 19:52:29 -0700 | [diff] [blame] | 23 | import com.android.settings.DateTimeSettings; |
| 24 | import com.android.settings.DevelopmentSettings; |
| 25 | import com.android.settings.DeviceInfoSettings; |
| 26 | import com.android.settings.DisplaySettings; |
Doris Ling | 8161054 | 2017-02-15 17:49:18 -0800 | [diff] [blame] | 27 | import com.android.settings.EncryptionAndCredential; |
Jason Monk | f940232 | 2015-06-10 10:02:59 -0400 | [diff] [blame] | 28 | import com.android.settings.LegalSettings; |
Fabrice Di Meglio | 51bfee5 | 2014-03-20 19:52:29 -0700 | [diff] [blame] | 29 | import com.android.settings.PrivacySettings; |
| 30 | import com.android.settings.R; |
John Spurlock | 45fa140 | 2015-04-09 12:50:04 -0400 | [diff] [blame] | 31 | import com.android.settings.ScreenPinningSettings; |
Fabrice Di Meglio | 51bfee5 | 2014-03-20 19:52:29 -0700 | [diff] [blame] | 32 | import com.android.settings.SecuritySettings; |
Fabrice Di Meglio | 51bfee5 | 2014-03-20 19:52:29 -0700 | [diff] [blame] | 33 | import com.android.settings.WallpaperTypeSettings; |
| 34 | import com.android.settings.WirelessSettings; |
| 35 | import com.android.settings.accessibility.AccessibilitySettings; |
Fan Zhang | 6e88635 | 2016-12-05 14:42:49 -0800 | [diff] [blame] | 36 | import com.android.settings.accounts.UserAndAccountDashboardFragment; |
Jason Monk | 5b3aa36 | 2015-03-18 16:03:57 -0400 | [diff] [blame] | 37 | import com.android.settings.applications.AdvancedAppSettings; |
Fan Zhang | 6e88635 | 2016-12-05 14:42:49 -0800 | [diff] [blame] | 38 | import com.android.settings.applications.AppAndNotificationDashboardFragment; |
Jason Monk | 91e2f89 | 2016-02-23 15:31:09 -0500 | [diff] [blame] | 39 | import com.android.settings.applications.SpecialAccessSettings; |
Fan Zhang | dfce62c | 2017-02-16 15:00:53 -0800 | [diff] [blame] | 40 | import com.android.settings.applications.assist.ManageAssist; |
Anton Philippov | 9a5220e | 2017-03-01 21:08:56 +0000 | [diff] [blame^] | 41 | import com.android.settings.backup.BackupSettingsActivity; |
Anton Philippov | adfec55 | 2017-01-25 20:37:36 +0000 | [diff] [blame] | 42 | import com.android.settings.backup.BackupSettingsFragment; |
Fabrice Di Meglio | 51bfee5 | 2014-03-20 19:52:29 -0700 | [diff] [blame] | 43 | import com.android.settings.bluetooth.BluetoothSettings; |
Fan Zhang | 762b496 | 2016-11-30 15:56:17 -0800 | [diff] [blame] | 44 | import com.android.settings.connecteddevice.ConnectedDeviceDashboardFragment; |
Jason Monk | b37e288 | 2016-01-11 14:27:20 -0500 | [diff] [blame] | 45 | import com.android.settings.datausage.DataUsageMeteredSettings; |
| 46 | import com.android.settings.datausage.DataUsageSummary; |
Fan Zhang | 31a2853 | 2016-10-04 17:48:32 -0700 | [diff] [blame] | 47 | import com.android.settings.deviceinfo.StorageDashboardFragment; |
Daniel Nishi | 9f60f42 | 2017-02-15 15:25:48 -0800 | [diff] [blame] | 48 | import com.android.settings.deviceinfo.StorageProfileFragment; |
Jeff Sharkey | 42833b2 | 2015-04-11 21:27:33 -0700 | [diff] [blame] | 49 | import com.android.settings.deviceinfo.StorageSettings; |
Alan Viverette | 01a04f1 | 2015-12-10 14:07:51 -0500 | [diff] [blame] | 50 | import com.android.settings.display.ScreenZoomSettings; |
Bartosz Fabianowski | 05061fc | 2016-11-14 12:04:49 +0100 | [diff] [blame] | 51 | import com.android.settings.enterprise.EnterprisePrivacySettings; |
John Spurlock | c7f8e8c | 2014-06-04 19:11:22 -0400 | [diff] [blame] | 52 | import com.android.settings.fuelgauge.BatterySaverSettings; |
jackqdyulei | a224b01 | 2017-01-27 16:11:13 -0800 | [diff] [blame] | 53 | import com.android.settings.fuelgauge.PowerUsageAdvanced; |
jackqdyulei | 722fc81 | 2017-01-18 11:23:57 -0800 | [diff] [blame] | 54 | import com.android.settings.fuelgauge.PowerUsageDetail; |
Fabrice Di Meglio | 51bfee5 | 2014-03-20 19:52:29 -0700 | [diff] [blame] | 55 | import com.android.settings.fuelgauge.PowerUsageSummary; |
Philip Quinn | a9831d4 | 2017-02-13 20:07:09 -0800 | [diff] [blame] | 56 | import com.android.settings.gestures.AssistGestureSettings; |
Fan Zhang | ee52440 | 2016-12-05 12:58:03 -0800 | [diff] [blame] | 57 | import com.android.settings.gestures.DoubleTapPowerSettings; |
| 58 | import com.android.settings.gestures.DoubleTapScreenSettings; |
| 59 | import com.android.settings.gestures.DoubleTwistGestureSettings; |
Doris Ling | ffb87f7 | 2016-07-19 11:45:03 -0700 | [diff] [blame] | 60 | import com.android.settings.gestures.GestureSettings; |
Fan Zhang | ee52440 | 2016-12-05 12:58:03 -0800 | [diff] [blame] | 61 | import com.android.settings.gestures.PickupGestureSettings; |
| 62 | import com.android.settings.gestures.SwipeToNotificationSettings; |
Tadashi G. Takaoka | e776821 | 2017-01-10 15:47:19 +0900 | [diff] [blame] | 63 | import com.android.settings.inputmethod.AvailableVirtualKeyboardFragment; |
Fabrice Di Meglio | 51bfee5 | 2014-03-20 19:52:29 -0700 | [diff] [blame] | 64 | import com.android.settings.inputmethod.InputMethodAndLanguageSettings; |
Tadashi G. Takaoka | 7bbc632 | 2017-01-10 15:02:22 +0900 | [diff] [blame] | 65 | import com.android.settings.inputmethod.PhysicalKeyboardFragment; |
Tadashi G. Takaoka | e776821 | 2017-01-10 15:47:19 +0900 | [diff] [blame] | 66 | import com.android.settings.inputmethod.VirtualKeyboardFragment; |
Doris Ling | 34cfd2e | 2017-02-03 16:16:42 -0800 | [diff] [blame] | 67 | import com.android.settings.language.LanguageAndInputSettings; |
Fabrice Di Meglio | 51bfee5 | 2014-03-20 19:52:29 -0700 | [diff] [blame] | 68 | import com.android.settings.location.LocationSettings; |
Lifu Tang | ff6d489 | 2015-03-26 17:56:52 -0700 | [diff] [blame] | 69 | import com.android.settings.location.ScanningSettings; |
Fan Zhang | 6e88635 | 2016-12-05 14:42:49 -0800 | [diff] [blame] | 70 | import com.android.settings.network.NetworkDashboardFragment; |
Ruchi Kandoi | 4302dfa | 2017-01-03 14:02:23 -0800 | [diff] [blame] | 71 | import com.android.settings.nfc.PaymentSettings; |
Julia Reynolds | 8c0a423 | 2015-11-24 10:08:14 -0500 | [diff] [blame] | 72 | import com.android.settings.notification.ConfigureNotificationSettings; |
John Spurlock | 4e4cdef | 2014-05-28 09:43:45 -0400 | [diff] [blame] | 73 | import com.android.settings.notification.OtherSoundSettings; |
Julia Reynolds | 8c0a423 | 2015-11-24 10:08:14 -0500 | [diff] [blame] | 74 | import com.android.settings.notification.SoundSettings; |
John Spurlock | 48bbd5d | 2015-04-03 13:51:03 -0400 | [diff] [blame] | 75 | import com.android.settings.notification.ZenModePrioritySettings; |
John Spurlock | 4a35051 | 2014-04-08 14:08:21 -0400 | [diff] [blame] | 76 | import com.android.settings.notification.ZenModeSettings; |
Julia Reynolds | 5555d26 | 2015-11-09 10:52:17 -0500 | [diff] [blame] | 77 | import com.android.settings.notification.ZenModeVisualInterruptionSettings; |
Fabrice Di Meglio | 51bfee5 | 2014-03-20 19:52:29 -0700 | [diff] [blame] | 78 | import com.android.settings.print.PrintSettingsFragment; |
PauloftheWest | 3815561 | 2014-06-30 10:02:36 -0700 | [diff] [blame] | 79 | import com.android.settings.sim.SimSettings; |
Fan Zhang | c6540cf | 2016-10-03 17:11:11 -0700 | [diff] [blame] | 80 | import com.android.settings.system.SystemDashboardFragment; |
Niels Egberts | e5017dc | 2016-12-12 13:29:41 +0000 | [diff] [blame] | 81 | import com.android.settings.tts.TtsEnginePreferenceFragment; |
| 82 | import com.android.settings.tts.TtsSlidersFragment; |
Fabrice Di Meglio | 51bfee5 | 2014-03-20 19:52:29 -0700 | [diff] [blame] | 83 | import com.android.settings.users.UserSettings; |
Amin Shaikh | 3aa547b | 2017-01-06 18:31:41 -0800 | [diff] [blame] | 84 | import com.android.settings.wifi.ConfigureWifiSettings; |
PauloftheWest | 7837b99 | 2014-06-24 07:42:27 -0700 | [diff] [blame] | 85 | import com.android.settings.wifi.SavedAccessPointsWifiSettings; |
Fabrice Di Meglio | 51bfee5 | 2014-03-20 19:52:29 -0700 | [diff] [blame] | 86 | import com.android.settings.wifi.WifiSettings; |
| 87 | |
| 88 | import java.util.Collection; |
| 89 | import java.util.HashMap; |
Fabrice Di Meglio | 51bfee5 | 2014-03-20 19:52:29 -0700 | [diff] [blame] | 90 | |
| 91 | public final class SearchIndexableResources { |
| 92 | |
Tadashi G. Takaoka | b51f6bf | 2016-11-22 23:53:36 +0900 | [diff] [blame] | 93 | @XmlRes |
| 94 | public static final int NO_DATA_RES_ID = 0; |
Fabrice Di Meglio | 51bfee5 | 2014-03-20 19:52:29 -0700 | [diff] [blame] | 95 | |
Matthew Fritze | 2108f91 | 2017-01-24 10:45:11 -0800 | [diff] [blame] | 96 | @VisibleForTesting(otherwise = VisibleForTesting.PRIVATE) |
| 97 | static final HashMap<String, SearchIndexableResource> sResMap = new HashMap<>(); |
Tadashi G. Takaoka | b51f6bf | 2016-11-22 23:53:36 +0900 | [diff] [blame] | 98 | |
| 99 | @VisibleForTesting |
| 100 | static void addIndex(Class<?> indexClass, @XmlRes int xmlResId, |
| 101 | @DrawableRes int iconResId) { |
| 102 | String className = indexClass.getName(); |
| 103 | int rank = Ranking.getRankForClassName(className); |
| 104 | sResMap.put(className, new SearchIndexableResource(rank, xmlResId, className, iconResId)); |
| 105 | } |
Fabrice Di Meglio | 51bfee5 | 2014-03-20 19:52:29 -0700 | [diff] [blame] | 106 | |
Fabrice Di Meglio | 51bfee5 | 2014-03-20 19:52:29 -0700 | [diff] [blame] | 107 | static { |
Tadashi G. Takaoka | b51f6bf | 2016-11-22 23:53:36 +0900 | [diff] [blame] | 108 | addIndex(WifiSettings.class, NO_DATA_RES_ID, R.drawable.ic_settings_wireless); |
Fan Zhang | 6e88635 | 2016-12-05 14:42:49 -0800 | [diff] [blame] | 109 | addIndex(NetworkDashboardFragment.class, NO_DATA_RES_ID, R.drawable.ic_settings_wireless); |
Amin Shaikh | 3aa547b | 2017-01-06 18:31:41 -0800 | [diff] [blame] | 110 | addIndex(ConfigureWifiSettings.class, NO_DATA_RES_ID, R.drawable.ic_settings_wireless); |
| 111 | addIndex(SavedAccessPointsWifiSettings.class, NO_DATA_RES_ID, |
| 112 | R.drawable.ic_settings_wireless); |
Tadashi G. Takaoka | b51f6bf | 2016-11-22 23:53:36 +0900 | [diff] [blame] | 113 | addIndex(BluetoothSettings.class, NO_DATA_RES_ID, R.drawable.ic_settings_bluetooth); |
| 114 | addIndex(SimSettings.class, NO_DATA_RES_ID, R.drawable.ic_sim_sd); |
| 115 | addIndex(DataUsageSummary.class, NO_DATA_RES_ID, R.drawable.ic_settings_data_usage); |
| 116 | addIndex(DataUsageMeteredSettings.class, NO_DATA_RES_ID, R.drawable.ic_settings_data_usage); |
| 117 | addIndex(WirelessSettings.class, NO_DATA_RES_ID, R.drawable.ic_settings_more); |
| 118 | addIndex(ScreenZoomSettings.class, NO_DATA_RES_ID, R.drawable.ic_settings_display); |
| 119 | addIndex(DisplaySettings.class, NO_DATA_RES_ID, R.drawable.ic_settings_display); |
| 120 | addIndex(WallpaperTypeSettings.class, NO_DATA_RES_ID, R.drawable.ic_settings_display); |
| 121 | addIndex(ConfigureNotificationSettings.class, |
Fan Zhang | 762b496 | 2016-11-30 15:56:17 -0800 | [diff] [blame] | 122 | R.xml.configure_notification_settings, R.drawable.ic_settings_notifications); |
Fan Zhang | 6e88635 | 2016-12-05 14:42:49 -0800 | [diff] [blame] | 123 | addIndex(AppAndNotificationDashboardFragment.class, NO_DATA_RES_ID, |
| 124 | R.drawable.ic_settings_applications); |
Tadashi G. Takaoka | b51f6bf | 2016-11-22 23:53:36 +0900 | [diff] [blame] | 125 | addIndex(SoundSettings.class, NO_DATA_RES_ID, R.drawable.ic_settings_sound); |
| 126 | addIndex(OtherSoundSettings.class, NO_DATA_RES_ID, R.drawable.ic_settings_sound); |
| 127 | addIndex(ZenModeSettings.class, |
Fan Zhang | 762b496 | 2016-11-30 15:56:17 -0800 | [diff] [blame] | 128 | R.xml.zen_mode_settings, R.drawable.ic_settings_notifications); |
Tadashi G. Takaoka | b51f6bf | 2016-11-22 23:53:36 +0900 | [diff] [blame] | 129 | addIndex(ZenModePrioritySettings.class, |
Fan Zhang | 762b496 | 2016-11-30 15:56:17 -0800 | [diff] [blame] | 130 | R.xml.zen_mode_priority_settings, R.drawable.ic_settings_notifications); |
Tadashi G. Takaoka | b51f6bf | 2016-11-22 23:53:36 +0900 | [diff] [blame] | 131 | addIndex(StorageSettings.class, NO_DATA_RES_ID, R.drawable.ic_settings_storage); |
| 132 | addIndex(PowerUsageSummary.class, |
Fan Zhang | 762b496 | 2016-11-30 15:56:17 -0800 | [diff] [blame] | 133 | R.xml.power_usage_summary, R.drawable.ic_settings_battery); |
jackqdyulei | 722fc81 | 2017-01-18 11:23:57 -0800 | [diff] [blame] | 134 | addIndex(PowerUsageDetail.class, NO_DATA_RES_ID, R.drawable.ic_settings_battery); |
jackqdyulei | a224b01 | 2017-01-27 16:11:13 -0800 | [diff] [blame] | 135 | addIndex(PowerUsageAdvanced.class, NO_DATA_RES_ID, R.drawable.ic_settings_battery); |
Tadashi G. Takaoka | b51f6bf | 2016-11-22 23:53:36 +0900 | [diff] [blame] | 136 | addIndex(BatterySaverSettings.class, |
Fan Zhang | 762b496 | 2016-11-30 15:56:17 -0800 | [diff] [blame] | 137 | R.xml.battery_saver_settings, R.drawable.ic_settings_battery); |
Tadashi G. Takaoka | b51f6bf | 2016-11-22 23:53:36 +0900 | [diff] [blame] | 138 | addIndex(AdvancedAppSettings.class, NO_DATA_RES_ID, R.drawable.ic_settings_applications); |
Fan Zhang | dfce62c | 2017-02-16 15:00:53 -0800 | [diff] [blame] | 139 | addIndex(ManageAssist.class, NO_DATA_RES_ID, R.drawable.ic_settings_applications); |
Tadashi G. Takaoka | b51f6bf | 2016-11-22 23:53:36 +0900 | [diff] [blame] | 140 | addIndex(SpecialAccessSettings.class, |
Fan Zhang | 762b496 | 2016-11-30 15:56:17 -0800 | [diff] [blame] | 141 | R.xml.special_access, R.drawable.ic_settings_applications); |
Tadashi G. Takaoka | b51f6bf | 2016-11-22 23:53:36 +0900 | [diff] [blame] | 142 | addIndex(UserSettings.class, NO_DATA_RES_ID, R.drawable.ic_settings_multiuser); |
| 143 | addIndex(GestureSettings.class, NO_DATA_RES_ID, R.drawable.ic_settings_gestures); |
Philip Quinn | a9831d4 | 2017-02-13 20:07:09 -0800 | [diff] [blame] | 144 | addIndex(AssistGestureSettings.class, NO_DATA_RES_ID, R.drawable.ic_settings_gestures); |
Fan Zhang | ee52440 | 2016-12-05 12:58:03 -0800 | [diff] [blame] | 145 | addIndex(PickupGestureSettings.class, NO_DATA_RES_ID, R.drawable.ic_settings_gestures); |
| 146 | addIndex(DoubleTapScreenSettings.class, NO_DATA_RES_ID, R.drawable.ic_settings_gestures); |
| 147 | addIndex(DoubleTapPowerSettings.class, NO_DATA_RES_ID, R.drawable.ic_settings_gestures); |
| 148 | addIndex(DoubleTwistGestureSettings.class, NO_DATA_RES_ID, R.drawable.ic_settings_gestures); |
| 149 | addIndex(SwipeToNotificationSettings.class, NO_DATA_RES_ID, |
| 150 | R.drawable.ic_settings_gestures); |
Doris Ling | 34cfd2e | 2017-02-03 16:16:42 -0800 | [diff] [blame] | 151 | addIndex(LanguageAndInputSettings.class, NO_DATA_RES_ID, R.drawable.ic_settings_language); |
Tadashi G. Takaoka | b51f6bf | 2016-11-22 23:53:36 +0900 | [diff] [blame] | 152 | addIndex(LocationSettings.class, R.xml.location_settings, R.drawable.ic_settings_location); |
| 153 | addIndex(ScanningSettings.class, R.xml.location_scanning, R.drawable.ic_settings_location); |
| 154 | addIndex(SecuritySettings.class, NO_DATA_RES_ID, R.drawable.ic_settings_security); |
Doris Ling | 8161054 | 2017-02-15 17:49:18 -0800 | [diff] [blame] | 155 | addIndex(EncryptionAndCredential.class, R.xml.encryption_and_credential, |
| 156 | R.drawable.ic_settings_security); |
Tadashi G. Takaoka | b51f6bf | 2016-11-22 23:53:36 +0900 | [diff] [blame] | 157 | addIndex(ScreenPinningSettings.class, NO_DATA_RES_ID, R.drawable.ic_settings_security); |
Fan Zhang | 6e88635 | 2016-12-05 14:42:49 -0800 | [diff] [blame] | 158 | addIndex(UserAndAccountDashboardFragment.class, NO_DATA_RES_ID, |
| 159 | R.drawable.ic_settings_accounts); |
Tadashi G. Takaoka | b51f6bf | 2016-11-22 23:53:36 +0900 | [diff] [blame] | 160 | addIndex(InputMethodAndLanguageSettings.class, |
Fan Zhang | 762b496 | 2016-11-30 15:56:17 -0800 | [diff] [blame] | 161 | NO_DATA_RES_ID, R.drawable.ic_settings_language); |
Tadashi G. Takaoka | e776821 | 2017-01-10 15:47:19 +0900 | [diff] [blame] | 162 | addIndex(VirtualKeyboardFragment.class, NO_DATA_RES_ID, R.drawable.ic_settings_language); |
| 163 | addIndex(AvailableVirtualKeyboardFragment.class, |
| 164 | NO_DATA_RES_ID, R.drawable.ic_settings_language); |
Tadashi G. Takaoka | 7bbc632 | 2017-01-10 15:02:22 +0900 | [diff] [blame] | 165 | addIndex(PhysicalKeyboardFragment.class, NO_DATA_RES_ID, R.drawable.ic_settings_language); |
Anton Philippov | 9a5220e | 2017-03-01 21:08:56 +0000 | [diff] [blame^] | 166 | addIndex(BackupSettingsActivity.class, NO_DATA_RES_ID, R.drawable.ic_settings_backup); |
Anton Philippov | adfec55 | 2017-01-25 20:37:36 +0000 | [diff] [blame] | 167 | addIndex(BackupSettingsFragment.class, NO_DATA_RES_ID, R.drawable.ic_settings_backup); |
Tadashi G. Takaoka | b51f6bf | 2016-11-22 23:53:36 +0900 | [diff] [blame] | 168 | addIndex(DateTimeSettings.class, NO_DATA_RES_ID, R.drawable.ic_settings_date_time); |
| 169 | addIndex(AccessibilitySettings.class, NO_DATA_RES_ID, R.drawable.ic_settings_accessibility); |
| 170 | addIndex(PrintSettingsFragment.class, NO_DATA_RES_ID, R.drawable.ic_settings_print); |
| 171 | addIndex(DevelopmentSettings.class, NO_DATA_RES_ID, R.drawable.ic_settings_development); |
| 172 | addIndex(DeviceInfoSettings.class, NO_DATA_RES_ID, R.drawable.ic_settings_about); |
| 173 | addIndex(LegalSettings.class, NO_DATA_RES_ID, R.drawable.ic_settings_about); |
| 174 | addIndex(ZenModeVisualInterruptionSettings.class, |
Fan Zhang | 762b496 | 2016-11-30 15:56:17 -0800 | [diff] [blame] | 175 | R.xml.zen_mode_visual_interruptions_settings, |
| 176 | R.drawable.ic_settings_notifications); |
Tadashi G. Takaoka | b51f6bf | 2016-11-22 23:53:36 +0900 | [diff] [blame] | 177 | addIndex(SystemDashboardFragment.class, NO_DATA_RES_ID, R.drawable.ic_settings_about); |
| 178 | addIndex(StorageDashboardFragment.class, NO_DATA_RES_ID, R.drawable.ic_settings_storage); |
Fan Zhang | 762b496 | 2016-11-30 15:56:17 -0800 | [diff] [blame] | 179 | addIndex(ConnectedDeviceDashboardFragment.class, NO_DATA_RES_ID, R.drawable.ic_bt_laptop); |
Tadashi G. Takaoka | b51f6bf | 2016-11-22 23:53:36 +0900 | [diff] [blame] | 180 | addIndex(EnterprisePrivacySettings.class, NO_DATA_RES_ID, R.drawable.ic_settings_about); |
Ruchi Kandoi | 4302dfa | 2017-01-03 14:02:23 -0800 | [diff] [blame] | 181 | addIndex(PaymentSettings.class, NO_DATA_RES_ID, R.drawable.ic_settings_nfc_payment); |
Niels Egberts | e5017dc | 2016-12-12 13:29:41 +0000 | [diff] [blame] | 182 | addIndex( |
| 183 | TtsEnginePreferenceFragment.class, NO_DATA_RES_ID, R.drawable.ic_settings_language); |
| 184 | addIndex(TtsSlidersFragment.class, NO_DATA_RES_ID, R.drawable.ic_settings_language); |
Fabrice Di Meglio | 51bfee5 | 2014-03-20 19:52:29 -0700 | [diff] [blame] | 185 | } |
| 186 | |
| 187 | private SearchIndexableResources() { |
| 188 | } |
| 189 | |
| 190 | public static int size() { |
| 191 | return sResMap.size(); |
| 192 | } |
| 193 | |
| 194 | public static SearchIndexableResource getResourceByName(String className) { |
| 195 | return sResMap.get(className); |
| 196 | } |
| 197 | |
| 198 | public static Collection<SearchIndexableResource> values() { |
| 199 | return sResMap.values(); |
| 200 | } |
| 201 | } |