1 需求
- adb shell service list
- adb shell dumpsys -l
2 接口
https://developer.android.google.cn/reference/android/content/Context
/frameworks/base/core/java/android/content/Context.java
android.content.Context.getSystemService
3939 /**
3940 * Return the handle to a system-level service by name. The class of the
3941 * returned object varies by the requested name. Currently available names
3942 * are:
3943 *
3944 * <dl>
3945 * <dt> {@link #WINDOW_SERVICE} ("window")
3946 * <dd> The top-level window manager in which you can place custom
3947 * windows. The returned object is a {@link android.view.WindowManager}. Must only be obtained
3948 * from a visual context such as Activity or a Context created with
3949 * {@link #createWindowContext(int, Bundle)}, which are adjusted to the configuration and
3950 * visual bounds of an area on screen.
3951 * <dt> {@link #LAYOUT_INFLATER_SERVICE} ("layout_inflater")
3952 * <dd> A {@link android.view.LayoutInflater} for inflating layout resources
3953 * in this context. Must only be obtained from a visual context such as Activity or a Context
3954 * created with {@link #createWindowContext(int, Bundle)}, which are adjusted to the
3955 * configuration and visual bounds of an area on screen.
3956 * <dt> {@link #ACTIVITY_SERVICE} ("activity")
3957 * <dd> A {@link android.app.ActivityManager} for interacting with the
3958 * global activity state of the system.
3959 * <dt> {@link #WALLPAPER_SERVICE} ("wallpaper")
3960 * <dd> A {@link android.service.wallpaper.WallpaperService} for accessing wallpapers in this
3961 * context. Must only be obtained from a visual context such as Activity or a Context created
3962 * with {@link #createWindowContext(int, Bundle)}, which are adjusted to the configuration and
3963 * visual bounds of an area on screen.
3964 * <dt> {@link #POWER_SERVICE} ("power")
3965 * <dd> A {@link android.os.PowerManager} for controlling power
3966 * management.
3967 * <dt> {@link #ALARM_SERVICE} ("alarm")
3968 * <dd> A {@link android.app.AlarmManager} for receiving intents at the
3969 * time of your choosing.
3970 * <dt> {@link #NOTIFICATION_SERVICE} ("notification")
3971 * <dd> A {@link android.app.NotificationManager} for informing the user
3972 * of background events.
3973 * <dt> {@link #KEYGUARD_SERVICE} ("keyguard")
3974 * <dd> A {@link android.app.KeyguardManager} for controlling keyguard.
3975 * <dt> {@link #LOCATION_SERVICE} ("location")
3976 * <dd> A {@link android.location.LocationManager} for controlling location
3977 * (e.g., GPS) updates.
3978 * <dt> {@link #SEARCH_SERVICE} ("search")
3979 * <dd> A {@link android.app.SearchManager} for handling search.
3980 * <dt> {@link #VIBRATOR_MANAGER_SERVICE} ("vibrator_manager")
3981 * <dd> A {@link android.os.VibratorManager} for accessing the device vibrators, interacting
3982 * with individual ones and playing synchronized effects on multiple vibrators.
3983 * <dt> {@link #VIBRATOR_SERVICE} ("vibrator")
3984 * <dd> A {@link android.os.Vibrator} for interacting with the vibrator hardware.
3985 * <dt> {@link #CONNECTIVITY_SERVICE} ("connectivity")
3986 * <dd> A {@link android.net.ConnectivityManager ConnectivityManager} for
3987 * handling management of network connections.
3988 * <dt> {@link #IPSEC_SERVICE} ("ipsec")
3989 * <dd> A {@link android.net.IpSecManager IpSecManager} for managing IPSec on
3990 * sockets and networks.
3991 * <dt> {@link #WIFI_SERVICE} ("wifi")
3992 * <dd> A {@link android.net.wifi.WifiManager WifiManager} for management of Wi-Fi
3993 * connectivity. On releases before NYC, it should only be obtained from an application
3994 * context, and not from any other derived context to avoid memory leaks within the calling
3995 * process.
3996 * <dt> {@link #WIFI_AWARE_SERVICE} ("wifiaware")
3997 * <dd> A {@link android.net.wifi.aware.WifiAwareManager WifiAwareManager} for management of
3998 * Wi-Fi Aware discovery and connectivity.
3999 * <dt> {@link #WIFI_P2P_SERVICE} ("wifip2p")
4000 * <dd> A {@link android.net.wifi.p2p.WifiP2pManager WifiP2pManager} for management of
4001 * Wi-Fi Direct connectivity.
4002 * <dt> {@link #INPUT_METHOD_SERVICE} ("input_method")
4003 * <dd> An {@link android.view.inputmethod.InputMethodManager InputMethodManager}
4004 * for management of input methods.
4005 * <dt> {@link #UI_MODE_SERVICE} ("uimode")
4006 * <dd> An {@link android.app.UiModeManager} for controlling UI modes.
4007 * <dt> {@link #DOWNLOAD_SERVICE} ("download")
4008 * <dd> A {@link android.app.DownloadManager} for requesting HTTP downloads
4009 * <dt> {@link #BATTERY_SERVICE} ("batterymanager")
4010 * <dd> A {@link android.os.BatteryManager} for managing battery state
4011 * <dt> {@link #JOB_SCHEDULER_SERVICE} ("taskmanager")
4012 * <dd> A {@link android.app.job.JobScheduler} for managing scheduled tasks
4013 * <dt> {@link #NETWORK_STATS_SERVICE} ("netstats")
4014 * <dd> A {@link android.app.usage.NetworkStatsManager NetworkStatsManager} for querying network
4015 * usage statistics.
4016 * <dt> {@link #HARDWARE_PROPERTIES_SERVICE} ("hardware_properties")
4017 * <dd> A {@link android.os.HardwarePropertiesManager} for accessing hardware properties.
4018 * <dt> {@link #DOMAIN_VERIFICATION_SERVICE} ("domain_verification")
4019 * <dd> A {@link android.content.pm.verify.domain.DomainVerificationManager} for accessing
4020 * web domain approval state.
4021 * <dt> {@link #DISPLAY_HASH_SERVICE} ("display_hash")
4022 * <dd> A {@link android.view.displayhash.DisplayHashManager} for management of display hashes.
4023 * </dl>
4024 *
4025 * <p>Note: System services obtained via this API may be closely associated with
4026 * the Context in which they are obtained from. In general, do not share the
4027 * service objects between various different contexts (Activities, Applications,
4028 * Services, Providers, etc.)
4029 *
4030 * <p>Note: Instant apps, for which {@link PackageManager#isInstantApp()} returns true,
4031 * don't have access to the following system services: {@link #DEVICE_POLICY_SERVICE},
4032 * {@link #FINGERPRINT_SERVICE}, {@link #KEYGUARD_SERVICE}, {@link #SHORTCUT_SERVICE},
4033 * {@link #USB_SERVICE}, {@link #WALLPAPER_SERVICE}, {@link #WIFI_P2P_SERVICE},
4034 * {@link #WIFI_SERVICE}, {@link #WIFI_AWARE_SERVICE}. For these services this method will
4035 * return <code>null</code>. Generally, if you are running as an instant app you should always
4036 * check whether the result of this method is {@code null}.
4037 *
4038 * <p>Note: When implementing this method, keep in mind that new services can be added on newer
4039 * Android releases, so if you're looking for just the explicit names mentioned above, make sure
4040 * to return {@code null} when you don't recognize the name — if you throw a
4041 * {@link RuntimeException} exception instead, you're app might break on new Android releases.
4042 *
4043 * @param name The name of the desired service.
4044 *
4045 * @return The service or {@code null} if the name does not exist.
4046 *
4047 * @see #WINDOW_SERVICE
4048 * @see android.view.WindowManager
4049 * @see #LAYOUT_INFLATER_SERVICE
4050 * @see android.view.LayoutInflater
4051 * @see #ACTIVITY_SERVICE
4052 * @see android.app.ActivityManager
4053 * @see #POWER_SERVICE
4054 * @see android.os.PowerManager
4055 * @see #ALARM_SERVICE
4056 * @see android.app.AlarmManager
4057 * @see #NOTIFICATION_SERVICE
4058 * @see android.app.NotificationManager
4059 * @see #KEYGUARD_SERVICE
4060 * @see android.app.KeyguardManager
4061 * @see #LOCATION_SERVICE
4062 * @see android.location.LocationManager
4063 * @see #SEARCH_SERVICE
4064 * @see android.app.SearchManager
4065 * @see #SENSOR_SERVICE
4066 * @see android.hardware.SensorManager
4067 * @see #STORAGE_SERVICE
4068 * @see android.os.storage.StorageManager
4069 * @see #VIBRATOR_MANAGER_SERVICE
4070 * @see android.os.VibratorManager
4071 * @see #VIBRATOR_SERVICE
4072 * @see android.os.Vibrator
4073 * @see #CONNECTIVITY_SERVICE
4074 * @see android.net.ConnectivityManager
4075 * @see #WIFI_SERVICE
4076 * @see android.net.wifi.WifiManager
4077 * @see #AUDIO_SERVICE
4078 * @see android.media.AudioManager
4079 * @see #MEDIA_ROUTER_SERVICE
4080 * @see android.media.MediaRouter
4081 * @see #TELEPHONY_SERVICE
4082 * @see android.telephony.TelephonyManager
4083 * @see #TELEPHONY_SUBSCRIPTION_SERVICE
4084 * @see android.telephony.SubscriptionManager
4085 * @see #CARRIER_CONFIG_SERVICE
4086 * @see android.telephony.CarrierConfigManager
4087 * @see #EUICC_SERVICE
4088 * @see android.telephony.euicc.EuiccManager
4089 * @see android.telephony.MmsManager
4090 * @see #INPUT_METHOD_SERVICE
4091 * @see android.view.inputmethod.InputMethodManager
4092 * @see #UI_MODE_SERVICE
4093 * @see android.app.UiModeManager
4094 * @see #DOWNLOAD_SERVICE
4095 * @see android.app.DownloadManager
4096 * @see #BATTERY_SERVICE
4097 * @see android.os.BatteryManager
4098 * @see #JOB_SCHEDULER_SERVICE
4099 * @see android.app.job.JobScheduler
4100 * @see #NETWORK_STATS_SERVICE
4101 * @see android.app.usage.NetworkStatsManager
4102 * @see android.os.HardwarePropertiesManager
4103 * @see #HARDWARE_PROPERTIES_SERVICE
4104 * @see #DOMAIN_VERIFICATION_SERVICE
4105 * @see android.content.pm.verify.domain.DomainVerificationManager
4106 * @see #DISPLAY_HASH_SERVICE
4107 * @see android.view.displayhash.DisplayHashManager
4108 */
4109 public abstract @Nullable Object getSystemService(@ServiceName @NonNull String name);
3803 /** @hide */
3804 @StringDef(suffix = { "_SERVICE" }, value = {
3805 POWER_SERVICE,
3806 //@hide: POWER_STATS_SERVICE,
3807 WINDOW_SERVICE,
3808 LAYOUT_INFLATER_SERVICE,
3809 ACCOUNT_SERVICE,
3810 ACTIVITY_SERVICE,
3811 ALARM_SERVICE,
3812 NOTIFICATION_SERVICE,
3813 ACCESSIBILITY_SERVICE,
3814 CAPTIONING_SERVICE,
3815 KEYGUARD_SERVICE,
3816 LOCATION_SERVICE,
3817 //@hide: COUNTRY_DETECTOR,
3818 SEARCH_SERVICE,
3819 SENSOR_SERVICE,
3820 SENSOR_PRIVACY_SERVICE,
3821 STORAGE_SERVICE,
3822 STORAGE_STATS_SERVICE,
3823 WALLPAPER_SERVICE,
3824 TIME_ZONE_RULES_MANAGER_SERVICE,
3825 VIBRATOR_MANAGER_SERVICE,
3826 VIBRATOR_SERVICE,
3827 //@hide: STATUS_BAR_SERVICE,
3828 CONNECTIVITY_SERVICE,
3829 PAC_PROXY_SERVICE,
3830 VCN_MANAGEMENT_SERVICE,
3831 //@hide: IP_MEMORY_STORE_SERVICE,
3832 IPSEC_SERVICE,
3833 VPN_MANAGEMENT_SERVICE,
3834 TEST_NETWORK_SERVICE,
3835 //@hide: UPDATE_LOCK_SERVICE,
3836 //@hide: NETWORKMANAGEMENT_SERVICE,
3837 NETWORK_STATS_SERVICE,
3838 //@hide: NETWORK_POLICY_SERVICE,
3839 WIFI_SERVICE,
3840 WIFI_AWARE_SERVICE,
3841 WIFI_P2P_SERVICE,
3842 WIFI_SCANNING_SERVICE,
3843 //@hide: LOWPAN_SERVICE,
3844 //@hide: WIFI_RTT_SERVICE,
3845 //@hide: ETHERNET_SERVICE,
3846 WIFI_RTT_RANGING_SERVICE,
3847 NSD_SERVICE,
3848 AUDIO_SERVICE,
3849 AUTH_SERVICE,
3850 FINGERPRINT_SERVICE,
3851 //@hide: FACE_SERVICE,
3852 BIOMETRIC_SERVICE,
3853 MEDIA_ROUTER_SERVICE,
3854 TELEPHONY_SERVICE,
3855 TELEPHONY_SUBSCRIPTION_SERVICE,
3856 CARRIER_CONFIG_SERVICE,
3857 EUICC_SERVICE,
3858 //@hide: MMS_SERVICE,
3859 TELECOM_SERVICE,
3860 CLIPBOARD_SERVICE,
3861 INPUT_METHOD_SERVICE,
3862 TEXT_SERVICES_MANAGER_SERVICE,
3863 TEXT_CLASSIFICATION_SERVICE,
3864 APPWIDGET_SERVICE,
3865 //@hide: VOICE_INTERACTION_MANAGER_SERVICE,
3866 //@hide: BACKUP_SERVICE,
3867 REBOOT_READINESS_SERVICE,
3868 ROLLBACK_SERVICE,
3869 DROPBOX_SERVICE,
3870 //@hide: DEVICE_IDLE_CONTROLLER,
3871 //@hide: POWER_WHITELIST_MANAGER,
3872 DEVICE_POLICY_SERVICE,
3873 UI_MODE_SERVICE,
3874 DOWNLOAD_SERVICE,
3875 NFC_SERVICE,
3876 BLUETOOTH_SERVICE,
3877 //@hide: SIP_SERVICE,
3878 USB_SERVICE,
3879 LAUNCHER_APPS_SERVICE,
3880 //@hide: SERIAL_SERVICE,
3881 //@hide: HDMI_CONTROL_SERVICE,
3882 INPUT_SERVICE,
3883 DISPLAY_SERVICE,
3884 //@hide COLOR_DISPLAY_SERVICE,
3885 USER_SERVICE,
3886 RESTRICTIONS_SERVICE,
3887 APP_OPS_SERVICE,
3888 ROLE_SERVICE,
3889 //@hide ROLE_CONTROLLER_SERVICE,
3890 CAMERA_SERVICE,
3891 //@hide: PLATFORM_COMPAT_SERVICE,
3892 //@hide: PLATFORM_COMPAT_NATIVE_SERVICE,
3893 PRINT_SERVICE,
3894 CONSUMER_IR_SERVICE,
3895 //@hide: TRUST_SERVICE,
3896 TV_INTERACTIVE_APP_SERVICE,
3897 TV_INPUT_SERVICE,
3898 //@hide: TV_TUNER_RESOURCE_MGR_SERVICE,
3899 //@hide: NETWORK_SCORE_SERVICE,
3900 USAGE_STATS_SERVICE,
3901 MEDIA_SESSION_SERVICE,
3902 MEDIA_COMMUNICATION_SERVICE,
3903 BATTERY_SERVICE,
3904 JOB_SCHEDULER_SERVICE,
3905 //@hide: PERSISTENT_DATA_BLOCK_SERVICE,
3906 //@hide: OEM_LOCK_SERVICE,
3907 MEDIA_PROJECTION_SERVICE,
3908 MIDI_SERVICE,
3909 RADIO_SERVICE,
3910 HARDWARE_PROPERTIES_SERVICE,
3911 //@hide: SOUND_TRIGGER_SERVICE,
3912 SHORTCUT_SERVICE,
3913 //@hide: CONTEXTHUB_SERVICE,
3914 SYSTEM_HEALTH_SERVICE,
3915 //@hide: INCIDENT_SERVICE,
3916 //@hide: INCIDENT_COMPANION_SERVICE,
3917 //@hide: STATS_COMPANION_SERVICE,
3918 COMPANION_DEVICE_SERVICE,
3919 //@hide: VIRTUAL_DEVICE_SERVICE,
3920 CROSS_PROFILE_APPS_SERVICE,
3921 //@hide: SYSTEM_UPDATE_SERVICE,
3922 //@hide: TIME_DETECTOR_SERVICE,
3923 //@hide: TIME_ZONE_DETECTOR_SERVICE,
3924 PERMISSION_SERVICE,
3925 LIGHTS_SERVICE,
3926 LOCALE_SERVICE,
3927 //@hide: PEOPLE_SERVICE,
3928 //@hide: DEVICE_STATE_SERVICE,
3929 //@hide: SPEECH_RECOGNITION_SERVICE,
3930 UWB_SERVICE,
3931 MEDIA_METRICS_SERVICE,
3932 //@hide: ATTESTATION_VERIFICATION_SERVICE,
3933 //@hide: SAFETY_CENTER_SERVICE,
3934 DISPLAY_HASH_SERVICE,
3935 })
3936 @Retention(RetentionPolicy.SOURCE)
3937 public @interface ServiceName {}
adb shell service list
4169 /**
4170 * Use with {@link #getSystemService(String)} to retrieve a
4171 * {@link android.os.PowerManager} for controlling power management,
4172 * including "wake locks," which let you keep the device on while
4173 * you're running long tasks.
4174 */
4175 public static final String POWER_SERVICE = "power";
4176
4177 /**
4178 * Use with {@link #getSystemService(String)} to retrieve a
4179 * {@link android.os.PowerStatsService} for accessing power stats
4180 * service.
4181 *
4182 * @see #getSystemService(String)
4183 * @hide
4184 */
4185 public static final String POWER_STATS_SERVICE = "powerstats";
4186
4187 /**
4188 * Use with {@link #getSystemService(String)} to retrieve a
4189 * {@link android.os.RecoverySystem} for accessing the recovery system
4190 * service.
4191 *
4192 * @see #getSystemService(String)
4193 * @hide
4194 */
4195 public static final String RECOVERY_SERVICE = "recovery";
4196
4197 /**
4198 * Use with {@link #getSystemService(String)} to retrieve a
4199 * {@link android.os.SystemUpdateManager} for accessing the system update
4200 * manager service.
4201 *
4202 * @see #getSystemService(String)
4203 * @hide
4204 */
4205 @SystemApi
4206 public static final String SYSTEM_UPDATE_SERVICE = "system_update";
4207
4208 /**
4209 * Use with {@link #getSystemService(String)} to retrieve a
4210 * {@link android.view.WindowManager} for accessing the system's window
4211 * manager.
4212 *
4213 * @see #getSystemService(String)
4214 * @see android.view.WindowManager
4215 */
4216 @UiContext
4217 public static final String WINDOW_SERVICE = "window";
4218
4219 /**
4220 * Use with {@link #getSystemService(String)} to retrieve a
4221 * {@link android.view.LayoutInflater} for inflating layout resources in this
4222 * context.
4223 *
4224 * @see #getSystemService(String)
4225 * @see android.view.LayoutInflater
4226 */
4227 @UiContext
4228 public static final String LAYOUT_INFLATER_SERVICE = "layout_inflater";
4229
4230 /**
4231 * Use with {@link #getSystemService(String)} to retrieve a
4232 * {@link android.accounts.AccountManager} for receiving intents at a
4233 * time of your choosing.
4234 *
4235 * @see #getSystemService(String)
4236 * @see android.accounts.AccountManager
4237 */
4238 public static final String ACCOUNT_SERVICE = "account";
4239
4240 /**
4241 * Use with {@link #getSystemService(String)} to retrieve a
4242 * {@link android.app.ActivityManager} for interacting with the global
4243 * system state.
4244 *
4245 * @see #getSystemService(String)
4246 * @see android.app.ActivityManager
4247 */
4248 public static final String ACTIVITY_SERVICE = "activity";
4249
4250 /**
4251 * Use with {@link #getSystemService(String)} to retrieve a
4252 * {@link android.app.ActivityTaskManager} for interacting with the global system state.
4253 *
4254 * @see #getSystemService(String)
4255 * @see android.app.ActivityTaskManager
4256 * @hide
4257 */
4258 public static final String ACTIVITY_TASK_SERVICE = "activity_task";
4259
4260 /**
4261 * Use with {@link #getSystemService(String)} to retrieve a
4262 * {@link android.app.UriGrantsManager} for interacting with the global system state.
4263 *
4264 * @see #getSystemService(String)
4265 * @see android.app.UriGrantsManager
4266 * @hide
4267 */
4268 public static final String URI_GRANTS_SERVICE = "uri_grants";
4269
4270 /**
4271 * Use with {@link #getSystemService(String)} to retrieve a
4272 * {@link android.app.AlarmManager} for receiving intents at a
4273 * time of your choosing.
4274 *
4275 * @see #getSystemService(String)
4276 * @see android.app.AlarmManager
4277 */
4278 public static final String ALARM_SERVICE = "alarm";
4279
4280 /**
4281 * Use with {@link #getSystemService(String)} to retrieve a
4282 * {@link android.app.NotificationManager} for informing the user of
4283 * background events.
4284 *
4285 * @see #getSystemService(String)
4286 * @see android.app.NotificationManager
4287 */
4288 public static final String NOTIFICATION_SERVICE = "notification";
4289
4290 /**
4291 * Use with {@link #getSystemService(String)} to retrieve a
4292 * {@link android.view.accessibility.AccessibilityManager} for giving the user
4293 * feedback for UI events through the registered event listeners.
4294 *
4295 * @see #getSystemService(String)
4296 * @see android.view.accessibility.AccessibilityManager
4297 */
4298 public static final String ACCESSIBILITY_SERVICE = "accessibility";
4299
4300 /**
4301 * Use with {@link #getSystemService(String)} to retrieve a
4302 * {@link android.view.accessibility.CaptioningManager} for obtaining
4303 * captioning properties and listening for changes in captioning
4304 * preferences.
4305 *
4306 * @see #getSystemService(String)
4307 * @see android.view.accessibility.CaptioningManager
4308 */
4309 public static final String CAPTIONING_SERVICE = "captioning";
4310
4311 /**
4312 * Use with {@link #getSystemService(String)} to retrieve a
4313 * {@link android.app.KeyguardManager} for controlling keyguard.
4314 *
4315 * @see #getSystemService(String)
4316 * @see android.app.KeyguardManager
4317 */
4318 public static final String KEYGUARD_SERVICE = "keyguard";
4319
4320 /**
4321 * Use with {@link #getSystemService(String)} to retrieve a {@link
4322 * android.location.LocationManager} for controlling location
4323 * updates.
4324 *
4325 * @see #getSystemService(String)
4326 * @see android.location.LocationManager
4327 */
4328 public static final String LOCATION_SERVICE = "location";
4329
4330 /**
4331 * Use with {@link #getSystemService(String)} to retrieve a
4332 * {@link android.location.CountryDetector} for detecting the country that
4333 * the user is in.
4334 *
4335 * @hide
4336 */
4337 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023)
4338 public static final String COUNTRY_DETECTOR = "country_detector";
4339
4340 /**
4341 * Use with {@link #getSystemService(String)} to retrieve a {@link
4342 * android.app.SearchManager} for handling searches.
4343 *
4344 * <p>
4345 * {@link Configuration#UI_MODE_TYPE_WATCH} does not support
4346 * {@link android.app.SearchManager}.
4347 *
4348 * @see #getSystemService
4349 * @see android.app.SearchManager
4350 */
4351 public static final String SEARCH_SERVICE = "search";
4352
4353 /**
4354 * Use with {@link #getSystemService(String)} to retrieve a {@link
4355 * android.hardware.SensorManager} for accessing sensors.
4356 *
4357 * @see #getSystemService(String)
4358 * @see android.hardware.SensorManager
4359 */
4360 public static final String SENSOR_SERVICE = "sensor";
4361
4362 /**
4363 * Use with {@link #getSystemService(String)} to retrieve a {@link
4364 * android.hardware.SensorPrivacyManager} for accessing sensor privacy
4365 * functions.
4366 *
4367 * @see #getSystemService(String)
4368 * @see android.hardware.SensorPrivacyManager
4369 *
4370 * @hide
4371 */
4372 public static final String SENSOR_PRIVACY_SERVICE = "sensor_privacy";
4373
4374 /**
4375 * Use with {@link #getSystemService(String)} to retrieve a {@link
4376 * android.os.storage.StorageManager} for accessing system storage
4377 * functions.
4378 *
4379 * @see #getSystemService(String)
4380 * @see android.os.storage.StorageManager
4381 */
4382 public static final String STORAGE_SERVICE = "storage";
4383
4384 /**
4385 * Use with {@link #getSystemService(String)} to retrieve a {@link
4386 * android.app.usage.StorageStatsManager} for accessing system storage
4387 * statistics.
4388 *
4389 * @see #getSystemService(String)
4390 * @see android.app.usage.StorageStatsManager
4391 */
4392 public static final String STORAGE_STATS_SERVICE = "storagestats";
4393
4394 /**
4395 * Use with {@link #getSystemService(String)} to retrieve a
4396 * com.android.server.WallpaperService for accessing wallpapers.
4397 *
4398 * @see #getSystemService(String)
4399 */
4400 @UiContext
4401 public static final String WALLPAPER_SERVICE = "wallpaper";
4402
4403 /**
4404 * Use with {@link #getSystemService(String)} to retrieve a {@link android.os.VibratorManager}
4405 * for accessing the device vibrators, interacting with individual ones and playing synchronized
4406 * effects on multiple vibrators.
4407 *
4408 * @see #getSystemService(String)
4409 * @see android.os.VibratorManager
4410 */
4411 @SuppressLint("ServiceName")
4412 public static final String VIBRATOR_MANAGER_SERVICE = "vibrator_manager";
4413
4414 /**
4415 * Use with {@link #getSystemService(String)} to retrieve a {@link android.os.Vibrator} for
4416 * interacting with the vibration hardware.
4417 *
4418 * @deprecated Use {@link android.os.VibratorManager} to retrieve the default system vibrator.
4419 * @see #getSystemService(String)
4420 * @see android.os.Vibrator
4421 */
4422 @Deprecated
4423 public static final String VIBRATOR_SERVICE = "vibrator";
4424
4425 /**
4426 * Use with {@link #getSystemService(String)} to retrieve a {@link
4427 * android.app.StatusBarManager} for interacting with the status bar and quick settings.
4428 *
4429 * @see #getSystemService(String)
4430 * @see android.app.StatusBarManager
4431 *
4432 */
4433 @SuppressLint("ServiceName")
4434 public static final String STATUS_BAR_SERVICE = "statusbar";
4435
4436 /**
4437 * Use with {@link #getSystemService(String)} to retrieve a {@link
4438 * android.net.ConnectivityManager} for handling management of
4439 * network connections.
4440 *
4441 * @see #getSystemService(String)
4442 * @see android.net.ConnectivityManager
4443 */
4444 public static final String CONNECTIVITY_SERVICE = "connectivity";
4445
4446 /**
4447 * Use with {@link #getSystemService(String)} to retrieve a {@link
4448 * android.net.PacProxyManager} for handling management of
4449 * pac proxy information.
4450 *
4451 * @see #getSystemService(String)
4452 * @see android.net.PacProxyManager
4453 * @hide
4454 */
4455 @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES)
4456 public static final String PAC_PROXY_SERVICE = "pac_proxy";
4457
4458 /**
4459 * Use with {@link #getSystemService(String)} to retrieve a {@link android.net.vcn.VcnManager}
4460 * for managing Virtual Carrier Networks
4461 *
4462 * @see #getSystemService(String)
4463 * @see android.net.vcn.VcnManager
4464 * @hide
4465 */
4466 public static final String VCN_MANAGEMENT_SERVICE = "vcn_management";
4467
4468 /**
4469 * Use with {@link #getSystemService(String)} to retrieve a
4470 * {@link android.net.INetd} for communicating with the network stack
4471 * @hide
4472 * @see #getSystemService(String)
4473 * @hide
4474 */
4475 @SystemApi
4476 public static final String NETD_SERVICE = "netd";
4477
4478 /**
4479 * Use with {@link android.os.ServiceManager.getService()} to retrieve a
4480 * {@link INetworkStackConnector} IBinder for communicating with the network stack
4481 * @hide
4482 * @see NetworkStackClient
4483 */
4484 public static final String NETWORK_STACK_SERVICE = "network_stack";
4485
4486 /**
4487 * Use with {@link #getSystemService(String)} to retrieve a {@link android.net.TetheringManager}
4488 * for managing tethering functions.
4489 * @hide
4490 * @see android.net.TetheringManager
4491 */
4492 @SystemApi
4493 public static final String TETHERING_SERVICE = "tethering";
4494
4495 /**
4496 * Use with {@link #getSystemService(String)} to retrieve a
4497 * {@link android.net.IpSecManager} for encrypting Sockets or Networks with
4498 * IPSec.
4499 *
4500 * @see #getSystemService(String)
4501 */
4502 public static final String IPSEC_SERVICE = "ipsec";
4503
4504 /**
4505 * Use with {@link #getSystemService(String)} to retrieve a {@link android.net.VpnManager} to
4506 * manage profiles for the platform built-in VPN.
4507 *
4508 * @see #getSystemService(String)
4509 */
4510 public static final String VPN_MANAGEMENT_SERVICE = "vpn_management";
4511
4512 /**
4513 * Use with {@link #getSystemService(String)} to retrieve a {@link
4514 * android.net.ConnectivityDiagnosticsManager} for performing network connectivity diagnostics
4515 * as well as receiving network connectivity information from the system.
4516 *
4517 * @see #getSystemService(String)
4518 * @see android.net.ConnectivityDiagnosticsManager
4519 */
4520 public static final String CONNECTIVITY_DIAGNOSTICS_SERVICE = "connectivity_diagnostics";
4521
4522 /**
4523 * Use with {@link #getSystemService(String)} to retrieve a {@link
4524 * android.net.TestNetworkManager} for building TUNs and limited-use Networks
4525 *
4526 * @see #getSystemService(String)
4527 * @hide
4528 */
4529 @TestApi @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES)
4530 public static final String TEST_NETWORK_SERVICE = "test_network";
4531
4532 /**
4533 * Use with {@link #getSystemService(String)} to retrieve a {@link
4534 * android.os.IUpdateLock} for managing runtime sequences that
4535 * must not be interrupted by headless OTA application or similar.
4536 *
4537 * @hide
4538 * @see #getSystemService(String)
4539 * @see android.os.UpdateLock
4540 */
4541 public static final String UPDATE_LOCK_SERVICE = "updatelock";
4542
4543 /**
4544 * Constant for the internal network management service, not really a Context service.
4545 * @hide
4546 */
4547 public static final String NETWORKMANAGEMENT_SERVICE = "network_management";
4548
4549 /**
4550 * Use with {@link #getSystemService(String)} to retrieve a
4551 * {@link com.android.server.slice.SliceManagerService} for managing slices.
4552 * @hide
4553 * @see #getSystemService(String)
4554 */
4555 public static final String SLICE_SERVICE = "slice";
4556
4557 /**
4558 * Use with {@link #getSystemService(String)} to retrieve a {@link
4559 * android.app.usage.NetworkStatsManager} for querying network usage stats.
4560 *
4561 * @see #getSystemService(String)
4562 * @see android.app.usage.NetworkStatsManager
4563 */
4564 public static final String NETWORK_STATS_SERVICE = "netstats";
4565 /** {@hide} */
4566 public static final String NETWORK_POLICY_SERVICE = "netpolicy";
4567 /** {@hide} */
4568 public static final String NETWORK_WATCHLIST_SERVICE = "network_watchlist";
4569
4570 /**
4571 * Use with {@link #getSystemService(String)} to retrieve a {@link
4572 * android.net.wifi.WifiManager} for handling management of
4573 * Wi-Fi access.
4574 *
4575 * @see #getSystemService(String)
4576 * @see android.net.wifi.WifiManager
4577 */
4578 public static final String WIFI_SERVICE = "wifi";
4579
4580 /**
4581 * Use with {@link #getSystemService(String)} to retrieve a
4582 * {@link android.net.wifi.wificond.WifiNl80211Manager} for handling management of the
4583 * Wi-Fi nl802.11 daemon (wificond).
4584 *
4585 * @see #getSystemService(String)
4586 * @see android.net.wifi.wificond.WifiNl80211Manager
4587 * @hide
4588 */
4589 @SystemApi
4590 @SuppressLint("ServiceName")
4591 public static final String WIFI_NL80211_SERVICE = "wifinl80211";
4592
4593 /**
4594 * Use with {@link #getSystemService(String)} to retrieve a {@link
4595 * android.net.wifi.p2p.WifiP2pManager} for handling management of
4596 * Wi-Fi peer-to-peer connections.
4597 *
4598 * @see #getSystemService(String)
4599 * @see android.net.wifi.p2p.WifiP2pManager
4600 */
4601 public static final String WIFI_P2P_SERVICE = "wifip2p";
4602
4603 /**
4604 * Use with {@link #getSystemService(String)} to retrieve a
4605 * {@link android.net.wifi.aware.WifiAwareManager} for handling management of
4606 * Wi-Fi Aware.
4607 *
4608 * @see #getSystemService(String)
4609 * @see android.net.wifi.aware.WifiAwareManager
4610 */
4611 public static final String WIFI_AWARE_SERVICE = "wifiaware";
4612
4613 /**
4614 * Use with {@link #getSystemService(String)} to retrieve a {@link
4615 * android.net.wifi.WifiScanner} for scanning the wifi universe
4616 *
4617 * @see #getSystemService(String)
4618 * @see android.net.wifi.WifiScanner
4619 * @hide
4620 */
4621 @SystemApi
4622 public static final String WIFI_SCANNING_SERVICE = "wifiscanner";
4623
4624 /**
4625 * Use with {@link #getSystemService(String)} to retrieve a {@link
4626 * android.net.wifi.RttManager} for ranging devices with wifi
4627 *
4628 * @see #getSystemService(String)
4629 * @see android.net.wifi.RttManager
4630 * @hide
4631 */
4632 @SystemApi
4633 @Deprecated
4634 public static final String WIFI_RTT_SERVICE = "rttmanager";
4635
4636 /**
4637 * Use with {@link #getSystemService(String)} to retrieve a {@link
4638 * android.net.wifi.rtt.WifiRttManager} for ranging devices with wifi.
4639 *
4640 * @see #getSystemService(String)
4641 * @see android.net.wifi.rtt.WifiRttManager
4642 */
4643 public static final String WIFI_RTT_RANGING_SERVICE = "wifirtt";
4644
4645 /**
4646 * Use with {@link #getSystemService(String)} to retrieve a {@link
4647 * android.net.lowpan.LowpanManager} for handling management of
4648 * LoWPAN access.
4649 *
4650 * @see #getSystemService(String)
4651 * @see android.net.lowpan.LowpanManager
4652 *
4653 * @hide
4654 */
4655 public static final String LOWPAN_SERVICE = "lowpan";
4656
4657 /**
4658 * Use with {@link #getSystemService(String)} to retrieve a {@link android.net.EthernetManager}
4659 * for handling management of Ethernet access.
4660 *
4661 * @see #getSystemService(String)
4662 * @see android.net.EthernetManager
4663 *
4664 * @hide
4665 */
4666 @SystemApi
4667 public static final String ETHERNET_SERVICE = "ethernet";
4668
4669 /**
4670 * Use with {@link #getSystemService(String)} to retrieve a {@link
4671 * android.net.nsd.NsdManager} for handling management of network service
4672 * discovery
4673 *
4674 * @see #getSystemService(String)
4675 * @see android.net.nsd.NsdManager
4676 */
4677 public static final String NSD_SERVICE = "servicediscovery";
4678
4679 /**
4680 * Use with {@link #getSystemService(String)} to retrieve a
4681 * {@link android.media.AudioManager} for handling management of volume,
4682 * ringer modes and audio routing.
4683 *
4684 * @see #getSystemService(String)
4685 * @see android.media.AudioManager
4686 */
4687 public static final String AUDIO_SERVICE = "audio";
4688
4689 /**
4690 * Use with {@link #getSystemService(String)} to retrieve a {@link
4691 * android.media.MediaTranscodingManager} for transcoding media.
4692 *
4693 * @hide
4694 * @see #getSystemService(String)
4695 * @see android.media.MediaTranscodingManager
4696 */
4697 @SystemApi
4698 public static final String MEDIA_TRANSCODING_SERVICE = "media_transcoding";
4699
4700 /**
4701 * AuthService orchestrates biometric and PIN/pattern/password authentication.
4702 *
4703 * BiometricService was split into two services, AuthService and BiometricService, where
4704 * AuthService is the high level service that orchestrates all types of authentication, and
4705 * BiometricService is a lower layer responsible only for biometric authentication.
4706 *
4707 * Ideally we should have renamed BiometricManager to AuthManager, because it logically
4708 * corresponds to AuthService. However, because BiometricManager is a public API, we kept
4709 * the old name but changed the internal implementation to use AuthService.
4710 *
4711 * As of now, the AUTH_SERVICE constant is only used to identify the service in
4712 * SystemServiceRegistry and SELinux. To obtain the manager for AUTH_SERVICE, one should use
4713 * BIOMETRIC_SERVICE with {@link #getSystemService(String)} to retrieve a
4714 * {@link android.hardware.biometrics.BiometricManager}
4715 *
4716 * Map of the two services and their managers:
4717 * [Service] [Manager]
4718 * AuthService BiometricManager
4719 * BiometricService N/A
4720 *
4721 * @hide
4722 */
4723 public static final String AUTH_SERVICE = "auth";
4724
4725 /**
4726 * Use with {@link #getSystemService(String)} to retrieve a
4727 * {@link android.hardware.fingerprint.FingerprintManager} for handling management
4728 * of fingerprints.
4729 *
4730 * @see #getSystemService(String)
4731 * @see android.hardware.fingerprint.FingerprintManager
4732 */
4733 public static final String FINGERPRINT_SERVICE = "fingerprint";
4734
4735 /**
4736 * Use with {@link #getSystemService(String)} to retrieve a
4737 * {@link android.hardware.face.FaceManager} for handling management
4738 * of face authentication.
4739 *
4740 * @hide
4741 * @see #getSystemService
4742 * @see android.hardware.face.FaceManager
4743 */
4744 public static final String FACE_SERVICE = "face";
4745
4746 /**
4747 * Use with {@link #getSystemService(String)} to retrieve a
4748 * {@link android.hardware.iris.IrisManager} for handling management
4749 * of iris authentication.
4750 *
4751 * @hide
4752 * @see #getSystemService
4753 * @see android.hardware.iris.IrisManager
4754 */
4755 public static final String IRIS_SERVICE = "iris";
4756
4757 /**
4758 * Use with {@link #getSystemService(String)} to retrieve a
4759 * {@link android.hardware.biometrics.BiometricManager} for handling
4760 * biometric and PIN/pattern/password authentication.
4761 *
4762 * @see #getSystemService
4763 * @see android.hardware.biometrics.BiometricManager
4764 */
4765 public static final String BIOMETRIC_SERVICE = "biometric";
4766
4767 /**
4768 * Use with {@link #getSystemService(String)} to retrieve a
4769 * {@link android.media.MediaCommunicationManager}
4770 * for managing {@link android.media.MediaSession2}.
4771 *
4772 * @see #getSystemService(String)
4773 * @see android.media.MediaCommunicationManager
4774 */
4775 public static final String MEDIA_COMMUNICATION_SERVICE = "media_communication";
4776
4777 /**
4778 * Use with {@link #getSystemService} to retrieve a
4779 * {@link android.media.MediaRouter} for controlling and managing
4780 * routing of media.
4781 *
4782 * @see #getSystemService(String)
4783 * @see android.media.MediaRouter
4784 */
4785 public static final String MEDIA_ROUTER_SERVICE = "media_router";
4786
4787 /**
4788 * Use with {@link #getSystemService(String)} to retrieve a
4789 * {@link android.media.session.MediaSessionManager} for managing media Sessions.
4790 *
4791 * @see #getSystemService(String)
4792 * @see android.media.session.MediaSessionManager
4793 */
4794 public static final String MEDIA_SESSION_SERVICE = "media_session";
4795
4796 /**
4797 * Use with {@link #getSystemService(String)} to retrieve a
4798 * {@link android.telephony.TelephonyManager} for handling management the
4799 * telephony features of the device.
4800 *
4801 * @see #getSystemService(String)
4802 * @see android.telephony.TelephonyManager
4803 */
4804 public static final String TELEPHONY_SERVICE = "phone";
4805
4806 /**
4807 * Use with {@link #getSystemService(String)} to retrieve a
4808 * {@link android.telephony.SubscriptionManager} for handling management the
4809 * telephony subscriptions of the device.
4810 *
4811 * @see #getSystemService(String)
4812 * @see android.telephony.SubscriptionManager
4813 */
4814 public static final String TELEPHONY_SUBSCRIPTION_SERVICE = "telephony_subscription_service";
4815
4816 /**
4817 * Use with {@link #getSystemService(String)} to retrieve a
4818 * {@link android.telecom.TelecomManager} to manage telecom-related features
4819 * of the device.
4820 *
4821 * @see #getSystemService(String)
4822 * @see android.telecom.TelecomManager
4823 */
4824 public static final String TELECOM_SERVICE = "telecom";
4825
4826 /**
4827 * Use with {@link #getSystemService(String)} to retrieve a
4828 * {@link android.telephony.CarrierConfigManager} for reading carrier configuration values.
4829 *
4830 * @see #getSystemService(String)
4831 * @see android.telephony.CarrierConfigManager
4832 */
4833 public static final String CARRIER_CONFIG_SERVICE = "carrier_config";
4834
4835 /**
4836 * Use with {@link #getSystemService(String)} to retrieve a
4837 * {@link android.telephony.euicc.EuiccManager} to manage the device eUICC (embedded SIM).
4838 *
4839 * @see #getSystemService(String)
4840 * @see android.telephony.euicc.EuiccManager
4841 */
4842 public static final String EUICC_SERVICE = "euicc";
4843
4844 /**
4845 * Use with {@link #getSystemService(String)} to retrieve a
4846 * {@link android.telephony.euicc.EuiccCardManager} to access the device eUICC (embedded SIM).
4847 *
4848 * @see #getSystemService(String)
4849 * @see android.telephony.euicc.EuiccCardManager
4850 * @hide
4851 */
4852 @SystemApi
4853 public static final String EUICC_CARD_SERVICE = "euicc_card";
4854
4855 /**
4856 * Use with {@link #getSystemService(String)} to retrieve a
4857 * {@link android.telephony.MmsManager} to send/receive MMS messages.
4858 *
4859 * @see #getSystemService(String)
4860 * @see android.telephony.MmsManager
4861 * @hide
4862 */
4863 public static final String MMS_SERVICE = "mms";
4864
4865 /**
4866 * Use with {@link #getSystemService(String)} to retrieve a
4867 * {@link android.content.ClipboardManager} for accessing and modifying
4868 * the contents of the global clipboard.
4869 *
4870 * @see #getSystemService(String)
4871 * @see android.content.ClipboardManager
4872 */
4873 public static final String CLIPBOARD_SERVICE = "clipboard";
4874
4875 /**
4876 * Use with {@link #getSystemService(String)} to retrieve a
4877 * {@link TextClassificationManager} for text classification services.
4878 *
4879 * @see #getSystemService(String)
4880 * @see TextClassificationManager
4881 */
4882 public static final String TEXT_CLASSIFICATION_SERVICE = "textclassification";
4883
4884 /**
4885 * Use with {@link #getSystemService(String)} to retrieve a
4886 * {@link android.view.selectiontoolbar.SelectionToolbarManager} for selection toolbar service.
4887 *
4888 * @see #getSystemService(String)
4889 * @hide
4890 */
4891 public static final String SELECTION_TOOLBAR_SERVICE = "selection_toolbar";
4892
4893 /**
4894 * Use with {@link #getSystemService(String)} to retrieve a
4895 * {@link android.graphics.fonts.FontManager} for font services.
4896 *
4897 * @see #getSystemService(String)
4898 * @see android.graphics.fonts.FontManager
4899 * @hide
4900 */
4901 @SystemApi
4902 @TestApi
4903 public static final String FONT_SERVICE = "font";
4904
4905 /**
4906 * Use with {@link #getSystemService(String)} to retrieve a
4907 * {@link com.android.server.attention.AttentionManagerService} for attention services.
4908 *
4909 * @see #getSystemService(String)
4910 * @see android.server.attention.AttentionManagerService
4911 * @hide
4912 */
4913 public static final String ATTENTION_SERVICE = "attention";
4914
4915 /**
4916 * Official published name of the (internal) rotation resolver service.
4917 *
4918 * // TODO(b/178151184): change it back to rotation resolver before S release.
4919 *
4920 * @see #getSystemService(String)
4921 * @hide
4922 */
4923 public static final String ROTATION_RESOLVER_SERVICE = "resolver";
4924
4925 /**
4926 * Use with {@link #getSystemService(String)} to retrieve a
4927 * {@link android.view.inputmethod.InputMethodManager} for accessing input
4928 * methods.
4929 *
4930 * @see #getSystemService(String)
4931 */
4932 public static final String INPUT_METHOD_SERVICE = "input_method";
4933
4934 /**
4935 * Use with {@link #getSystemService(String)} to retrieve a
4936 * {@link android.view.textservice.TextServicesManager} for accessing
4937 * text services.
4938 *
4939 * @see #getSystemService(String)
4940 */
4941 public static final String TEXT_SERVICES_MANAGER_SERVICE = "textservices";
4942
4943 /**
4944 * Use with {@link #getSystemService(String)} to retrieve a
4945 * {@link android.appwidget.AppWidgetManager} for accessing AppWidgets.
4946 *
4947 * @see #getSystemService(String)
4948 */
4949 public static final String APPWIDGET_SERVICE = "appwidget";
4950
4951 /**
4952 * Official published name of the (internal) voice interaction manager service.
4953 *
4954 * @hide
4955 * @see #getSystemService(String)
4956 */
4957 public static final String VOICE_INTERACTION_MANAGER_SERVICE = "voiceinteraction";
4958
4959 /**
4960 * Official published name of the (internal) autofill service.
4961 *
4962 * @hide
4963 * @see #getSystemService(String)
4964 */
4965 public static final String AUTOFILL_MANAGER_SERVICE = "autofill";
4966
4967 /**
4968 * Official published name of the (internal) text to speech manager service.
4969 *
4970 * @hide
4971 * @see #getSystemService(String)
4972 */
4973 public static final String TEXT_TO_SPEECH_MANAGER_SERVICE = "texttospeech";
4974
4975 /**
4976 * Official published name of the content capture service.
4977 *
4978 * @hide
4979 * @see #getSystemService(String)
4980 */
4981 @TestApi
4982 @SuppressLint("ServiceName") // TODO: This should be renamed to CONTENT_CAPTURE_SERVICE
4983 public static final String CONTENT_CAPTURE_MANAGER_SERVICE = "content_capture";
4984
4985 /**
4986 * Official published name of the translation service.
4987 *
4988 * @hide
4989 * @see #getSystemService(String)
4990 */
4991 @SystemApi
4992 @SuppressLint("ServiceName")
4993 public static final String TRANSLATION_MANAGER_SERVICE = "translation";
4994
4995 /**
4996 * Official published name of the translation service which supports ui translation function.
4997 *
4998 * @hide
4999 * @see #getSystemService(String)
5000 */
5001 @SystemApi
5002 public static final String UI_TRANSLATION_SERVICE = "ui_translation";
5003
5004 /**
5005 * Used for getting content selections and classifications for task snapshots.
5006 *
5007 * @hide
5008 * @see #getSystemService(String)
5009 */
5010 @SystemApi
5011 public static final String CONTENT_SUGGESTIONS_SERVICE = "content_suggestions";
5012
5013 /**
5014 * Official published name of the app prediction service.
5015 *
5016 * <p><b>NOTE: </b> this service is optional; callers of
5017 * {@code Context.getSystemServiceName(APP_PREDICTION_SERVICE)} should check for {@code null}.
5018 *
5019 * @hide
5020 * @see #getSystemService(String)
5021 */
5022 @SystemApi
5023 public static final String APP_PREDICTION_SERVICE = "app_prediction";
5024
5025 /**
5026 * Official published name of the search ui service.
5027 *
5028 * <p><b>NOTE: </b> this service is optional; callers of
5029 * {@code Context.getSystemServiceName(SEARCH_UI_SERVICE)} should check for {@code null}.
5030 *
5031 * @hide
5032 * @see #getSystemService(String)
5033 */
5034 @SystemApi
5035 public static final String SEARCH_UI_SERVICE = "search_ui";
5036
5037 /**
5038 * Used for getting the smartspace service.
5039 *
5040 * <p><b>NOTE: </b> this service is optional; callers of
5041 * {@code Context.getSystemServiceName(SMARTSPACE_SERVICE)} should check for {@code null}.
5042 *
5043 * @hide
5044 * @see #getSystemService(String)
5045 */
5046 @SystemApi
5047 public static final String SMARTSPACE_SERVICE = "smartspace";
5048
5049 /**
5050 * Used for getting the cloudsearch service.
5051 *
5052 * <p><b>NOTE: </b> this service is optional; callers of
5053 * {@code Context.getSystemServiceName(CLOUDSEARCH_SERVICE)} should check for {@code null}.
5054 *
5055 * @hide
5056 * @see #getSystemService(String)
5057 */
5058 @SystemApi
5059 public static final String CLOUDSEARCH_SERVICE = "cloudsearch";
5060
5061 /**
5062 * Use with {@link #getSystemService(String)} to access the
5063 * {@link com.android.server.voiceinteraction.SoundTriggerService}.
5064 *
5065 * @hide
5066 * @see #getSystemService(String)
5067 */
5068 public static final String SOUND_TRIGGER_SERVICE = "soundtrigger";
5069
5070 /**
5071 * Use with {@link #getSystemService(String)} to access the
5072 * {@link com.android.server.soundtrigger_middleware.SoundTriggerMiddlewareService}.
5073 *
5074 * @hide
5075 * @see #getSystemService(String)
5076 */
5077 public static final String SOUND_TRIGGER_MIDDLEWARE_SERVICE = "soundtrigger_middleware";
5078
5079 /**
5080 * Used for getting the wallpaper effects generation service.
5081 *
5082 * <p><b>NOTE: </b> this service is optional; callers of
5083 * {@code Context.getSystemServiceName(WALLPAPER_EFFECTS_GENERATION_SERVICE)} should check for
5084 * {@code null}.
5085 *
5086 * @hide
5087 * @see #getSystemService(String)
5088 */
5089 @SystemApi
5090 public static final String WALLPAPER_EFFECTS_GENERATION_SERVICE =
5091 "wallpaper_effects_generation";
5092
5093 /**
5094 * Used to access {@link MusicRecognitionManagerService}.
5095 *
5096 * @hide
5097 * @see #getSystemService(String)
5098 */
5099 @SystemApi
5100 public static final String MUSIC_RECOGNITION_SERVICE = "music_recognition";
5101
5102 /**
5103 * Official published name of the (internal) permission service.
5104 *
5105 * @see #getSystemService(String)
5106 * @hide
5107 */
5108 @SystemApi
5109 public static final String PERMISSION_SERVICE = "permission";
5110
5111 /**
5112 * Official published name of the legacy (internal) permission service.
5113 *
5114 * @see #getSystemService(String)
5115 * @hide
5116 */
5117 //@SystemApi(client = SystemApi.Client.MODULE_LIBRARIES)
5118 public static final String LEGACY_PERMISSION_SERVICE = "legacy_permission";
5119
5120 /**
5121 * Official published name of the (internal) permission controller service.
5122 *
5123 * @see #getSystemService(String)
5124 * @hide
5125 */
5126 @SystemApi
5127 public static final String PERMISSION_CONTROLLER_SERVICE = "permission_controller";
5128
5129 /**
5130 * Official published name of the (internal) permission checker service.
5131 *
5132 * @see #getSystemService(String)
5133 * @hide
5134 */
5135 public static final String PERMISSION_CHECKER_SERVICE = "permission_checker";
5136
5137 /**
5138 * Use with {@link #getSystemService(String) to retrieve an
5139 * {@link android.apphibernation.AppHibernationManager}} for
5140 * communicating with the hibernation service.
5141 * @hide
5142 *
5143 * @see #getSystemService(String)
5144 */
5145 @SystemApi
5146 public static final String APP_HIBERNATION_SERVICE = "app_hibernation";
5147
5148 /**
5149 * Use with {@link #getSystemService(String)} to retrieve an
5150 * {@link android.app.backup.IBackupManager IBackupManager} for communicating
5151 * with the backup mechanism.
5152 * @hide
5153 *
5154 * @see #getSystemService(String)
5155 */
5156 @SystemApi
5157 public static final String BACKUP_SERVICE = "backup";
5158
5159 /**
5160 * Use with {@link #getSystemService(String)} to retrieve an
5161 * {@link android.content.rollback.RollbackManager} for communicating
5162 * with the rollback manager
5163 *
5164 * @see #getSystemService(String)
5165 * @hide
5166 */
5167 @SystemApi
5168 public static final String ROLLBACK_SERVICE = "rollback";
5169
5170 /**
5171 * Use with {@link #getSystemService(String)} to retrieve an
5172 * {@link android.scheduling.RebootReadinessManager} for communicating
5173 * with the reboot readiness detector.
5174 *
5175 * @see #getSystemService(String)
5176 * @hide
5177 */
5178 @SystemApi
5179 public static final String REBOOT_READINESS_SERVICE = "reboot_readiness";
5180
5181 /**
5182 * Use with {@link #getSystemService(String)} to retrieve a
5183 * {@link android.os.DropBoxManager} instance for recording
5184 * diagnostic logs.
5185 * @see #getSystemService(String)
5186 */
5187 public static final String DROPBOX_SERVICE = "dropbox";
5188
5189 /**
5190 * System service name for BinaryTransparencyService. This is used to retrieve measurements
5191 * pertaining to various pre-installed and system binaries on device for the purposes of
5192 * providing transparency to the user.
5193 *
5194 * @hide
5195 */
5196 @SuppressLint("ServiceName")
5197 public static final String BINARY_TRANSPARENCY_SERVICE = "transparency";
5198
5199 /**
5200 * System service name for the DeviceIdleManager.
5201 * @see #getSystemService(String)
5202 * @hide
5203 */
5204 @TestApi
5205 @SuppressLint("ServiceName") // TODO: This should be renamed to DEVICE_IDLE_SERVICE
5206 public static final String DEVICE_IDLE_CONTROLLER = "deviceidle";
5207
5208 /**
5209 * System service name for the PowerWhitelistManager.
5210 *
5211 * @see #getSystemService(String)
5212 * @hide
5213 */
5214 @TestApi
5215 @Deprecated
5216 @SuppressLint("ServiceName")
5217 public static final String POWER_WHITELIST_MANAGER = "power_whitelist";
5218
5219 /**
5220 * System service name for the PowerExemptionManager.
5221 *
5222 * @see #getSystemService(String)
5223 * @hide
5224 */
5225 @TestApi
5226 public static final String POWER_EXEMPTION_SERVICE = "power_exemption";
5227
5228 /**
5229 * Use with {@link #getSystemService(String)} to retrieve a
5230 * {@link android.app.admin.DevicePolicyManager} for working with global
5231 * device policy management.
5232 *
5233 * @see #getSystemService(String)
5234 */
5235 public static final String DEVICE_POLICY_SERVICE = "device_policy";
5236
5237 /**
5238 * Use with {@link #getSystemService(String)} to retrieve a
5239 * {@link android.app.UiModeManager} for controlling UI modes.
5240 *
5241 * @see #getSystemService(String)
5242 */
5243 public static final String UI_MODE_SERVICE = "uimode";
5244
5245 /**
5246 * Use with {@link #getSystemService(String)} to retrieve a
5247 * {@link android.app.DownloadManager} for requesting HTTP downloads.
5248 *
5249 * @see #getSystemService(String)
5250 */
5251 public static final String DOWNLOAD_SERVICE = "download";
5252
5253 /**
5254 * Use with {@link #getSystemService(String)} to retrieve a
5255 * {@link android.os.BatteryManager} for managing battery state.
5256 *
5257 * @see #getSystemService(String)
5258 */
5259 public static final String BATTERY_SERVICE = "batterymanager";
5260
5261 /**
5262 * Use with {@link #getSystemService(String)} to retrieve a
5263 * {@link android.nfc.NfcManager} for using NFC.
5264 *
5265 * @see #getSystemService(String)
5266 */
5267 public static final String NFC_SERVICE = "nfc";
5268
5269 /**
5270 * Use with {@link #getSystemService(String)} to retrieve a
5271 * {@link android.bluetooth.BluetoothManager} for using Bluetooth.
5272 *
5273 * @see #getSystemService(String)
5274 */
5275 public static final String BLUETOOTH_SERVICE = "bluetooth";
5276
5277 /**
5278 * Use with {@link #getSystemService(String)} to retrieve a
5279 * {@link android.net.sip.SipManager} for accessing the SIP related service.
5280 *
5281 * @see #getSystemService(String)
5282 */
5283 /** @hide */
5284 public static final String SIP_SERVICE = "sip";
5285
5286 /**
5287 * Use with {@link #getSystemService(String)} to retrieve a {@link
5288 * android.hardware.usb.UsbManager} for access to USB devices (as a USB host)
5289 * and for controlling this device's behavior as a USB device.
5290 *
5291 * @see #getSystemService(String)
5292 * @see android.hardware.usb.UsbManager
5293 */
5294 public static final String USB_SERVICE = "usb";
5295
5296 /**
5297 * Use with {@link #getSystemService(String)} to retrieve a {@link
5298 * Use with {@link #getSystemService} to retrieve a {@link
5299 * android.debug.AdbManager} for access to ADB debug functions.
5300 *
5301 * @see #getSystemService(String)
5302 * @see android.debug.AdbManager
5303 *
5304 * @hide
5305 */
5306 public static final String ADB_SERVICE = "adb";
5307
5308 /**
5309 * Use with {@link #getSystemService(String)} to retrieve a {@link
5310 * android.hardware.SerialManager} for access to serial ports.
5311 *
5312 * @see #getSystemService(String)
5313 * @see android.hardware.SerialManager
5314 *
5315 * @hide
5316 */
5317 public static final String SERIAL_SERVICE = "serial";
5318
5319 /**
5320 * Use with {@link #getSystemService(String)} to retrieve a
5321 * {@link android.hardware.hdmi.HdmiControlManager} for controlling and managing
5322 * HDMI-CEC protocol.
5323 *
5324 * @see #getSystemService(String)
5325 * @see android.hardware.hdmi.HdmiControlManager
5326 * @hide
5327 */
5328 @SystemApi
5329 public static final String HDMI_CONTROL_SERVICE = "hdmi_control";
5330
5331 /**
5332 * Use with {@link #getSystemService(String)} to retrieve a
5333 * {@link android.hardware.input.InputManager} for interacting with input devices.
5334 *
5335 * @see #getSystemService(String)
5336 * @see android.hardware.input.InputManager
5337 */
5338 public static final String INPUT_SERVICE = "input";
5339
5340 /**
5341 * Use with {@link #getSystemService(String)} to retrieve a
5342 * {@link android.hardware.display.DisplayManager} for interacting with display devices.
5343 *
5344 * @see #getSystemService(String)
5345 * @see android.hardware.display.DisplayManager
5346 */
5347 public static final String DISPLAY_SERVICE = "display";
5348
5349 /**
5350 * Use with {@link #getSystemService(String)} to retrieve a
5351 * {@link android.hardware.display.ColorDisplayManager} for controlling color transforms.
5352 *
5353 * @see #getSystemService(String)
5354 * @see android.hardware.display.ColorDisplayManager
5355 * @hide
5356 */
5357 public static final String COLOR_DISPLAY_SERVICE = "color_display";
5358
5359 /**
5360 * Use with {@link #getSystemService(String)} to retrieve a
5361 * {@link android.os.UserManager} for managing users on devices that support multiple users.
5362 *
5363 * @see #getSystemService(String)
5364 * @see android.os.UserManager
5365 */
5366 public static final String USER_SERVICE = "user";
5367
5368 /**
5369 * Use with {@link #getSystemService(String)} to retrieve a
5370 * {@link android.content.pm.LauncherApps} for querying and monitoring launchable apps across
5371 * profiles of a user.
5372 *
5373 * @see #getSystemService(String)
5374 * @see android.content.pm.LauncherApps
5375 */
5376 public static final String LAUNCHER_APPS_SERVICE = "launcherapps";
5377
5378 /**
5379 * Use with {@link #getSystemService(String)} to retrieve a
5380 * {@link android.content.RestrictionsManager} for retrieving application restrictions
5381 * and requesting permissions for restricted operations.
5382 * @see #getSystemService(String)
5383 * @see android.content.RestrictionsManager
5384 */
5385 public static final String RESTRICTIONS_SERVICE = "restrictions";
5386
5387 /**
5388 * Use with {@link #getSystemService(String)} to retrieve a
5389 * {@link android.app.AppOpsManager} for tracking application operations
5390 * on the device.
5391 *
5392 * @see #getSystemService(String)
5393 * @see android.app.AppOpsManager
5394 */
5395 public static final String APP_OPS_SERVICE = "appops";
5396
5397 /**
5398 * Use with {@link #getSystemService(String)} to retrieve a {@link android.app.role.RoleManager}
5399 * for managing roles.
5400 *
5401 * @see #getSystemService(String)
5402 * @see android.app.role.RoleManager
5403 */
5404 public static final String ROLE_SERVICE = "role";
5405
5406 /**
5407 * Use with {@link #getSystemService(String)} to retrieve a
5408 * {@link android.hardware.camera2.CameraManager} for interacting with
5409 * camera devices.
5410 *
5411 * @see #getSystemService(String)
5412 * @see android.hardware.camera2.CameraManager
5413 */
5414 public static final String CAMERA_SERVICE = "camera";
5415
5416 /**
5417 * {@link android.print.PrintManager} for printing and managing
5418 * printers and print tasks.
5419 *
5420 * @see #getSystemService(String)
5421 * @see android.print.PrintManager
5422 */
5423 public static final String PRINT_SERVICE = "print";
5424
5425 /**
5426 * Use with {@link #getSystemService(String)} to retrieve a
5427 * {@link android.companion.CompanionDeviceManager} for managing companion devices
5428 *
5429 * @see #getSystemService(String)
5430 * @see android.companion.CompanionDeviceManager
5431 */
5432 public static final String COMPANION_DEVICE_SERVICE = "companiondevice";
5433
5434 /**
5435 * Use with {@link #getSystemService(String)} to retrieve a
5436 * {@link android.companion.virtual.VirtualDeviceManager} for managing virtual devices.
5437 *
5438 * @see #getSystemService(String)
5439 * @see android.companion.virtual.VirtualDeviceManager
5440 * @hide
5441 */
5442 public static final String VIRTUAL_DEVICE_SERVICE = "virtualdevice";
5443
5444 /**
5445 * Use with {@link #getSystemService(String)} to retrieve a
5446 * {@link android.hardware.ConsumerIrManager} for transmitting infrared
5447 * signals from the device.
5448 *
5449 * @see #getSystemService(String)
5450 * @see android.hardware.ConsumerIrManager
5451 */
5452 public static final String CONSUMER_IR_SERVICE = "consumer_ir";
5453
5454 /**
5455 * {@link android.app.trust.TrustManager} for managing trust agents.
5456 * @see #getSystemService(String)
5457 * @see android.app.trust.TrustManager
5458 * @hide
5459 */
5460 public static final String TRUST_SERVICE = "trust";
5461
5462 /**
5463 * Use with {@link #getSystemService(String)} to retrieve a
5464 * {@link android.media.tv.interactive.TvInteractiveAppManager} for interacting with TV
5465 * interactive applications on the device.
5466 *
5467 * @see #getSystemService(String)
5468 * @see android.media.tv.interactive.TvInteractiveAppManager
5469 */
5470 public static final String TV_INTERACTIVE_APP_SERVICE = "tv_interactive_app";
5471
5472 /**
5473 * Use with {@link #getSystemService(String)} to retrieve a
5474 * {@link android.media.tv.TvInputManager} for interacting with TV inputs
5475 * on the device.
5476 *
5477 * @see #getSystemService(String)
5478 * @see android.media.tv.TvInputManager
5479 */
5480 public static final String TV_INPUT_SERVICE = "tv_input";
5481
5482 /**
5483 * Use with {@link #getSystemService(String)} to retrieve a
5484 * {@link android.media.tv.TunerResourceManager} for interacting with TV
5485 * tuner resources on the device.
5486 *
5487 * @see #getSystemService(String)
5488 * @see android.media.tv.TunerResourceManager
5489 * @hide
5490 */
5491 public static final String TV_TUNER_RESOURCE_MGR_SERVICE = "tv_tuner_resource_mgr";
5492
5493 /**
5494 * {@link android.net.NetworkScoreManager} for managing network scoring.
5495 * @see #getSystemService(String)
5496 * @see android.net.NetworkScoreManager
5497 * @deprecated see
5498 * <a href="{@docRoot}guide/topics/connectivity/wifi-suggest">Wi-Fi Suggestion API</a>
5499 * for alternative API to propose WiFi networks.
5500 * @hide
5501 */
5502 @SystemApi
5503 @Deprecated
5504 public static final String NETWORK_SCORE_SERVICE = "network_score";
5505
5506 /**
5507 * Use with {@link #getSystemService(String)} to retrieve a {@link
5508 * android.app.usage.UsageStatsManager} for querying device usage stats.
5509 *
5510 * @see #getSystemService(String)
5511 * @see android.app.usage.UsageStatsManager
5512 */
5513 public static final String USAGE_STATS_SERVICE = "usagestats";
5514
5515 /**
5516 * Use with {@link #getSystemService(String)} to retrieve a {@link
5517 * android.app.job.JobScheduler} instance for managing occasional
5518 * background tasks.
5519 * @see #getSystemService(String)
5520 * @see android.app.job.JobScheduler
5521 */
5522 public static final String JOB_SCHEDULER_SERVICE = "jobscheduler";
5523
5524 /**
5525 * Use with {@link #getSystemService(String)} to retrieve a
5526 * {@link android.app.tare.EconomyManager} instance for understanding economic standing.
5527 * @see #getSystemService(String)
5528 * @hide
5529 * @see android.app.tare.EconomyManager
5530 */
5531 public static final String RESOURCE_ECONOMY_SERVICE = "tare";
5532
5533 /**
5534 * Use with {@link #getSystemService(String)} to retrieve a {@link
5535 * android.service.persistentdata.PersistentDataBlockManager} instance
5536 * for interacting with a storage device that lives across factory resets.
5537 *
5538 * @see #getSystemService(String)
5539 * @see android.service.persistentdata.PersistentDataBlockManager
5540 * @hide
5541 */
5542 @SystemApi
5543 public static final String PERSISTENT_DATA_BLOCK_SERVICE = "persistent_data_block";
5544
5545 /**
5546 * Use with {@link #getSystemService(String)} to retrieve a {@link
5547 * android.service.oemlock.OemLockManager} instance for managing the OEM lock.
5548 *
5549 * @see #getSystemService(String)
5550 * @see android.service.oemlock.OemLockManager
5551 * @hide
5552 */
5553 @SystemApi
5554 public static final String OEM_LOCK_SERVICE = "oem_lock";
5555
5556 /**
5557 * Use with {@link #getSystemService(String)} to retrieve a {@link
5558 * android.media.projection.MediaProjectionManager} instance for managing
5559 * media projection sessions.
5560 * @see #getSystemService(String)
5561 * @see android.media.projection.MediaProjectionManager
5562 */
5563 public static final String MEDIA_PROJECTION_SERVICE = "media_projection";
5564
5565 /**
5566 * Use with {@link #getSystemService(String)} to retrieve a
5567 * {@link android.media.midi.MidiManager} for accessing the MIDI service.
5568 *
5569 * @see #getSystemService(String)
5570 */
5571 public static final String MIDI_SERVICE = "midi";
5572
5573
5574 /**
5575 * Use with {@link #getSystemService(String)} to retrieve a
5576 * {@link android.hardware.radio.RadioManager} for accessing the broadcast radio service.
5577 *
5578 * @see #getSystemService(String)
5579 * @hide
5580 */
5581 public static final String RADIO_SERVICE = "broadcastradio";
5582
5583 /**
5584 * Use with {@link #getSystemService(String)} to retrieve a
5585 * {@link android.os.HardwarePropertiesManager} for accessing the hardware properties service.
5586 *
5587 * @see #getSystemService(String)
5588 */
5589 public static final String HARDWARE_PROPERTIES_SERVICE = "hardware_properties";
5590
5591 /**
5592 * Use with {@link #getSystemService(String)} to retrieve a
5593 * {@link android.os.ThermalService} for accessing the thermal service.
5594 *
5595 * @see #getSystemService(String)
5596 * @hide
5597 */
5598 public static final String THERMAL_SERVICE = "thermalservice";
5599
5600 /**
5601 * Use with {@link #getSystemService(String)} to retrieve a
5602 * {@link android.os.PerformanceHintManager} for accessing the performance hinting service.
5603 *
5604 * @see #getSystemService(String)
5605 */
5606 public static final String PERFORMANCE_HINT_SERVICE = "performance_hint";
5607
5608 /**
5609 * Use with {@link #getSystemService(String)} to retrieve a
5610 * {@link android.content.pm.ShortcutManager} for accessing the launcher shortcut service.
5611 *
5612 * @see #getSystemService(String)
5613 * @see android.content.pm.ShortcutManager
5614 */
5615 public static final String SHORTCUT_SERVICE = "shortcut";
5616
5617 /**
5618 * Use with {@link #getSystemService(String)} to retrieve a {@link
5619 * android.hardware.location.ContextHubManager} for accessing context hubs.
5620 *
5621 * @see #getSystemService(String)
5622 * @see android.hardware.location.ContextHubManager
5623 *
5624 * @hide
5625 */
5626 @SystemApi
5627 public static final String CONTEXTHUB_SERVICE = "contexthub";
5628
5629 /**
5630 * Use with {@link #getSystemService(String)} to retrieve a
5631 * {@link android.os.health.SystemHealthManager} for accessing system health (battery, power,
5632 * memory, etc) metrics.
5633 *
5634 * @see #getSystemService(String)
5635 */
5636 public static final String SYSTEM_HEALTH_SERVICE = "systemhealth";
5637
5638 /**
5639 * Gatekeeper Service.
5640 * @hide
5641 */
5642 public static final String GATEKEEPER_SERVICE = "android.service.gatekeeper.IGateKeeperService";
5643
5644 /**
5645 * Service defining the policy for access to device identifiers.
5646 * @hide
5647 */
5648 public static final String DEVICE_IDENTIFIERS_SERVICE = "device_identifiers";
5649
5650 /**
5651 * Service to report a system health "incident"
5652 * @hide
5653 */
5654 public static final String INCIDENT_SERVICE = "incident";
5655
5656 /**
5657 * Service to assist incidentd and dumpstated in reporting status to the user
5658 * and in confirming authorization to take an incident report or bugreport
5659 * @hide
5660 */
5661 public static final String INCIDENT_COMPANION_SERVICE = "incidentcompanion";
5662
5663 /**
5664 * Service to assist {@link android.app.StatsManager} that lives in system server.
5665 * @hide
5666 */
5667 public static final String STATS_MANAGER_SERVICE = "statsmanager";
5668
5669 /**
5670 * Service to assist statsd in obtaining general stats.
5671 * @hide
5672 */
5673 public static final String STATS_COMPANION_SERVICE = "statscompanion";
5674
5675 /**
5676 * Service to assist statsd in logging atoms from bootstrap atoms.
5677 * @hide
5678 */
5679 public static final String STATS_BOOTSTRAP_ATOM_SERVICE = "statsbootstrap";
5680
5681 /**
5682 * Use with {@link #getSystemService(String)} to retrieve an {@link android.app.StatsManager}.
5683 * @hide
5684 */
5685 @SystemApi
5686 public static final String STATS_MANAGER = "stats";
5687
5688 /**
5689 * Use with {@link android.os.ServiceManager.getService()} to retrieve a
5690 * {@link IPlatformCompat} IBinder for communicating with the platform compat service.
5691 * @hide
5692 */
5693 public static final String PLATFORM_COMPAT_SERVICE = "platform_compat";
5694
5695 /**
5696 * Use with {@link android.os.ServiceManager.getService()} to retrieve a
5697 * {@link IPlatformCompatNative} IBinder for native code communicating with the platform compat
5698 * service.
5699 * @hide
5700 */
5701 public static final String PLATFORM_COMPAT_NATIVE_SERVICE = "platform_compat_native";
5702
5703 /**
5704 * Service to capture a bugreport.
5705 * @see #getSystemService(String)
5706 * @see android.os.BugreportManager
5707 */
5708 public static final String BUGREPORT_SERVICE = "bugreport";
5709
5710 /**
5711 * Use with {@link #getSystemService(String)} to retrieve a {@link
5712 * android.content.om.OverlayManager} for managing overlay packages.
5713 *
5714 * @see #getSystemService(String)
5715 * @see android.content.om.OverlayManager
5716 * @hide
5717 */
5718 public static final String OVERLAY_SERVICE = "overlay";
5719
5720 /**
5721 * Use with {@link #getSystemService(String)} to manage resources.
5722 *
5723 * @see #getSystemService(String)
5724 * @see com.android.server.resources.ResourcesManagerService
5725 * @hide
5726 */
5727 public static final String RESOURCES_SERVICE = "resources";
5728
5729 /**
5730 * Use with {@link #getSystemService(String)} to retrieve a
5731 * {android.os.IIdmap2} for managing idmap files (used by overlay
5732 * packages).
5733 *
5734 * @see #getSystemService(String)
5735 * @hide
5736 */
5737 public static final String IDMAP_SERVICE = "idmap";
5738
5739 /**
5740 * Use with {@link #getSystemService(String)} to retrieve a
5741 * {@link VrManager} for accessing the VR service.
5742 *
5743 * @see #getSystemService(String)
5744 * @hide
5745 */
5746 @SystemApi
5747 public static final String VR_SERVICE = "vrmanager";
5748
5749 /**
5750 * Use with {@link #getSystemService(String)} to retrieve an
5751 * {@link android.app.timezone.ITimeZoneRulesManager}.
5752 * @hide
5753 *
5754 * @see #getSystemService(String)
5755 */
5756 public static final String TIME_ZONE_RULES_MANAGER_SERVICE = "timezone";
5757
5758 /**
5759 * Use with {@link #getSystemService(String)} to retrieve a
5760 * {@link android.content.pm.CrossProfileApps} for cross profile operations.
5761 *
5762 * @see #getSystemService(String)
5763 */
5764 public static final String CROSS_PROFILE_APPS_SERVICE = "crossprofileapps";
5765
5766 /**
5767 * Use with {@link #getSystemService} to retrieve a
5768 * {@link android.se.omapi.ISecureElementService}
5769 * for accessing the SecureElementService.
5770 *
5771 * @hide
5772 */
5773 @SystemApi
5774 public static final String SECURE_ELEMENT_SERVICE = "secure_element";
5775
5776 /**
5777 * Use with {@link #getSystemService(String)} to retrieve an
5778 * {@link android.app.timedetector.TimeDetector}.
5779 * @hide
5780 *
5781 * @see #getSystemService(String)
5782 */
5783 public static final String TIME_DETECTOR_SERVICE = "time_detector";
5784
5785 /**
5786 * Use with {@link #getSystemService(String)} to retrieve an
5787 * {@link android.app.timezonedetector.TimeZoneDetector}.
5788 * @hide
5789 *
5790 * @see #getSystemService(String)
5791 */
5792 public static final String TIME_ZONE_DETECTOR_SERVICE = "time_zone_detector";
5793
5794 /**
5795 * Use with {@link #getSystemService(String)} to retrieve an {@link TimeManager}.
5796 * @hide
5797 *
5798 * @see #getSystemService(String)
5799 */
5800 public static final String TIME_MANAGER = "time_manager";
5801
5802 /**
5803 * Binder service name for {@link AppBindingService}.
5804 * @hide
5805 */
5806 public static final String APP_BINDING_SERVICE = "app_binding";
5807
5808 /**
5809 * Use with {@link #getSystemService(String)} to retrieve an
5810 * {@link android.telephony.ims.ImsManager}.
5811 */
5812 public static final String TELEPHONY_IMS_SERVICE = "telephony_ims";
5813
5814 /**
5815 * Use with {@link #getSystemService(String)} to retrieve an
5816 * {@link android.os.SystemConfigManager}.
5817 * @hide
5818 */
5819 @SystemApi
5820 public static final String SYSTEM_CONFIG_SERVICE = "system_config";
5821
5822 /**
5823 * Use with {@link #getSystemService(String)} to retrieve an
5824 * {@link android.telephony.ims.RcsMessageManager}.
5825 * @hide
5826 */
5827 public static final String TELEPHONY_RCS_MESSAGE_SERVICE = "ircsmessage";
5828
5829 /**
5830 * Use with {@link #getSystemService(String)} to retrieve an
5831 * {@link android.os.image.DynamicSystemManager}.
5832 * @hide
5833 */
5834 public static final String DYNAMIC_SYSTEM_SERVICE = "dynamic_system";
5835
5836 /**
5837 * Use with {@link #getSystemService(String)} to retrieve a {@link
5838 * android.app.blob.BlobStoreManager} for contributing and accessing data blobs
5839 * from the blob store maintained by the system.
5840 *
5841 * @see #getSystemService(String)
5842 * @see android.app.blob.BlobStoreManager
5843 */
5844 public static final String BLOB_STORE_SERVICE = "blob_store";
5845
5846 /**
5847 * Use with {@link #getSystemService(String)} to retrieve an
5848 * {@link TelephonyRegistryManager}.
5849 * @hide
5850 */
5851 public static final String TELEPHONY_REGISTRY_SERVICE = "telephony_registry";
5852
5853 /**
5854 * Use with {@link #getSystemService(String)} to retrieve an
5855 * {@link android.os.BatteryStatsManager}.
5856 * @hide
5857 */
5858 @SystemApi
5859 @SuppressLint("ServiceName")
5860 public static final String BATTERY_STATS_SERVICE = "batterystats";
5861
5862 /**
5863 * Use with {@link #getSystemService(String)} to retrieve an
5864 * {@link android.app.appsearch.AppSearchManager} for
5865 * indexing and querying app data managed by the system.
5866 *
5867 * @see #getSystemService(String)
5868 */
5869 public static final String APP_SEARCH_SERVICE = "app_search";
5870
5871 /**
5872 * Use with {@link #getSystemService(String)} to retrieve an
5873 * {@link android.content.integrity.AppIntegrityManager}.
5874 * @hide
5875 */
5876 @SystemApi
5877 public static final String APP_INTEGRITY_SERVICE = "app_integrity";
5878
5879 /**
5880 * Use with {@link #getSystemService(String)} to retrieve an
5881 * {@link android.content.pm.DataLoaderManager}.
5882 * @hide
5883 */
5884 public static final String DATA_LOADER_MANAGER_SERVICE = "dataloader_manager";
5885
5886 /**
5887 * Use with {@link #getSystemService(String)} to retrieve an
5888 * {@link android.os.incremental.IncrementalManager}.
5889 * @hide
5890 */
5891 public static final String INCREMENTAL_SERVICE = "incremental";
5892
5893 /**
5894 * Use with {@link #getSystemService(String)} to retrieve an
5895 * {@link android.security.attestationverification.AttestationVerificationManager}.
5896 * @see #getSystemService(String)
5897 * @see android.security.attestationverification.AttestationVerificationManager
5898 * @hide
5899 */
5900 public static final String ATTESTATION_VERIFICATION_SERVICE = "attestation_verification";
5901
5902 /**
5903 * Use with {@link #getSystemService(String)} to retrieve an
5904 * {@link android.security.FileIntegrityManager}.
5905 * @see #getSystemService(String)
5906 * @see android.security.FileIntegrityManager
5907 */
5908 public static final String FILE_INTEGRITY_SERVICE = "file_integrity";
5909
5910 /**
5911 * Use with {@link #getSystemService(String)} to retrieve a
5912 * {@link android.hardware.lights.LightsManager} for controlling device lights.
5913 *
5914 * @see #getSystemService(String)
5915 * @hide
5916 */
5917 public static final String LIGHTS_SERVICE = "lights";
5918
5919 /**
5920 * Use with {@link #getSystemService(String)} to retrieve a
5921 * {@link android.uwb.UwbManager}.
5922 *
5923 * @see #getSystemService(String)
5924 * @hide
5925 */
5926 @SystemApi
5927 public static final String UWB_SERVICE = "uwb";
5928
5929 /**
5930 * Use with {@link #getSystemService(String)} to retrieve a
5931 * {@link android.app.DreamManager} for controlling Dream states.
5932 *
5933 * @see #getSystemService(String)
5934
5935 * @hide
5936 */
5937 @TestApi
5938 public static final String DREAM_SERVICE = "dream";
5939
5940 /**
5941 * Use with {@link #getSystemService(String)} to retrieve a
5942 * {@link android.telephony.SmsManager} for accessing Sms functionality.
5943 *
5944 * @see #getSystemService(String)
5945
5946 * @hide
5947 */
5948 public static final String SMS_SERVICE = "sms";
5949
5950 /**
5951 * Use with {@link #getSystemService(String)} to access a {@link PeopleManager} to interact
5952 * with your published conversations.
5953 *
5954 * @see #getSystemService(String)
5955 */
5956 public static final String PEOPLE_SERVICE = "people";
5957
5958 /**
5959 * Use with {@link #getSystemService(String)} to access device state service.
5960 *
5961 * @see #getSystemService(String)
5962 * @hide
5963 */
5964 public static final String DEVICE_STATE_SERVICE = "device_state";
5965
5966 /**
5967 * Use with {@link #getSystemService(String)} to retrieve a
5968 * {@link android.media.metrics.MediaMetricsManager} for interacting with media metrics
5969 * on the device.
5970 *
5971 * @see #getSystemService(String)
5972 * @see android.media.metrics.MediaMetricsManager
5973 */
5974 public static final String MEDIA_METRICS_SERVICE = "media_metrics";
5975
5976 /**
5977 * Use with {@link #getSystemService(String)} to access system speech recognition service.
5978 *
5979 * @see #getSystemService(String)
5980 * @hide
5981 */
5982 public static final String SPEECH_RECOGNITION_SERVICE = "speech_recognition";
5983
5984 /**
5985 * Use with {@link #getSystemService(String)} to retrieve a
5986 * {@link GameManager}.
5987 *
5988 * @see #getSystemService(String)
5989 */
5990 public static final String GAME_SERVICE = "game";
5991
5992 /**
5993 * Use with {@link #getSystemService(String)} to access
5994 * {@link android.content.pm.verify.domain.DomainVerificationManager} to retrieve approval and
5995 * user state for declared web domains.
5996 *
5997 * @see #getSystemService(String)
5998 * @see android.content.pm.verify.domain.DomainVerificationManager
5999 */
6000 public static final String DOMAIN_VERIFICATION_SERVICE = "domain_verification";
6001
6002 /**
6003 * Use with {@link #getSystemService(String)} to access
6004 * {@link android.view.displayhash.DisplayHashManager} to handle display hashes.
6005 *
6006 * @see #getSystemService(String)
6007 */
6008 public static final String DISPLAY_HASH_SERVICE = "display_hash";
6009
6010 /**
6011 * Use with {@link #getSystemService(String)} to retrieve a
6012 * {@link android.app.LocaleManager}.
6013 *
6014 * @see #getSystemService(String)
6015 */
6016 public static final String LOCALE_SERVICE = "locale";
6017
6018 /**
6019 * Use with {@link #getSystemService(String)} to retrieve a {@link
6020 * android.safetycenter.SafetyCenterManager} instance for interacting with the safety center.
6021 *
6022 * @see #getSystemService(String)
6023 * @see android.safetycenter.SafetyCenterManager
6024 * @hide
6025 */
6026 @SystemApi
6027 public static final String SAFETY_CENTER_SERVICE = "safety_center";
6028
6029 /**
6030 * Use with {@link #getSystemService(String)} to retrieve a
6031 * {@link android.nearby.NearbyManager} to discover nearby devices.
6032 *
6033 * @see #getSystemService(String)
6034 * @see android.nearby.NearbyManager
6035 * @hide
6036 */
6037 @SystemApi
6038 public static final String NEARBY_SERVICE = "nearby";
6039
6040 /**
6041 * Use with {@link #getSystemService(String)} to retrieve a
6042 * {@link android.app.ambientcontext.AmbientContextManager}.
6043 *
6044 * @see #getSystemService(String)
6045 * @see AmbientContextManager
6046 * @hide
6047 */
6048 @SystemApi
6049 public static final String AMBIENT_CONTEXT_SERVICE = "ambient_context";
3 示例
4 参考资料