1 /* 2 * Copyright (C) 2016 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.core.gateway; 18 19 import com.android.settings.AllInOneTetherSettings; 20 import com.android.settings.DisplaySettings; 21 import com.android.settings.IccLockSettings; 22 import com.android.settings.MainClear; 23 import com.android.settings.MainClearConfirm; 24 import com.android.settings.Settings; 25 import com.android.settings.TestingSettings; 26 import com.android.settings.TetherSettings; 27 import com.android.settings.TrustedCredentialsSettings; 28 import com.android.settings.accessibility.AccessibilityDetailsSettingsFragment; 29 import com.android.settings.accessibility.AccessibilitySettings; 30 import com.android.settings.accessibility.AccessibilitySettingsForSetupWizard; 31 import com.android.settings.accessibility.CaptionPropertiesFragment; 32 import com.android.settings.accessibility.ToggleDaltonizerPreferenceFragment; 33 import com.android.settings.accessibility.ToggleReduceBrightColorsPreferenceFragment; 34 import com.android.settings.accounts.AccountDashboardFragment; 35 import com.android.settings.accounts.AccountSyncSettings; 36 import com.android.settings.accounts.ChooseAccountFragment; 37 import com.android.settings.accounts.ManagedProfileSettings; 38 import com.android.settings.applications.AppDashboardFragment; 39 import com.android.settings.applications.ProcessStatsSummary; 40 import com.android.settings.applications.ProcessStatsUi; 41 import com.android.settings.applications.UsageAccessDetails; 42 import com.android.settings.applications.appinfo.AlarmsAndRemindersDetails; 43 import com.android.settings.applications.appinfo.AppInfoDashboardFragment; 44 import com.android.settings.applications.appinfo.DrawOverlayDetails; 45 import com.android.settings.applications.appinfo.ExternalSourcesDetails; 46 import com.android.settings.applications.appinfo.ManageExternalStorageDetails; 47 import com.android.settings.applications.appinfo.MediaManagementAppsDetails; 48 import com.android.settings.applications.appinfo.WriteSettingsDetails; 49 import com.android.settings.applications.appops.BackgroundCheckSummary; 50 import com.android.settings.applications.assist.ManageAssist; 51 import com.android.settings.applications.manageapplications.ManageApplications; 52 import com.android.settings.applications.managedomainurls.ManageDomainUrls; 53 import com.android.settings.applications.specialaccess.deviceadmin.DeviceAdminSettings; 54 import com.android.settings.applications.specialaccess.interactacrossprofiles.InteractAcrossProfilesDetails; 55 import com.android.settings.applications.specialaccess.interactacrossprofiles.InteractAcrossProfilesSettings; 56 import com.android.settings.applications.specialaccess.notificationaccess.NotificationAccessDetails; 57 import com.android.settings.applications.specialaccess.pictureinpicture.PictureInPictureDetails; 58 import com.android.settings.applications.specialaccess.pictureinpicture.PictureInPictureSettings; 59 import com.android.settings.applications.specialaccess.premiumsms.PremiumSmsAccess; 60 import com.android.settings.applications.specialaccess.vrlistener.VrListenerSettings; 61 import com.android.settings.applications.specialaccess.zenaccess.ZenAccessDetails; 62 import com.android.settings.backup.PrivacySettings; 63 import com.android.settings.backup.ToggleBackupSettingFragment; 64 import com.android.settings.backup.UserBackupSettingsActivity; 65 import com.android.settings.biometrics.combination.CombinedBiometricProfileSettings; 66 import com.android.settings.biometrics.combination.CombinedBiometricSettings; 67 import com.android.settings.biometrics.face.FaceSettings; 68 import com.android.settings.biometrics.fingerprint.FingerprintSettings; 69 import com.android.settings.bluetooth.BluetoothDeviceDetailsFragment; 70 import com.android.settings.bugreporthandler.BugReportHandlerPicker; 71 import com.android.settings.connecteddevice.AdvancedConnectedDeviceDashboardFragment; 72 import com.android.settings.connecteddevice.ConnectedDeviceDashboardFragment; 73 import com.android.settings.connecteddevice.PreviouslyConnectedDeviceDashboardFragment; 74 import com.android.settings.connecteddevice.usb.UsbDetailsFragment; 75 import com.android.settings.datausage.DataSaverSummary; 76 import com.android.settings.datausage.DataUsageList; 77 import com.android.settings.datausage.DataUsageSummary; 78 import com.android.settings.datetime.DateTimeSettings; 79 import com.android.settings.deletionhelper.AutomaticStorageManagerSettings; 80 import com.android.settings.development.DevelopmentSettingsDashboardFragment; 81 import com.android.settings.deviceinfo.PrivateVolumeForget; 82 import com.android.settings.deviceinfo.PublicVolumeSettings; 83 import com.android.settings.deviceinfo.StorageDashboardFragment; 84 import com.android.settings.deviceinfo.aboutphone.MyDeviceInfoFragment; 85 import com.android.settings.deviceinfo.firmwareversion.FirmwareVersionSettings; 86 import com.android.settings.deviceinfo.legal.ModuleLicensesDashboard; 87 import com.android.settings.display.NightDisplaySettings; 88 import com.android.settings.display.SmartAutoRotatePreferenceFragment; 89 import com.android.settings.display.darkmode.DarkModeSettingsFragment; 90 import com.android.settings.dream.DreamSettings; 91 import com.android.settings.enterprise.EnterprisePrivacySettings; 92 import com.android.settings.fuelgauge.AdvancedPowerUsageDetail; 93 import com.android.settings.fuelgauge.PowerUsageSummary; 94 import com.android.settings.fuelgauge.batterysaver.BatterySaverScheduleSettings; 95 import com.android.settings.fuelgauge.batterysaver.BatterySaverSettings; 96 import com.android.settings.gestures.AssistGestureSettings; 97 import com.android.settings.gestures.DoubleTapPowerSettings; 98 import com.android.settings.gestures.DoubleTapScreenSettings; 99 import com.android.settings.gestures.DoubleTwistGestureSettings; 100 import com.android.settings.gestures.GestureNavigationSettingsFragment; 101 import com.android.settings.gestures.PickupGestureSettings; 102 import com.android.settings.gestures.PowerMenuSettings; 103 import com.android.settings.gestures.SwipeToNotificationSettings; 104 import com.android.settings.gestures.SystemNavigationGestureSettings; 105 import com.android.settings.inputmethod.AvailableVirtualKeyboardFragment; 106 import com.android.settings.inputmethod.KeyboardLayoutPickerFragment; 107 import com.android.settings.inputmethod.PhysicalKeyboardFragment; 108 import com.android.settings.inputmethod.SpellCheckersSettings; 109 import com.android.settings.inputmethod.UserDictionaryList; 110 import com.android.settings.inputmethod.UserDictionarySettings; 111 import com.android.settings.language.LanguageAndInputSettings; 112 import com.android.settings.localepicker.LocaleListEditor; 113 import com.android.settings.location.LocationServices; 114 import com.android.settings.location.LocationSettings; 115 import com.android.settings.network.MobileNetworkListFragment; 116 import com.android.settings.network.NetworkDashboardFragment; 117 import com.android.settings.network.NetworkProviderSettings; 118 import com.android.settings.network.apn.ApnEditor; 119 import com.android.settings.network.apn.ApnSettings; 120 import com.android.settings.nfc.AndroidBeam; 121 import com.android.settings.nfc.PaymentSettings; 122 import com.android.settings.notification.ConfigureNotificationSettings; 123 import com.android.settings.notification.NotificationAccessSettings; 124 import com.android.settings.notification.NotificationAssistantPicker; 125 import com.android.settings.notification.SoundSettings; 126 import com.android.settings.notification.app.AppBubbleNotificationSettings; 127 import com.android.settings.notification.app.AppNotificationSettings; 128 import com.android.settings.notification.app.ChannelNotificationSettings; 129 import com.android.settings.notification.app.ConversationListSettings; 130 import com.android.settings.notification.history.NotificationStation; 131 import com.android.settings.notification.zen.ZenAccessSettings; 132 import com.android.settings.notification.zen.ZenModeAutomationSettings; 133 import com.android.settings.notification.zen.ZenModeBlockedEffectsSettings; 134 import com.android.settings.notification.zen.ZenModeEventRuleSettings; 135 import com.android.settings.notification.zen.ZenModeScheduleRuleSettings; 136 import com.android.settings.notification.zen.ZenModeSettings; 137 import com.android.settings.password.ChooseLockPassword; 138 import com.android.settings.password.ChooseLockPattern; 139 import com.android.settings.print.PrintJobSettingsFragment; 140 import com.android.settings.print.PrintSettingsFragment; 141 import com.android.settings.privacy.PrivacyDashboardFragment; 142 import com.android.settings.security.CryptKeeperSettings; 143 import com.android.settings.security.LockscreenDashboardFragment; 144 import com.android.settings.security.SecuritySettings; 145 import com.android.settings.shortcut.CreateShortcut; 146 import com.android.settings.sound.MediaControlsSettings; 147 import com.android.settings.support.SupportDashboardActivity; 148 import com.android.settings.system.ResetDashboardFragment; 149 import com.android.settings.system.SystemDashboardFragment; 150 import com.android.settings.tts.TextToSpeechSettings; 151 import com.android.settings.users.UserSettings; 152 import com.android.settings.vpn2.VpnSettings; 153 import com.android.settings.wallpaper.WallpaperTypeSettings; 154 import com.android.settings.webview.WebViewAppPicker; 155 import com.android.settings.wfd.WifiDisplaySettings; 156 import com.android.settings.wifi.ConfigureWifiSettings; 157 import com.android.settings.wifi.WifiAPITest; 158 import com.android.settings.wifi.WifiInfo; 159 import com.android.settings.wifi.WifiSettings; 160 import com.android.settings.wifi.calling.WifiCallingDisclaimerFragment; 161 import com.android.settings.wifi.calling.WifiCallingSettings; 162 import com.android.settings.wifi.p2p.WifiP2pSettings; 163 import com.android.settings.wifi.savedaccesspoints2.SavedAccessPointsWifiSettings2; 164 import com.android.settings.wifi.tether.WifiTetherSettings; 165 166 public class SettingsGateway { 167 168 /** 169 * A list of fragment that can be hosted by SettingsActivity. SettingsActivity will throw a 170 * security exception if the fragment it needs to display is not in this list. 171 */ 172 public static final String[] ENTRY_FRAGMENTS = { 173 AdvancedConnectedDeviceDashboardFragment.class.getName(), 174 CreateShortcut.class.getName(), 175 WifiSettings.class.getName(), 176 ConfigureWifiSettings.class.getName(), 177 SavedAccessPointsWifiSettings2.class.getName(), 178 AllInOneTetherSettings.class.getName(), 179 TetherSettings.class.getName(), 180 SmartAutoRotatePreferenceFragment.class.getName(), 181 WifiP2pSettings.class.getName(), 182 WifiTetherSettings.class.getName(), 183 BackgroundCheckSummary.class.getName(), 184 VpnSettings.class.getName(), 185 DataSaverSummary.class.getName(), 186 DateTimeSettings.class.getName(), 187 LocaleListEditor.class.getName(), 188 AvailableVirtualKeyboardFragment.class.getName(), 189 LanguageAndInputSettings.class.getName(), 190 SpellCheckersSettings.class.getName(), 191 UserDictionaryList.class.getName(), 192 UserDictionarySettings.class.getName(), 193 DisplaySettings.class.getName(), 194 MyDeviceInfoFragment.class.getName(), 195 ModuleLicensesDashboard.class.getName(), 196 ManageApplications.class.getName(), 197 FirmwareVersionSettings.class.getName(), 198 ManageAssist.class.getName(), 199 ProcessStatsUi.class.getName(), 200 NotificationStation.class.getName(), 201 LocationSettings.class.getName(), 202 PrivacyDashboardFragment.class.getName(), 203 LocationServices.class.getName(), 204 SecuritySettings.class.getName(), 205 UsageAccessDetails.class.getName(), 206 PrivacySettings.class.getName(), 207 DeviceAdminSettings.class.getName(), 208 AccessibilityDetailsSettingsFragment.class.getName(), 209 AccessibilitySettings.class.getName(), 210 AccessibilitySettingsForSetupWizard.class.getName(), 211 CaptionPropertiesFragment.class.getName(), 212 ToggleDaltonizerPreferenceFragment.class.getName(), 213 ToggleReduceBrightColorsPreferenceFragment.class.getName(), 214 TextToSpeechSettings.class.getName(), 215 PrivateVolumeForget.class.getName(), 216 PublicVolumeSettings.class.getName(), 217 DevelopmentSettingsDashboardFragment.class.getName(), 218 AndroidBeam.class.getName(), 219 WifiDisplaySettings.class.getName(), 220 PowerUsageSummary.class.getName(), 221 AccountSyncSettings.class.getName(), 222 AssistGestureSettings.class.getName(), 223 FaceSettings.class.getName(), 224 FingerprintSettings.FingerprintSettingsFragment.class.getName(), 225 CombinedBiometricSettings.class.getName(), 226 CombinedBiometricProfileSettings.class.getName(), 227 SwipeToNotificationSettings.class.getName(), 228 DoubleTapPowerSettings.class.getName(), 229 DoubleTapScreenSettings.class.getName(), 230 PickupGestureSettings.class.getName(), 231 DoubleTwistGestureSettings.class.getName(), 232 SystemNavigationGestureSettings.class.getName(), 233 CryptKeeperSettings.class.getName(), 234 DataUsageSummary.class.getName(), 235 DreamSettings.class.getName(), 236 UserSettings.class.getName(), 237 NotificationAccessSettings.class.getName(), 238 NotificationAccessDetails.class.getName(), 239 AppBubbleNotificationSettings.class.getName(), 240 ZenAccessSettings.class.getName(), 241 ZenAccessDetails.class.getName(), 242 ZenModeAutomationSettings.class.getName(), 243 PrintSettingsFragment.class.getName(), 244 PrintJobSettingsFragment.class.getName(), 245 TrustedCredentialsSettings.class.getName(), 246 PaymentSettings.class.getName(), 247 KeyboardLayoutPickerFragment.class.getName(), 248 PhysicalKeyboardFragment.class.getName(), 249 ZenModeSettings.class.getName(), 250 SoundSettings.class.getName(), 251 ConversationListSettings.class.getName(), 252 ConfigureNotificationSettings.class.getName(), 253 ChooseLockPassword.ChooseLockPasswordFragment.class.getName(), 254 ChooseLockPattern.ChooseLockPatternFragment.class.getName(), 255 AppInfoDashboardFragment.class.getName(), 256 BatterySaverSettings.class.getName(), 257 AppNotificationSettings.class.getName(), 258 NotificationAssistantPicker.class.getName(), 259 ChannelNotificationSettings.class.getName(), 260 ApnSettings.class.getName(), 261 ApnEditor.class.getName(), 262 WifiCallingSettings.class.getName(), 263 ZenModeScheduleRuleSettings.class.getName(), 264 ZenModeEventRuleSettings.class.getName(), 265 ZenModeBlockedEffectsSettings.class.getName(), 266 ProcessStatsUi.class.getName(), 267 AdvancedPowerUsageDetail.class.getName(), 268 ProcessStatsSummary.class.getName(), 269 DrawOverlayDetails.class.getName(), 270 WriteSettingsDetails.class.getName(), 271 ExternalSourcesDetails.class.getName(), 272 ManageExternalStorageDetails.class.getName(), 273 WallpaperTypeSettings.class.getName(), 274 VrListenerSettings.class.getName(), 275 PictureInPictureSettings.class.getName(), 276 PictureInPictureDetails.class.getName(), 277 PremiumSmsAccess.class.getName(), 278 ManagedProfileSettings.class.getName(), 279 ChooseAccountFragment.class.getName(), 280 IccLockSettings.class.getName(), 281 TestingSettings.class.getName(), 282 WifiAPITest.class.getName(), 283 WifiInfo.class.getName(), 284 MainClear.class.getName(), 285 MainClearConfirm.class.getName(), 286 ResetDashboardFragment.class.getName(), 287 NightDisplaySettings.class.getName(), 288 ManageDomainUrls.class.getName(), 289 AutomaticStorageManagerSettings.class.getName(), 290 StorageDashboardFragment.class.getName(), 291 SystemDashboardFragment.class.getName(), 292 NetworkDashboardFragment.class.getName(), 293 ConnectedDeviceDashboardFragment.class.getName(), 294 UsbDetailsFragment.class.getName(), 295 AppDashboardFragment.class.getName(), 296 WifiCallingDisclaimerFragment.class.getName(), 297 AccountDashboardFragment.class.getName(), 298 EnterprisePrivacySettings.class.getName(), 299 WebViewAppPicker.class.getName(), 300 LockscreenDashboardFragment.class.getName(), 301 BluetoothDeviceDetailsFragment.class.getName(), 302 DataUsageList.class.getName(), 303 ToggleBackupSettingFragment.class.getName(), 304 PreviouslyConnectedDeviceDashboardFragment.class.getName(), 305 BatterySaverScheduleSettings.class.getName(), 306 MobileNetworkListFragment.class.getName(), 307 PowerMenuSettings.class.getName(), 308 DarkModeSettingsFragment.class.getName(), 309 BugReportHandlerPicker.class.getName(), 310 GestureNavigationSettingsFragment.class.getName(), 311 InteractAcrossProfilesSettings.class.getName(), 312 InteractAcrossProfilesDetails.class.getName(), 313 MediaControlsSettings.class.getName(), 314 NetworkProviderSettings.class.getName(), 315 AlarmsAndRemindersDetails.class.getName(), 316 MediaManagementAppsDetails.class.getName() 317 }; 318 319 public static final String[] SETTINGS_FOR_RESTRICTED = { 320 // Home page 321 Settings.NetworkDashboardActivity.class.getName(), 322 Settings.ConnectedDeviceDashboardActivity.class.getName(), 323 Settings.AppDashboardActivity.class.getName(), 324 Settings.DisplaySettingsActivity.class.getName(), 325 Settings.SoundSettingsActivity.class.getName(), 326 Settings.StorageDashboardActivity.class.getName(), 327 Settings.PowerUsageSummaryActivity.class.getName(), 328 Settings.AccountDashboardActivity.class.getName(), 329 Settings.PrivacySettingsActivity.class.getName(), 330 Settings.SecurityDashboardActivity.class.getName(), 331 Settings.AccessibilitySettingsActivity.class.getName(), 332 Settings.SystemDashboardActivity.class.getName(), 333 SupportDashboardActivity.class.getName(), 334 // Home page > Network & Internet 335 Settings.WifiSettingsActivity.class.getName(), 336 Settings.DataUsageSummaryActivity.class.getName(), 337 Settings.NetworkProviderSettingsActivity.class.getName(), 338 // Home page > Connected devices 339 Settings.BluetoothSettingsActivity.class.getName(), 340 Settings.WifiDisplaySettingsActivity.class.getName(), 341 Settings.PrintSettingsActivity.class.getName(), 342 // Home page > Apps & Notifications 343 Settings.UserSettingsActivity.class.getName(), 344 Settings.ConfigureNotificationSettingsActivity.class.getName(), 345 Settings.ManageApplicationsActivity.class.getName(), 346 Settings.PaymentSettingsActivity.class.getName(), 347 // Home page > Security & screen lock 348 Settings.LocationSettingsActivity.class.getName(), 349 // Home page > System 350 Settings.LanguageAndInputSettingsActivity.class.getName(), 351 Settings.DateTimeSettingsActivity.class.getName(), 352 Settings.EnterprisePrivacySettingsActivity.class.getName(), 353 Settings.MyDeviceInfoActivity.class.getName(), 354 Settings.ModuleLicensesActivity.class.getName(), 355 UserBackupSettingsActivity.class.getName(), 356 }; 357 } 358