1 /* 2 * Copyright (C) 2008 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; 18 19 import static android.provider.Settings.ACTION_PRIVACY_SETTINGS; 20 21 import android.content.ActivityNotFoundException; 22 import android.content.Intent; 23 import android.os.Bundle; 24 import android.telephony.ims.ImsRcsManager; 25 import android.text.TextUtils; 26 import android.util.Log; 27 28 import com.android.internal.annotations.VisibleForTesting; 29 import com.android.settings.biometrics.face.FaceSettings; 30 import com.android.settings.communal.CommunalPreferenceController; 31 import com.android.settings.enterprise.EnterprisePrivacySettings; 32 import com.android.settings.network.MobileNetworkIntentConverter; 33 import com.android.settings.overlay.FeatureFactory; 34 import com.android.settings.safetycenter.SafetyCenterManagerWrapper; 35 import com.android.settings.security.SecuritySettingsFeatureProvider; 36 37 import com.google.android.setupdesign.util.ThemeHelper; 38 39 /** 40 * Top-level Settings activity 41 */ 42 public class Settings extends SettingsActivity { 43 44 /* 45 * Settings subclasses for launching independently. 46 */ 47 48 public static class MemtagPageActivity extends SettingsActivity { /* empty */} 49 public static class BluetoothSettingsActivity extends SettingsActivity { /* empty */ } 50 public static class BluetoothDashboardActivity extends SettingsActivity { /* empty */ } 51 public static class CreateShortcutActivity extends SettingsActivity { /* empty */ } 52 public static class FaceSettingsActivity extends SettingsActivity { /* empty */ } 53 /** Container for {@link FaceSettings} to use with a pre-defined task affinity. */ 54 public static class FaceSettingsInternalActivity extends SettingsActivity { /* empty */ } 55 public static class FingerprintSettingsActivity extends SettingsActivity { /* empty */ } 56 public static class FingerprintSettingsActivityV2 extends SettingsActivity { /* empty */ } 57 public static class CombinedBiometricSettingsActivity extends SettingsActivity { /* empty */ } 58 public static class CombinedBiometricProfileSettingsActivity extends SettingsActivity { /* empty */ } 59 public static class TetherSettingsActivity extends SettingsActivity { /* empty */ } 60 public static class WifiTetherSettingsActivity extends SettingsActivity { /* empty */ } 61 public static class PrivateSpaceBiometricSettingsActivity extends SettingsActivity { 62 /* empty */ 63 } 64 public static class VpnSettingsActivity extends SettingsActivity { /* empty */ } 65 /** Activity for Data saver settings. */ 66 public static class DataSaverSummaryActivity extends SettingsActivity { /* empty */ } 67 public static class DateTimeSettingsActivity extends SettingsActivity { /* empty */ } 68 public static class PrivateVolumeForgetActivity extends SettingsActivity { /* empty */ } 69 public static class PublicVolumeSettingsActivity extends SettingsActivity { /* empty */ } 70 public static class WifiSettingsActivity extends SettingsActivity { /* empty */ } 71 public static class NetworkProviderSettingsActivity extends SettingsActivity { /* empty */ } 72 public static class NetworkSelectActivity extends SettingsActivity { /* empty */ } 73 /** Activity for the Wi-Fi network details settings. */ 74 public static class WifiDetailsSettingsActivity extends SettingsActivity { /* empty */ } 75 public static class WifiP2pSettingsActivity extends SettingsActivity { /* empty */ } 76 public static class AvailableVirtualKeyboardActivity extends SettingsActivity { /* empty */ } 77 public static class KeyboardLayoutPickerActivity extends SettingsActivity { /* empty */ } 78 public static class PhysicalKeyboardActivity extends SettingsActivity { /* empty */ } 79 public static class InputMethodAndSubtypeEnablerActivity extends SettingsActivity { /* empty */ } 80 public static class SpellCheckersSettingsActivity extends SettingsActivity { /* empty */ } 81 public static class LocalePickerActivity extends SettingsActivity { /* empty */ } 82 public static class LanguageAndInputSettingsActivity extends SettingsActivity { /* empty */ } 83 public static class LanguageSettingsActivity extends SettingsActivity { /* empty */ } 84 /** Activity for the regional preferences settings. */ 85 public static class RegionalPreferencesActivity extends SettingsActivity { /* empty */ } 86 public static class KeyboardSettingsActivity extends SettingsActivity { /* empty */ } 87 /** Activity for the navigation mode settings. */ 88 public static class NavigationModeSettingsActivity extends SettingsActivity { /* empty */ } 89 public static class UserDictionarySettingsActivity extends SettingsActivity { /* empty */ } 90 public static class DarkThemeSettingsActivity extends SettingsActivity { /* empty */ } 91 public static class DisplaySettingsActivity extends SettingsActivity { /* empty */ } 92 public static class NightDisplaySettingsActivity extends SettingsActivity { /* empty */ } 93 public static class NightDisplaySuggestionActivity extends NightDisplaySettingsActivity { /* empty */ } 94 public static class SmartAutoRotateSettingsActivity extends SettingsActivity { /* empty */ } 95 public static class MyDeviceInfoActivity extends SettingsActivity { /* empty */ } 96 public static class ModuleLicensesActivity extends SettingsActivity { /* empty */ } 97 public static class ApplicationSettingsActivity extends SettingsActivity { /* empty */ } 98 public static class ManageApplicationsActivity extends SettingsActivity { /* empty */ } 99 public static class ManageAssistActivity extends SettingsActivity { /* empty */ } 100 public static class HighPowerApplicationsActivity extends SettingsActivity { /* empty */ } 101 public static class BackgroundCheckSummaryActivity extends SettingsActivity { /* empty */ } 102 public static class StorageUseActivity extends SettingsActivity { /* empty */ } 103 public static class DevelopmentSettingsActivity extends SettingsActivity { /* empty */ } 104 public static class AccessibilitySettingsActivity extends SettingsActivity { /* empty */ } 105 public static class AccessibilityDetailsSettingsActivity extends SettingsActivity { /* empty */ } 106 public static class AccessibilityEditShortcutsActivity extends SettingsActivity { /* empty */ } 107 public static class CaptioningSettingsActivity extends SettingsActivity { /* empty */ } 108 public static class AccessibilityInversionSettingsActivity extends SettingsActivity { /* empty */ } 109 public static class AccessibilityContrastSettingsActivity extends SettingsActivity { /* empty */ } 110 public static class AccessibilityDaltonizerSettingsActivity extends SettingsActivity { /* empty */ } 111 /** Activity for lockscreen settings. */ 112 public static class LockScreenSettingsActivity extends SettingsActivity { /* empty */ } 113 /** Activity for bluetooth pairing settings. */ 114 public static class BlueToothPairingActivity extends SettingsActivity { /* empty */ } 115 /** Activity for Reduce Bright Colors. */ 116 public static class ReduceBrightColorsSettingsActivity extends SettingsActivity { /* empty */ } 117 /** Activity for text reading settings. */ 118 public static class TextReadingSettingsActivity extends SettingsActivity { /* empty */ } 119 /** Activity for text color and motion settings. */ 120 public static class ColorAndMotionActivity extends SettingsActivity { /* empty */ } 121 /** Activity for color contrast settings. */ 122 public static class ColorContrastActivity extends SettingsActivity { /* empty */ } 123 /** Activity for the security dashboard. */ 124 public static class SecurityDashboardActivity extends SettingsActivity { 125 126 private static final String TAG = "SecurityDashboardActivity"; 127 128 @Override onCreate(Bundle savedState)129 protected void onCreate(Bundle savedState) { 130 super.onCreate(savedState); 131 handleSafetyCenterRedirection(); 132 } 133 134 /** Redirects to SafetyCenter if enabled. */ 135 @VisibleForTesting handleSafetyCenterRedirection()136 public void handleSafetyCenterRedirection() { 137 if (isFinishing()) { 138 // Don't trampoline if already exiting this activity. 139 return; 140 } 141 142 if (SafetyCenterManagerWrapper.get().isEnabled(this)) { 143 try { 144 startActivity(new Intent(Intent.ACTION_SAFETY_CENTER) 145 .setPackage(getPackageManager().getPermissionControllerPackageName())); 146 finish(); 147 } catch (ActivityNotFoundException e) { 148 Log.e(TAG, "Unable to open safety center", e); 149 } 150 } 151 } 152 153 /** Whether the given fragment is allowed. */ 154 @VisibleForTesting 155 @Override isValidFragment(String fragmentName)156 public boolean isValidFragment(String fragmentName) { 157 return super.isValidFragment(fragmentName) 158 || (fragmentName != null 159 && TextUtils.equals(fragmentName, getAlternativeFragmentName())); 160 } 161 162 @Override getInitialFragmentName(Intent intent)163 public String getInitialFragmentName(Intent intent) { 164 final String alternativeFragmentName = getAlternativeFragmentName(); 165 if (alternativeFragmentName != null) { 166 return alternativeFragmentName; 167 } 168 169 return super.getInitialFragmentName(intent); 170 } 171 getAlternativeFragmentName()172 private String getAlternativeFragmentName() { 173 String alternativeFragmentClassname = null; 174 final SecuritySettingsFeatureProvider securitySettingsFeatureProvider = 175 FeatureFactory.getFeatureFactory().getSecuritySettingsFeatureProvider(); 176 if (securitySettingsFeatureProvider.hasAlternativeSecuritySettingsFragment()) { 177 alternativeFragmentClassname = securitySettingsFeatureProvider 178 .getAlternativeSecuritySettingsFragmentClassname(); 179 } 180 return alternativeFragmentClassname; 181 } 182 } 183 /** Activity for the Advanced security settings. */ 184 public static class SecurityAdvancedSettings extends SettingsActivity { 185 private static final String TAG = "SecurityAdvancedActivity"; 186 @Override onCreate(Bundle savedState)187 protected void onCreate(Bundle savedState) { 188 super.onCreate(savedState); 189 handleMoreSettingsRedirection(); 190 } 191 192 /** Redirects to More Settings if Safety center is enabled. */ 193 @VisibleForTesting handleMoreSettingsRedirection()194 public void handleMoreSettingsRedirection() { 195 if (isFinishing()) { 196 // Don't trampoline if already exiting this activity. 197 return; 198 } 199 200 if (SafetyCenterManagerWrapper.get().isEnabled(this)) { 201 try { 202 startActivity( 203 new Intent("com.android.settings.MORE_SECURITY_PRIVACY_SETTINGS")); 204 finish(); 205 } catch (ActivityNotFoundException e) { 206 Log.e(TAG, "Unable to open More Settings", e); 207 } 208 } 209 } 210 } 211 /** Activity for the More settings page. */ 212 public static class MoreSecurityPrivacySettingsActivity extends SettingsActivity { /* empty */ } 213 public static class UsageAccessSettingsActivity extends SettingsActivity { /* empty */ } 214 public static class AppUsageAccessSettingsActivity extends SettingsActivity { /* empty */ } 215 public static class LocationSettingsActivity extends SettingsActivity { /* empty */ } 216 public static class ScanningSettingsActivity extends SettingsActivity { /* empty */ } 217 public static class WifiScanningSettingsActivity extends SettingsActivity { /* empty */ } 218 /** Activity for the privacy dashboard. */ 219 public static class PrivacyDashboardActivity extends SettingsActivity { 220 221 private static final String TAG = "PrivacyDashboardActivity"; 222 223 @Override onCreate(Bundle savedState)224 protected void onCreate(Bundle savedState) { 225 super.onCreate(savedState); 226 handleSafetyCenterRedirection(); 227 } 228 229 /** Redirects to SafetyCenter if enabled. */ 230 @VisibleForTesting handleSafetyCenterRedirection()231 public void handleSafetyCenterRedirection() { 232 if (isFinishing()) { 233 // Don't trampoline if already exiting this activity. 234 return; 235 } 236 237 if (ACTION_PRIVACY_SETTINGS.equals(getIntent().getAction()) 238 && SafetyCenterManagerWrapper.get().isEnabled(this)) { 239 try { 240 startActivity(new Intent(Intent.ACTION_SAFETY_CENTER) 241 .setPackage(getPackageManager().getPermissionControllerPackageName())); 242 finish(); 243 } catch (ActivityNotFoundException e) { 244 Log.e(TAG, "Unable to open safety center", e); 245 } 246 } 247 } 248 } 249 public static class PrivacyControlsActivity extends SettingsActivity { /* empty */ } 250 public static class PrivacySettingsActivity extends SettingsActivity { /* empty */ } 251 public static class FactoryResetActivity extends SettingsActivity { 252 @Override onCreate(Bundle savedState)253 protected void onCreate(Bundle savedState) { 254 setTheme(SetupWizardUtils.getTheme(this, getIntent())); 255 ThemeHelper.trySetDynamicColor(this); 256 super.onCreate(savedState); 257 } 258 259 @Override isToolbarEnabled()260 protected boolean isToolbarEnabled() { 261 return false; 262 } 263 } 264 public static class FactoryResetConfirmActivity extends SettingsActivity { 265 @Override onCreate(Bundle savedState)266 protected void onCreate(Bundle savedState) { 267 setTheme(SetupWizardUtils.getTheme(this, getIntent())); 268 ThemeHelper.trySetDynamicColor(this); 269 super.onCreate(savedState); 270 } 271 272 @Override isToolbarEnabled()273 protected boolean isToolbarEnabled() { 274 return false; 275 } 276 } 277 public static class RunningServicesActivity extends SettingsActivity { /* empty */ } 278 public static class BatterySaverSettingsActivity extends SettingsActivity { /* empty */ } 279 public static class BatterySaverScheduleSettingsActivity extends SettingsActivity { /* empty */ } 280 public static class AccountSyncSettingsActivity extends SettingsActivity { /* empty */ } 281 public static class AccountSyncSettingsInAddAccountActivity extends SettingsActivity { /* empty */ } 282 public static class DeviceAdminSettingsActivity extends SettingsActivity { /* empty */ } 283 public static class DataUsageSummaryActivity extends SettingsActivity { /* empty */ } 284 public static class MobileDataUsageListActivity extends SettingsActivity { /* empty */ } 285 public static class ConfigureWifiSettingsActivity extends SettingsActivity { /* empty */ } 286 public static class SavedAccessPointsSettingsActivity extends SettingsActivity { /* empty */ } 287 public static class TextToSpeechSettingsActivity extends SettingsActivity { /* empty */ } 288 public static class WifiDisplaySettingsActivity extends SettingsActivity { /* empty */ } 289 public static class DreamSettingsActivity extends SettingsActivity { /* empty */ } 290 /** Activity to manage communal settings */ 291 public static class CommunalSettingsActivity extends SettingsActivity { 292 @Override onCreate(Bundle savedInstanceState)293 public void onCreate(Bundle savedInstanceState) { 294 super.onCreate(savedInstanceState); 295 if (!CommunalPreferenceController.isAvailable(this)) { 296 finish(); 297 } 298 } 299 } 300 public static class NotificationStationActivity extends SettingsActivity { /* empty */ } 301 public static class UserSettingsActivity extends SettingsActivity { /* empty */ } 302 public static class NotificationAccessSettingsActivity extends SettingsActivity { /* empty */ } 303 public static class NotificationAccessDetailsActivity extends SettingsActivity { /* empty */ } 304 public static class VrListenersSettingsActivity extends SettingsActivity { /* empty */ } 305 public static class PremiumSmsAccessActivity extends SettingsActivity { /* empty */ } 306 public static class PictureInPictureSettingsActivity extends SettingsActivity { /* empty */ } 307 public static class TurnScreenOnSettingsActivity extends SettingsActivity { /* empty */ } 308 public static class AppTurnScreenOnSettingsActivity extends SettingsActivity { /* empty */ } 309 public static class AppPictureInPictureSettingsActivity extends SettingsActivity { /* empty */ } 310 public static class ZenAccessSettingsActivity extends SettingsActivity { /* empty */ } 311 public static class ZenAccessDetailSettingsActivity extends SettingsActivity {} 312 public static class ConditionProviderSettingsActivity extends SettingsActivity { /* empty */ } 313 public static class UsbSettingsActivity extends SettingsActivity { /* empty */ } 314 public static class UsbDetailsActivity extends SettingsActivity { /* empty */ } 315 public static class TrustedCredentialsSettingsActivity extends SettingsActivity { /* empty */ } 316 public static class PaymentSettingsActivity extends SettingsActivity { /* empty */ } 317 public static class PrintSettingsActivity extends SettingsActivity { /* empty */ } 318 public static class PrintJobSettingsActivity extends SettingsActivity { /* empty */ } 319 public static class ZenModeSettingsActivity extends SettingsActivity { /* empty */ } 320 public static class ZenModeBehaviorSettingsActivity extends SettingsActivity { /* empty */ } 321 public static class ZenModeBlockedEffectsSettingsActivity extends SettingsActivity { /* empty */ } 322 public static class ZenModeAutomationSettingsActivity extends SettingsActivity { /* empty */ } 323 public static class ZenModeScheduleRuleSettingsActivity extends SettingsActivity { /* empty */ } 324 public static class ZenModeEventRuleSettingsActivity extends SettingsActivity { /* empty */ } 325 public static class SoundSettingsActivity extends SettingsActivity { /* empty */ } 326 public static class ConfigureNotificationSettingsActivity extends SettingsActivity { /* empty */ } 327 public static class ConversationListSettingsActivity extends SettingsActivity { /* empty */ } 328 public static class AppBubbleNotificationSettingsActivity extends SettingsActivity { /* empty */ } 329 public static class NotificationAssistantSettingsActivity extends SettingsActivity{ /* empty */ } 330 public static class NotificationAppListActivity extends SettingsActivity { /* empty */ } 331 /** Activity to manage Cloned Apps page */ 332 public static class ClonedAppsListActivity extends SettingsActivity { /* empty */ } 333 /** Activity to manage Aspect Ratio app list page */ 334 public static class UserAspectRatioAppListActivity extends SettingsActivity { /* empty */ } 335 /** Activity to manage Aspect Ratio app page */ 336 public static class UserAspectRatioAppActivity extends SettingsActivity { /* empty */ } 337 public static class NotificationReviewPermissionsActivity extends SettingsActivity { /* empty */ } 338 public static class AppNotificationSettingsActivity extends SettingsActivity { /* empty */ } 339 public static class ChannelNotificationSettingsActivity extends SettingsActivity { /* empty */ } 340 public static class ChannelGroupNotificationSettingsActivity extends SettingsActivity { /* empty */ } 341 public static class ManageDomainUrlsActivity extends SettingsActivity { /* empty */ } 342 public static class AutomaticStorageManagerSettingsActivity extends SettingsActivity { /* empty */ } 343 public static class GamesStorageActivity extends SettingsActivity { /* empty */ } 344 public static class GestureNavigationSettingsActivity extends SettingsActivity { /* empty */ } 345 /** Activity to manage 2-/3-button navigation configuration. */ 346 public static class ButtonNavigationSettingsActivity extends SettingsActivity { /* empty */ } 347 public static class InteractAcrossProfilesSettingsActivity extends SettingsActivity { 348 /* empty */ 349 } 350 public static class AppInteractAcrossProfilesSettingsActivity extends SettingsActivity { 351 /* empty */ 352 } 353 354 public static class CellularSecuritySettingsActivity extends SettingsActivity { /* empty */ } 355 public static class SatelliteSettingActivity extends SettingsActivity { /* empty */ } 356 public static class ApnSettingsActivity extends SettingsActivity { /* empty */ } 357 public static class WifiCallingSettingsActivity extends SettingsActivity { /* empty */ } 358 public static class MemorySettingsActivity extends SettingsActivity { /* empty */ } 359 public static class AppMemoryUsageActivity extends SettingsActivity { /* empty */ } 360 public static class OverlaySettingsActivity extends SettingsActivity { /* empty */ } 361 public static class ManageExternalStorageActivity extends SettingsActivity { /* empty */ } 362 public static class AppManageExternalStorageActivity extends SettingsActivity { /* empty */ } 363 public static class MediaManagementAppsActivity extends SettingsActivity { /* empty */ } 364 public static class AppMediaManagementAppsActivity extends SettingsActivity { /* empty */ } 365 public static class WriteSettingsActivity extends SettingsActivity { /* empty */ } 366 public static class ChangeWifiStateActivity extends SettingsActivity { /* empty */ } 367 /** Activity to manage NFC Tag applications. */ 368 public static class ChangeNfcTagAppsActivity extends SettingsActivity { /* empty */ } 369 public static class AppDrawOverlaySettingsActivity extends SettingsActivity { /* empty */ } 370 public static class AppWriteSettingsActivity extends SettingsActivity { /* empty */ } 371 /** Activity to manage app battery usage details. */ 372 public static class AppBatteryUsageActivity extends SettingsActivity { /* empty */ } 373 374 public static class ManageExternalSourcesActivity extends SettingsActivity {/* empty */ } 375 public static class ManageAppExternalSourcesActivity extends SettingsActivity { /* empty */ } 376 public static class WallpaperSettingsActivity extends SettingsActivity { /* empty */ } 377 public static class ManagedProfileSettingsActivity extends SettingsActivity { /* empty */ } 378 public static class DeletionHelperActivity extends SettingsActivity { /* empty */ } 379 380 /** Actviity to manage apps with {@link android.Manifest.permission#SCHEDULE_EXACT_ALARM} */ 381 public static class AlarmsAndRemindersActivity extends SettingsActivity {/* empty */ } 382 /** App specific version of {@link AlarmsAndRemindersActivity} */ 383 public static class AlarmsAndRemindersAppActivity extends SettingsActivity {/* empty */ } 384 385 public static class ApnEditorActivity extends SettingsActivity { /* empty */ } 386 public static class ChooseAccountActivity extends SettingsActivity { /* empty */ } 387 public static class IccLockSettingsActivity extends SettingsActivity { /* empty */ } 388 public static class TestingSettingsActivity extends SettingsActivity { /* empty */ } 389 public static class WifiAPITestActivity extends SettingsActivity { /* empty */ } 390 public static class WifiInfoActivity extends SettingsActivity { /* empty */ } 391 public static class EnterprisePrivacySettingsActivity extends SettingsActivity { 392 @Override onCreate(Bundle savedInstanceState)393 public void onCreate(Bundle savedInstanceState) { 394 super.onCreate(savedInstanceState); 395 if (FeatureFactory.getFeatureFactory().getEnterprisePrivacyFeatureProvider() 396 .showParentalControls()) { 397 finish(); 398 } else if (!EnterprisePrivacySettings.isPageEnabled(this)) { 399 finish(); 400 } 401 } 402 } 403 public static class WebViewAppPickerActivity extends SettingsActivity { /* empty */ } 404 public static class AdvancedConnectedDeviceActivity extends SettingsActivity { /* empty */ } 405 public static class NfcSettingsActivity extends SettingsActivity { /* empty */ } 406 public static class BluetoothDeviceDetailActivity extends SettingsActivity { /* empty */ } 407 public static class StylusUsiDetailsActivity extends SettingsActivity { /* empty */ } 408 public static class BluetoothBroadcastActivity extends SettingsActivity { /* empty */ } 409 public static class BluetoothFindBroadcastsActivity extends SettingsActivity { /* empty */ } 410 public static class WifiCallingDisclaimerActivity extends SettingsActivity { /* empty */ } 411 public static class MobileNetworkListActivity extends SettingsActivity {} 412 public static class PowerMenuSettingsActivity extends SettingsActivity {} 413 public static class MobileNetworkActivity extends SettingsActivity { 414 415 public static final String TAG = "MobileNetworkActivity"; 416 public static final String EXTRA_MMS_MESSAGE = "mms_message"; 417 public static final String EXTRA_SHOW_CAPABILITY_DISCOVERY_OPT_IN = 418 "show_capability_discovery_opt_in"; 419 420 private MobileNetworkIntentConverter mIntentConverter; 421 422 /** 423 * Override of #onNewIntent() requires Activity to have "singleTop" launch mode within 424 * AndroidManifest.xml 425 */ 426 @Override onNewIntent(Intent intent)427 protected void onNewIntent(Intent intent) { 428 super.onNewIntent(intent); 429 430 Log.d(TAG, "Starting onNewIntent"); 431 432 createUiFromIntent(null /* savedState */, convertIntent(intent)); 433 } 434 435 @Override getIntent()436 public Intent getIntent() { 437 return convertIntent(super.getIntent()); 438 } 439 convertIntent(Intent copyFrom)440 private Intent convertIntent(Intent copyFrom) { 441 if (mIntentConverter == null) { 442 mIntentConverter = new MobileNetworkIntentConverter(this); 443 } 444 Intent intent = mIntentConverter.apply(copyFrom); 445 return (intent == null) ? copyFrom : intent; 446 } 447 doesIntentContainOptInAction(Intent intent)448 public static boolean doesIntentContainOptInAction(Intent intent) { 449 String intentAction = (intent != null ? intent.getAction() : null); 450 return TextUtils.equals(intentAction, 451 ImsRcsManager.ACTION_SHOW_CAPABILITY_DISCOVERY_OPT_IN); 452 } 453 } 454 455 /** Actviity to manage apps with {@link android.Manifest.permission#RUN_USER_INITIATED_JOBS} */ 456 public static class LongBackgroundTasksActivity extends SettingsActivity { /* empty */ } 457 /** App specific version of {@link LongBackgroundTasksActivity} */ 458 public static class LongBackgroundTasksAppActivity extends SettingsActivity { /* empty */ } 459 460 /** 461 * Activity for BugReportHandlerPicker. 462 */ 463 public static class BugReportHandlerPickerActivity extends SettingsActivity { /* empty */ } 464 465 // Top level categories for new IA 466 public static class NetworkDashboardActivity extends SettingsActivity {} 467 public static class ConnectedDeviceDashboardActivity extends SettingsActivity {} 468 public static class PowerUsageSummaryActivity extends SettingsActivity { /* empty */ } 469 public static class StorageDashboardActivity extends SettingsActivity {} 470 public static class AccountDashboardActivity extends SettingsActivity {} 471 public static class SystemDashboardActivity extends SettingsActivity {} 472 473 /** 474 * Activity for MediaControlsSettings 475 */ 476 public static class MediaControlsSettingsActivity extends SettingsActivity {} 477 478 /** 479 * Activity for AppDashboard. 480 */ 481 public static class AppDashboardActivity extends SettingsActivity {} 482 483 public static class AdaptiveBrightnessActivity extends SettingsActivity { /* empty */ } 484 485 /** 486 * Activity for OneHandedSettings 487 */ 488 public static class OneHandedSettingsActivity extends SettingsActivity { /* empty */ } 489 490 public static class PreviouslyConnectedDeviceActivity extends SettingsActivity { /* empty */ } 491 492 public static class ScreenTimeoutActivity extends SettingsActivity { /* empty */ } 493 494 /** Activity for the Reset mobile network settings. */ 495 public static class ResetMobileNetworkSettingsActivity extends SettingsActivity { /* empty */ } 496 497 public static class HearingDevicesActivity extends SettingsActivity { /* empty */ } 498 public static class HearingDevicesPairingActivity extends SettingsActivity { /* empty */ } 499 } 500