1 public abstract Object getSystemService(String name); 2 3 /** 4 * Use with {@link #getSystemService} to retrieve a 5 * {@link android.os.PowerManager} for controlling power management, 6 * including "wake locks," which let you keep the device on while 7 * you‘re running long tasks. 8 */ 9 public static final String POWER_SERVICE = "power"; 10 11 /** 12 * Use with {@link #getSystemService} to retrieve a 13 * {@link android.view.WindowManager} for accessing the system‘s window 14 * manager. 15 * 16 * @see #getSystemService 17 * @see android.view.WindowManager 18 */ 19 public static final String WINDOW_SERVICE = "window"; 20 21 /** 22 * Use with {@link #getSystemService} to retrieve a 23 * {@link android.view.LayoutInflater} for inflating layout resources in this 24 * context. 25 * 26 * @see #getSystemService 27 * @see android.view.LayoutInflater 28 */ 29 public static final String LAYOUT_INFLATER_SERVICE = "layout_inflater"; 30 31 /** 32 * Use with {@link #getSystemService} to retrieve a 33 * {@link android.accounts.AccountManager} for receiving intents at a 34 * time of your choosing. 35 * 36 * @see #getSystemService 37 * @see android.accounts.AccountManager 38 */ 39 public static final String ACCOUNT_SERVICE = "account"; 40 41 /** 42 * Use with {@link #getSystemService} to retrieve a 43 * {@link android.app.ActivityManager} for interacting with the global 44 * system state. 45 * 46 * @see #getSystemService 47 * @see android.app.ActivityManager 48 */ 49 public static final String ACTIVITY_SERVICE = "activity"; 50 51 /** 52 * Use with {@link #getSystemService} to retrieve a 53 * {@link android.app.AlarmManager} for receiving intents at a 54 * time of your choosing. 55 * 56 * @see #getSystemService 57 * @see android.app.AlarmManager 58 */ 59 public static final String ALARM_SERVICE = "alarm"; 60 61 /** 62 * Use with {@link #getSystemService} to retrieve a 63 * {@link android.app.NotificationManager} for informing the user of 64 * background events. 65 * 66 * @see #getSystemService 67 * @see android.app.NotificationManager 68 */ 69 public static final String NOTIFICATION_SERVICE = "notification"; 70 71 /** 72 * Use with {@link #getSystemService} to retrieve a 73 * {@link android.view.accessibility.AccessibilityManager} for giving the user 74 * feedback for UI events through the registered event listeners. 75 * 76 * @see #getSystemService 77 * @see android.view.accessibility.AccessibilityManager 78 */ 79 public static final String ACCESSIBILITY_SERVICE = "accessibility"; 80 81 /** 82 * Use with {@link #getSystemService} to retrieve a 83 * {@link android.app.NotificationManager} for controlling keyguard. 84 * 85 * @see #getSystemService 86 * @see android.app.KeyguardManager 87 */ 88 public static final String KEYGUARD_SERVICE = "keyguard"; 89 90 /** 91 * Use with {@link #getSystemService} to retrieve a {@link 92 * android.location.LocationManager} for controlling location 93 * updates. 94 * 95 * @see #getSystemService 96 * @see android.location.LocationManager 97 */ 98 public static final String LOCATION_SERVICE = "location"; 99 100 /** 101 * Use with {@link #getSystemService} to retrieve a 102 * {@link android.location.CountryDetector} for detecting the country that 103 * the user is in. 104 * 105 * @hide 106 */ 107 public static final String COUNTRY_DETECTOR = "country_detector"; 108 109 /** 110 * Use with {@link #getSystemService} to retrieve a {@link 111 * android.app.SearchManager} for handling searches. 112 * 113 * @see #getSystemService 114 * @see android.app.SearchManager 115 */ 116 public static final String SEARCH_SERVICE = "search"; 117 118 /** 119 * Use with {@link #getSystemService} to retrieve a {@link 120 * android.hardware.SensorManager} for accessing sensors. 121 * 122 * @see #getSystemService 123 * @see android.hardware.SensorManager 124 */ 125 public static final String SENSOR_SERVICE = "sensor"; 126 127 /** 128 * Use with {@link #getSystemService} to retrieve a {@link 129 * android.os.storage.StorageManager} for accessing system storage 130 * functions. 131 * 132 * @see #getSystemService 133 * @see android.os.storage.StorageManager 134 */ 135 public static final String STORAGE_SERVICE = "storage"; 136 137 /** 138 * Use with {@link #getSystemService} to retrieve a 139 * com.android.server.WallpaperService for accessing wallpapers. 140 * 141 * @see #getSystemService 142 */ 143 public static final String WALLPAPER_SERVICE = "wallpaper"; 144 145 /** 146 * Use with {@link #getSystemService} to retrieve a {@link 147 * android.os.Vibrator} for interacting with the vibration hardware. 148 * 149 * @see #getSystemService 150 * @see android.os.Vibrator 151 */ 152 public static final String VIBRATOR_SERVICE = "vibrator"; 153 154 /** 155 * Use with {@link #getSystemService} to retrieve a {@link 156 * android.app.StatusBarManager} for interacting with the status bar. 157 * 158 * @see #getSystemService 159 * @see android.app.StatusBarManager 160 * @hide 161 */ 162 public static final String STATUS_BAR_SERVICE = "statusbar"; 163 164 /** 165 * Use with {@link #getSystemService} to retrieve a {@link 166 * android.net.ConnectivityManager} for handling management of 167 * network connections. 168 * 169 * @see #getSystemService 170 * @see android.net.ConnectivityManager 171 */ 172 public static final String CONNECTIVITY_SERVICE = "connectivity"; 173 174 /** 175 * Use with {@link #getSystemService} to retrieve a {@link 176 * android.net.ThrottleManager} for handling management of 177 * throttling. 178 * 179 * @hide 180 * @see #getSystemService 181 * @see android.net.ThrottleManager 182 */ 183 public static final String THROTTLE_SERVICE = "throttle"; 184 185 /** 186 * Use with {@link #getSystemService} to retrieve a {@link 187 * android.os.IUpdateLock} for managing runtime sequences that 188 * must not be interrupted by headless OTA application or similar. 189 * 190 * @hide 191 * @see #getSystemService 192 * @see android.os.UpdateLock 193 */ 194 public static final String UPDATE_LOCK_SERVICE = "updatelock"; 195 196 /** 197 * Use with {@link #getSystemService} to retrieve a {@link 198 * android.net.NetworkManagementService} for handling management of 199 * system network services 200 * 201 * @hide 202 * @see #getSystemService 203 * @see android.net.NetworkManagementService 204 */ 205 public static final String NETWORKMANAGEMENT_SERVICE = "network_management"; 206 207 /** {@hide} */ 208 public static final String NETWORK_STATS_SERVICE = "netstats"; 209 /** {@hide} */ 210 public static final String NETWORK_POLICY_SERVICE = "netpolicy"; 211 212 /** 213 * Use with {@link #getSystemService} to retrieve a {@link 214 * android.net.wifi.WifiManager} for handling management of 215 * Wi-Fi access. 216 * 217 * @see #getSystemService 218 * @see android.net.wifi.WifiManager 219 */ 220 public static final String WIFI_SERVICE = "wifi"; 221 222 /** 223 * Use with {@link #getSystemService} to retrieve a {@link 224 * android.net.wifi.p2p.WifiP2pManager} for handling management of 225 * Wi-Fi peer-to-peer connections. 226 * 227 * @see #getSystemService 228 * @see android.net.wifi.p2p.WifiP2pManager 229 */ 230 public static final String WIFI_P2P_SERVICE = "wifip2p"; 231 232 /** 233 * Use with {@link #getSystemService} to retrieve a {@link 234 * android.net.nsd.NsdManager} for handling management of network service 235 * discovery 236 * 237 * @see #getSystemService 238 * @see android.net.nsd.NsdManager 239 */ 240 public static final String NSD_SERVICE = "servicediscovery"; 241 242 /** 243 * Use with {@link #getSystemService} to retrieve a 244 * {@link android.media.AudioManager} for handling management of volume, 245 * ringer modes and audio routing. 246 * 247 * @see #getSystemService 248 * @see android.media.AudioManager 249 */ 250 public static final String AUDIO_SERVICE = "audio"; 251 252 /** 253 * Use with {@link #getSystemService} to retrieve a 254 * {@link android.media.MediaRouter} for controlling and managing 255 * routing of media. 256 * 257 * @see #getSystemService 258 * @see android.media.MediaRouter 259 */ 260 public static final String MEDIA_ROUTER_SERVICE = "media_router"; 261 262 /** 263 * Use with {@link #getSystemService} to retrieve a 264 * {@link android.telephony.TelephonyManager} for handling management the 265 * telephony features of the device. 266 * 267 * @see #getSystemService 268 * @see android.telephony.TelephonyManager 269 */ 270 public static final String TELEPHONY_SERVICE = "phone"; 271 272 /** 273 * Use with {@link #getSystemService} to retrieve a 274 * {@link android.text.ClipboardManager} for accessing and modifying 275 * the contents of the global clipboard. 276 * 277 * @see #getSystemService 278 * @see android.text.ClipboardManager 279 */ 280 public static final String CLIPBOARD_SERVICE = "clipboard"; 281 282 /** 283 * Use with {@link #getSystemService} to retrieve a 284 * {@link android.view.inputmethod.InputMethodManager} for accessing input 285 * methods. 286 * 287 * @see #getSystemService 288 */ 289 public static final String INPUT_METHOD_SERVICE = "input_method"; 290 291 /** 292 * Use with {@link #getSystemService} to retrieve a 293 * {@link android.view.textservice.TextServicesManager} for accessing 294 * text services. 295 * 296 * @see #getSystemService 297 */ 298 public static final String TEXT_SERVICES_MANAGER_SERVICE = "textservices"; 299 300 /** 301 * Use with {@link #getSystemService} to retrieve a 302 * {@link android.appwidget.AppWidgetManager} for accessing AppWidgets. 303 * 304 * @hide 305 * @see #getSystemService 306 */ 307 public static final String APPWIDGET_SERVICE = "appwidget"; 308 309 /** 310 * Use with {@link #getSystemService} to retrieve an 311 * {@link android.app.backup.IBackupManager IBackupManager} for communicating 312 * with the backup mechanism. 313 * @hide 314 * 315 * @see #getSystemService 316 */ 317 public static final String BACKUP_SERVICE = "backup"; 318 319 /** 320 * Use with {@link #getSystemService} to retrieve a 321 * {@link android.os.DropBoxManager} instance for recording 322 * diagnostic logs. 323 * @see #getSystemService 324 */ 325 public static final String DROPBOX_SERVICE = "dropbox"; 326 327 /** 328 * Use with {@link #getSystemService} to retrieve a 329 * {@link android.app.admin.DevicePolicyManager} for working with global 330 * device policy management. 331 * 332 * @see #getSystemService 333 */ 334 public static final String DEVICE_POLICY_SERVICE = "device_policy"; 335 336 /** 337 * Use with {@link #getSystemService} to retrieve a 338 * {@link android.app.UiModeManager} for controlling UI modes. 339 * 340 * @see #getSystemService 341 */ 342 public static final String UI_MODE_SERVICE = "uimode"; 343 344 /** 345 * Use with {@link #getSystemService} to retrieve a 346 * {@link android.app.DownloadManager} for requesting HTTP downloads. 347 * 348 * @see #getSystemService 349 */ 350 public static final String DOWNLOAD_SERVICE = "download"; 351 352 /** 353 * Use with {@link #getSystemService} to retrieve a 354 * {@link android.nfc.NfcManager} for using NFC. 355 * 356 * @see #getSystemService 357 */ 358 public static final String NFC_SERVICE = "nfc"; 359 360 /** 361 * Use with {@link #getSystemService} to retrieve a 362 * {@link android.bluetooth.BluetoothAdapter} for using Bluetooth. 363 * 364 * @see #getSystemService 365 * @hide 366 */ 367 public static final String BLUETOOTH_SERVICE = "bluetooth"; 368 369 /** 370 * Use with {@link #getSystemService} to retrieve a 371 * {@link android.net.sip.SipManager} for accessing the SIP related service. 372 * 373 * @see #getSystemService 374 */ 375 /** @hide */ 376 public static final String SIP_SERVICE = "sip"; 377 378 /** 379 * Use with {@link #getSystemService} to retrieve a {@link 380 * android.hardware.usb.UsbManager} for access to USB devices (as a USB host) 381 * and for controlling this device‘s behavior as a USB device. 382 * 383 * @see #getSystemService 384 * @see android.harware.usb.UsbManager 385 */ 386 public static final String USB_SERVICE = "usb"; 387 388 /** 389 * Use with {@link #getSystemService} to retrieve a {@link 390 * android.hardware.SerialManager} for access to serial ports. 391 * 392 * @see #getSystemService 393 * @see android.harware.SerialManager 394 * 395 * @hide 396 */ 397 public static final String SERIAL_SERVICE = "serial"; 398 399 /** 400 * Use with {@link #getSystemService} to retrieve a 401 * {@link android.hardware.input.InputManager} for interacting with input devices. 402 * 403 * @see #getSystemService 404 * @see android.hardware.input.InputManager 405 */ 406 public static final String INPUT_SERVICE = "input"; 407 408 /** 409 * Use with {@link #getSystemService} to retrieve a 410 * {@link android.hardware.display.DisplayManager} for interacting with display devices. 411 * 412 * @see #getSystemService 413 * @see android.hardware.display.DisplayManager 414 */ 415 public static final String DISPLAY_SERVICE = "display"; 416 417 /** 418 * Use with {@link #getSystemService} to retrieve a 419 * {@link android.os.SchedulingPolicyService} for managing scheduling policy. 420 * 421 * @see #getSystemService 422 * @see android.os.SchedulingPolicyService 423 * 424 * @hide 425 */ 426 public static final String SCHEDULING_POLICY_SERVICE = "scheduling_policy"; 427 428 /** 429 * Use with {@link #getSystemService} to retrieve a 430 * {@link android.os.UserManager} for managing users on devices that support multiple users. 431 * 432 * @see #getSystemService 433 * @see android.os.UserManager 434 */ 435 public static final String USER_SERVICE = "user";
from context.class
时间: 2024-10-06 22:22:20