public final class MediaProjectionManagerService extends SystemService implements Watchdog.Monitor
MediaProjectionManagerService
manages the creation and lifetime of MediaProjections,
as well as the capabilities they grant. Any service using MediaProjection tokens as permission
grants must validate the token before use by calling IMediaProjectionService#isValidMediaProjection
.PHASE_ACTIVITY_MANAGER_READY, PHASE_BOOT_COMPLETED, PHASE_LOCK_SETTINGS_READY, PHASE_SYSTEM_SERVICES_READY, PHASE_THIRD_PARTY_APPS_CAN_START, PHASE_WAIT_FOR_DEFAULT_DISPLAY
Constructor and Description |
---|
MediaProjectionManagerService(Context context) |
Modifier and Type | Method and Description |
---|---|
void |
monitor() |
void |
onStart()
Called when the dependencies listed in the @Service class-annotation are available
and after the chosen start phase.
|
void |
onSwitchUser(int userId)
Called when switching to a different foreground user, for system services that have
special behavior for whichever user is currently in the foreground.
|
getBinderService, getContext, getLocalService, isSafeMode, onBootPhase, onCleanupUser, onStartUser, onStopUser, onUnlockUser, publishBinderService, publishBinderService, publishLocalService
public MediaProjectionManagerService(Context context)
public void onStart()
SystemService
onStart
in class SystemService
public void onSwitchUser(int userId)
SystemService
onSwitchUser
in class SystemService
userId
- The identifier of the user.public void monitor()
monitor
in interface Watchdog.Monitor