public final class ActivityManagerService extends ActivityManagerNative implements Watchdog.Monitor, BatteryStatsImpl.BatteryCallback
Modifier and Type | Class and Description |
---|---|
static class |
ActivityManagerService.GrantUri |
static class |
ActivityManagerService.Lifecycle |
class |
ActivityManagerService.PendingAssistExtras |
IActivityManager.ContentProviderHolder, IActivityManager.WaitResult
IBinder.DeathRecipient
Modifier and Type | Field and Description |
---|---|
static String |
ACTION_TRIGGER_IDLE |
static float |
FULLSCREEN_SCREENSHOT_SCALE |
IntentFirewall |
mIntentFirewall |
LOG_RUNTIME_EXCEPTION
ACTIVITY_DESTROYED_TRANSACTION, ACTIVITY_IDLE_TRANSACTION, ACTIVITY_PAUSED_TRANSACTION, ACTIVITY_RELAUNCHED_TRANSACTION, ACTIVITY_RESUMED_TRANSACTION, ACTIVITY_SLEPT_TRANSACTION, ACTIVITY_STOPPED_TRANSACTION, ADD_APP_TASK_TRANSACTION, ADD_PACKAGE_DEPENDENCY_TRANSACTION, APP_NOT_RESPONDING_VIA_PROVIDER_TRANSACTION, ATTACH_APPLICATION_TRANSACTION, BACKGROUND_RESOURCES_RELEASED_TRANSACTION, BACKUP_AGENT_CREATED_TRANSACTION, BIND_SERVICE_TRANSACTION, BOOT_ANIMATION_COMPLETE_TRANSACTION, BROADCAST_INTENT_TRANSACTION, CAN_BYPASS_WORK_CHALLENGE, CANCEL_INTENT_SENDER_TRANSACTION, CHECK_GRANT_URI_PERMISSION_TRANSACTION, CHECK_PERMISSION_TRANSACTION, CHECK_PERMISSION_WITH_TOKEN_TRANSACTION, CHECK_URI_PERMISSION_TRANSACTION, CLEAR_APP_DATA_TRANSACTION, CLEAR_GRANTED_URI_PERMISSIONS_TRANSACTION, CLEAR_PENDING_BACKUP_TRANSACTION, CLOSE_SYSTEM_DIALOGS_TRANSACTION, CONVERT_FROM_TRANSLUCENT_TRANSACTION, CONVERT_TO_TRANSLUCENT_TRANSACTION, CRASH_APPLICATION_TRANSACTION, CREATE_STACK_ON_DISPLAY, CREATE_VIRTUAL_ACTIVITY_CONTAINER_TRANSACTION, DELETE_ACTIVITY_CONTAINER_TRANSACTION, descriptor, DUMP_HEAP_FINISHED_TRANSACTION, DUMP_HEAP_TRANSACTION, ENTER_PICTURE_IN_PICTURE_TRANSACTION, ENTER_SAFE_MODE_TRANSACTION, EXIT_FREEFORM_MODE_TRANSACTION, FINISH_ACTIVITY_AFFINITY_TRANSACTION, FINISH_ACTIVITY_TRANSACTION, FINISH_HEAVY_WEIGHT_APP_TRANSACTION, FINISH_INSTRUMENTATION_TRANSACTION, FINISH_RECEIVER_TRANSACTION, FINISH_SUB_ACTIVITY_TRANSACTION, FINISH_VOICE_TASK_TRANSACTION, FORCE_STOP_PACKAGE_TRANSACTION, GET_ACTIVITY_CLASS_FOR_TOKEN_TRANSACTION, GET_ACTIVITY_DISPLAY_ID_TRANSACTION, GET_ACTIVITY_OPTIONS_TRANSACTION, GET_ACTIVITY_STACK_ID_TRANSACTION, GET_ALL_STACK_INFOS_TRANSACTION, GET_APP_START_MODE_TRANSACTION, GET_APP_TASK_THUMBNAIL_SIZE_TRANSACTION, GET_APP_TASKS_TRANSACTION, GET_ASSIST_CONTEXT_EXTRAS_TRANSACTION, GET_CALLING_ACTIVITY_TRANSACTION, GET_CALLING_PACKAGE_TRANSACTION, GET_CONFIGURATION_TRANSACTION, GET_CONTENT_PROVIDER_EXTERNAL_TRANSACTION, GET_CONTENT_PROVIDER_TRANSACTION, GET_CURRENT_USER_TRANSACTION, GET_DEVICE_CONFIGURATION_TRANSACTION, GET_FOCUSED_STACK_ID_TRANSACTION, GET_FRONT_ACTIVITY_SCREEN_COMPAT_MODE_TRANSACTION, GET_GRANTED_URI_PERMISSIONS_TRANSACTION, GET_INTENT_FOR_INTENT_SENDER_TRANSACTION, GET_INTENT_SENDER_TRANSACTION, GET_LAUNCHED_FROM_PACKAGE_TRANSACTION, GET_LAUNCHED_FROM_UID_TRANSACTION, GET_LOCK_TASK_MODE_STATE_TRANSACTION, GET_MEMORY_INFO_TRANSACTION, GET_MEMORY_TRIM_LEVEL_TRANSACTION, GET_MY_MEMORY_STATE_TRANSACTION, GET_PACKAGE_ASK_SCREEN_COMPAT_TRANSACTION, GET_PACKAGE_FOR_INTENT_SENDER_TRANSACTION, GET_PACKAGE_FOR_TOKEN_TRANSACTION, GET_PACKAGE_PROCESS_STATE_TRANSACTION, GET_PACKAGE_SCREEN_COMPAT_MODE_TRANSACTION, GET_PERSISTED_URI_PERMISSIONS_TRANSACTION, GET_PROCESS_LIMIT_TRANSACTION, GET_PROCESS_MEMORY_INFO_TRANSACTION, GET_PROCESS_PSS_TRANSACTION, GET_PROCESSES_IN_ERROR_STATE_TRANSACTION, GET_PROVIDER_MIME_TYPE_TRANSACTION, GET_RECENT_TASKS_TRANSACTION, GET_REQUESTED_ORIENTATION_TRANSACTION, GET_RUNNING_APP_PROCESSES_TRANSACTION, GET_RUNNING_EXTERNAL_APPLICATIONS_TRANSACTION, GET_RUNNING_SERVICE_CONTROL_PANEL_TRANSACTION, GET_RUNNING_USER_IDS_TRANSACTION, GET_SERVICES_TRANSACTION, GET_STACK_INFO_TRANSACTION, GET_TAG_FOR_INTENT_SENDER_TRANSACTION, GET_TASK_BOUNDS_TRANSACTION, GET_TASK_DESCRIPTION_ICON_TRANSACTION, GET_TASK_FOR_ACTIVITY_TRANSACTION, GET_TASK_THUMBNAIL_TRANSACTION, GET_TASKS_TRANSACTION, GET_UID_FOR_INTENT_SENDER_TRANSACTION, GET_URI_PERMISSION_OWNER_FOR_ACTIVITY_TRANSACTION, GRANT_URI_PERMISSION_FROM_OWNER_TRANSACTION, GRANT_URI_PERMISSION_TRANSACTION, HANDLE_APPLICATION_CRASH_TRANSACTION, HANDLE_APPLICATION_STRICT_MODE_VIOLATION_TRANSACTION, HANDLE_APPLICATION_WTF_TRANSACTION, HANDLE_INCOMING_USER_TRANSACTION, HANG_TRANSACTION, IN_MULTI_WINDOW_TRANSACTION, IN_PICTURE_IN_PICTURE_TRANSACTION, INPUT_DISPATCHING_TIMED_OUT_TRANSACTION, IS_APP_FOREGROUND_TRANSACTION, IS_BACKGROUND_VISIBLE_BEHIND_TRANSACTION, IS_IMMERSIVE_TRANSACTION, IS_IN_HOME_STACK_TRANSACTION, IS_IN_LOCK_TASK_MODE_TRANSACTION, IS_INTENT_SENDER_AN_ACTIVITY_TRANSACTION, IS_INTENT_SENDER_TARGETED_TO_PACKAGE_TRANSACTION, IS_ROOT_VOICE_INTERACTION_TRANSACTION, IS_SCREEN_CAPTURE_ALLOWED_ON_CURRENT_ACTIVITY_TRANSACTION, IS_TOP_ACTIVITY_IMMERSIVE_TRANSACTION, IS_TOP_OF_TASK_TRANSACTION, IS_USER_A_MONKEY_TRANSACTION, IS_USER_RUNNING_TRANSACTION, IS_VR_PACKAGE_ENABLED_TRANSACTION, KEYGUARD_GOING_AWAY_TRANSACTION, KEYGUARD_WAITING_FOR_ACTIVITY_DRAWN_TRANSACTION, KILL_ALL_BACKGROUND_PROCESSES_TRANSACTION, KILL_APPLICATION_PROCESS_TRANSACTION, KILL_APPLICATION_TRANSACTION, KILL_BACKGROUND_PROCESSES_TRANSACTION, KILL_PACKAGE_DEPENDENTS_TRANSACTION, KILL_PIDS_TRANSACTION, KILL_PROCESSES_BELOW_FOREGROUND_TRANSACTION, KILL_UID_TRANSACTION, LAUNCH_ASSIST_INTENT_TRANSACTION, MOVE_ACTIVITY_TASK_TO_BACK_TRANSACTION, MOVE_TASK_BACKWARDS_TRANSACTION, MOVE_TASK_TO_DOCKED_STACK_TRANSACTION, MOVE_TASK_TO_FRONT_TRANSACTION, MOVE_TASK_TO_STACK_TRANSACTION, MOVE_TASKS_TO_FULLSCREEN_STACK_TRANSACTION, MOVE_TOP_ACTIVITY_TO_PINNED_STACK_TRANSACTION, NAVIGATE_UP_TO_TRANSACTION, NEW_URI_PERMISSION_OWNER_TRANSACTION, NOTE_ALARM_FINISH_TRANSACTION, NOTE_ALARM_START_TRANSACTION, NOTE_WAKEUP_ALARM_TRANSACTION, NOTIFY_ACTIVITY_DRAWN_TRANSACTION, NOTIFY_CLEARTEXT_NETWORK_TRANSACTION, NOTIFY_ENTER_ANIMATION_COMPLETE_TRANSACTION, NOTIFY_LAUNCH_TASK_BEHIND_COMPLETE_TRANSACTION, NOTIFY_LOCKED_PROFILE, NOTIFY_PINNED_STACK_ANIMATION_ENDED_TRANSACTION, OPEN_CONTENT_URI_TRANSACTION, OVERRIDE_PENDING_TRANSITION_TRANSACTION, PEEK_SERVICE_TRANSACTION, PERFORM_IDLE_MAINTENANCE_TRANSACTION, POSITION_TASK_IN_STACK_TRANSACTION, PROFILE_CONTROL_TRANSACTION, PUBLISH_CONTENT_PROVIDERS_TRANSACTION, PUBLISH_SERVICE_TRANSACTION, REF_CONTENT_PROVIDER_TRANSACTION, REGISTER_PROCESS_OBSERVER_TRANSACTION, REGISTER_RECEIVER_TRANSACTION, REGISTER_TASK_STACK_LISTENER_TRANSACTION, REGISTER_UID_OBSERVER_TRANSACTION, REGISTER_USER_SWITCH_OBSERVER_TRANSACTION, RELEASE_ACTIVITY_INSTANCE_TRANSACTION, RELEASE_PERSISTABLE_URI_PERMISSION_TRANSACTION, RELEASE_SOME_ACTIVITIES_TRANSACTION, REMOVE_CONTENT_PROVIDER_EXTERNAL_TRANSACTION, REMOVE_CONTENT_PROVIDER_TRANSACTION, REMOVE_STACK, REMOVE_TASK_TRANSACTION, REPORT_ACTIVITY_FULLY_DRAWN_TRANSACTION, REPORT_ASSIST_CONTEXT_EXTRAS_TRANSACTION, REPORT_SIZE_CONFIGURATIONS, REQUEST_ASSIST_CONTEXT_EXTRAS_TRANSACTION, REQUEST_BUG_REPORT_TRANSACTION, REQUEST_VISIBLE_BEHIND_TRANSACTION, RESIZE_DOCKED_STACK_TRANSACTION, RESIZE_PINNED_STACK_TRANSACTION, RESIZE_STACK_TRANSACTION, RESIZE_TASK_TRANSACTION, RESTART_TRANSACTION, RESUME_APP_SWITCHES_TRANSACTION, REVOKE_URI_PERMISSION_FROM_OWNER_TRANSACTION, REVOKE_URI_PERMISSION_TRANSACTION, SEND_IDLE_JOB_TRIGGER_TRANSACTION, SEND_INTENT_SENDER_TRANSACTION, SERVICE_DONE_EXECUTING_TRANSACTION, SET_ACTIVITY_CONTROLLER_TRANSACTION, SET_ALWAYS_FINISH_TRANSACTION, SET_DEBUG_APP_TRANSACTION, SET_DUMP_HEAP_DEBUG_LIMIT_TRANSACTION, SET_FOCUSED_STACK_TRANSACTION, SET_FOCUSED_TASK_TRANSACTION, SET_FRONT_ACTIVITY_SCREEN_COMPAT_MODE_TRANSACTION, SET_HAS_TOP_UI, SET_IMMERSIVE_TRANSACTION, SET_LENIENT_BACKGROUND_CHECK_TRANSACTION, SET_LOCK_SCREEN_SHOWN_TRANSACTION, SET_PACKAGE_ASK_SCREEN_COMPAT_TRANSACTION, SET_PACKAGE_SCREEN_COMPAT_MODE_TRANSACTION, SET_PROCESS_FOREGROUND_TRANSACTION, SET_PROCESS_LIMIT_TRANSACTION, SET_PROCESS_MEMORY_TRIM_TRANSACTION, SET_RENDER_THREAD_TRANSACTION, SET_REQUESTED_ORIENTATION_TRANSACTION, SET_SERVICE_FOREGROUND_TRANSACTION, SET_TASK_DESCRIPTION_TRANSACTION, SET_TASK_RESIZEABLE_TRANSACTION, SET_USER_IS_MONKEY_TRANSACTION, SET_VOICE_KEEP_AWAKE_TRANSACTION, SET_VR_MODE_TRANSACTION, SET_VR_THREAD_TRANSACTION, SHOULD_UP_RECREATE_TASK_TRANSACTION, SHOW_ASSIST_FROM_ACTIVITY_TRANSACTION, SHOW_BOOT_MESSAGE_TRANSACTION, SHOW_LOCK_TASK_ESCAPE_MESSAGE_TRANSACTION, SHOW_WAITING_FOR_DEBUGGER_TRANSACTION, SHUTDOWN_TRANSACTION, SIGNAL_PERSISTENT_PROCESSES_TRANSACTION, START_ACTIVITIES_TRANSACTION, START_ACTIVITY_AND_WAIT_TRANSACTION, START_ACTIVITY_AS_CALLER_TRANSACTION, START_ACTIVITY_AS_USER_TRANSACTION, START_ACTIVITY_FROM_RECENTS_TRANSACTION, START_ACTIVITY_INTENT_SENDER_TRANSACTION, START_ACTIVITY_TRANSACTION, START_ACTIVITY_WITH_CONFIG_TRANSACTION, START_BACKUP_AGENT_TRANSACTION, START_BINDER_TRACKING_TRANSACTION, START_CONFIRM_DEVICE_CREDENTIAL_INTENT, START_IN_PLACE_ANIMATION_TRANSACTION, START_INSTRUMENTATION_TRANSACTION, START_LOCAL_VOICE_INTERACTION_TRANSACTION, START_LOCK_TASK_BY_TASK_ID_TRANSACTION, START_LOCK_TASK_BY_TOKEN_TRANSACTION, START_NEXT_MATCHING_ACTIVITY_TRANSACTION, START_SERVICE_TRANSACTION, START_SYSTEM_LOCK_TASK_TRANSACTION, START_USER_IN_BACKGROUND_TRANSACTION, START_VOICE_ACTIVITY_TRANSACTION, STOP_APP_SWITCHES_TRANSACTION, STOP_BINDER_TRACKING_AND_DUMP_TRANSACTION, STOP_LOCAL_VOICE_INTERACTION_TRANSACTION, STOP_LOCK_TASK_MODE_TRANSACTION, STOP_SERVICE_TOKEN_TRANSACTION, STOP_SERVICE_TRANSACTION, STOP_SYSTEM_LOCK_TASK_TRANSACTION, STOP_USER_TRANSACTION, SUPPORTS_LOCAL_VOICE_INTERACTION_TRANSACTION, SUPPRESS_RESIZE_CONFIG_CHANGES_TRANSACTION, SWAP_DOCKED_AND_FULLSCREEN_STACK, SWITCH_USER_TRANSACTION, TAKE_PERSISTABLE_URI_PERMISSION_TRANSACTION, UNBIND_BACKUP_AGENT_TRANSACTION, UNBIND_FINISHED_TRANSACTION, UNBIND_SERVICE_TRANSACTION, UNBROADCAST_INTENT_TRANSACTION, UNHANDLED_BACK_TRANSACTION, UNLOCK_USER_TRANSACTION, UNREGISTER_PROCESS_OBSERVER_TRANSACTION, UNREGISTER_RECEIVER_TRANSACTION, UNREGISTER_UID_OBSERVER_TRANSACTION, UNREGISTER_USER_SWITCH_OBSERVER_TRANSACTION, UNSTABLE_PROVIDER_DIED_TRANSACTION, UPDATE_CONFIGURATION_TRANSACTION, UPDATE_DEVICE_OWNER_TRANSACTION, UPDATE_LOCK_TASK_PACKAGES_TRANSACTION, UPDATE_PERSISTENT_CONFIGURATION_TRANSACTION, WILL_ACTIVITY_BE_VISIBLE_TRANSACTION
DUMP_TRANSACTION, FIRST_CALL_TRANSACTION, FLAG_ONEWAY, INTERFACE_TRANSACTION, LAST_CALL_TRANSACTION, LIKE_TRANSACTION, MAX_IPC_SIZE, PING_TRANSACTION, SHELL_COMMAND_TRANSACTION, SYSPROPS_TRANSACTION, TWEET_TRANSACTION
Constructor and Description |
---|
ActivityManagerService(Context systemContext) |
Modifier and Type | Method and Description |
---|---|
void |
activityDestroyed(IBinder token) |
void |
activityIdle(IBinder token,
Configuration config,
boolean stopProfiling) |
void |
activityPaused(IBinder token) |
void |
activityRelaunched(IBinder token) |
void |
activityResumed(IBinder token) |
void |
activitySlept(IBinder token) |
void |
activityStopped(IBinder token,
Bundle icicle,
PersistableBundle persistentState,
CharSequence description) |
int |
addAppTask(IBinder activityToken,
Intent intent,
ActivityManager.TaskDescription description,
Bitmap thumbnail) |
void |
addErrorToDropBox(String eventType,
com.android.server.am.ProcessRecord process,
String processName,
com.android.server.am.ActivityRecord activity,
com.android.server.am.ActivityRecord parent,
String subject,
String report,
File dataFile,
ApplicationErrorReport.CrashInfo crashInfo)
Write a description of an error (crash, WTF, ANR) to the drop box.
|
void |
addPackageDependency(String packageName) |
void |
appNotRespondingViaProvider(IBinder connection) |
void |
attachApplication(IApplicationThread thread) |
void |
backgroundResourcesReleased(IBinder token) |
void |
backupAgentCreated(String agentPackageName,
IBinder agent) |
void |
batteryNeedsCpuUpdate() |
void |
batteryPowerChanged(boolean onBattery) |
void |
batterySendBroadcast(Intent intent) |
boolean |
bindBackupAgent(String packageName,
int backupMode,
int userId) |
int |
bindService(IApplicationThread caller,
IBinder token,
Intent service,
String resolvedType,
IServiceConnection connection,
int flags,
String callingPackage,
int userId) |
void |
bootAnimationComplete() |
int |
broadcastIntent(IApplicationThread caller,
Intent intent,
String resolvedType,
IIntentReceiver resultTo,
int resultCode,
String resultData,
Bundle resultExtras,
String[] requiredPermissions,
int appOp,
Bundle bOptions,
boolean serialized,
boolean sticky,
int userId) |
boolean |
canBypassWorkChallenge(PendingIntent intent)
Returns if the target of the PendingIntent can be fired directly, without triggering
a work profile challenge.
|
void |
cancelIntentSender(IIntentSender sender) |
boolean |
canShowErrorDialogs() |
String |
checkContentProviderAccess(String authority,
int userId)
Check if the calling UID has a possible chance at accessing the provider
at the given authority and user.
|
int |
checkGrantUriPermission(int callingUid,
String targetPkg,
Uri uri,
int modeFlags,
int userId) |
int |
checkPermission(String permission,
int pid,
int uid)
As the only public entry point for permissions checking, this method
can enforce the semantic that requesting a check on a null global
permission is automatically denied.
|
int |
checkPermissionWithToken(String permission,
int pid,
int uid,
IBinder callerToken) |
int |
checkUriPermission(Uri uri,
int pid,
int uid,
int modeFlags,
int userId,
IBinder callerToken) |
boolean |
clearApplicationUserData(String packageName,
IPackageDataObserver observer,
int userId) |
void |
clearGrantedUriPermissions(String packageName,
int userId) |
void |
clearPendingBackup() |
void |
closeSystemDialogs(String reason) |
boolean |
convertFromTranslucent(IBinder token) |
boolean |
convertToTranslucent(IBinder token,
ActivityOptions options) |
void |
crashApplication(int uid,
int initialPid,
String packageName,
String message) |
IActivityContainer |
createStackOnDisplay(int displayId) |
IActivityContainer |
createVirtualActivityContainer(IBinder parentActivityToken,
IActivityContainerCallback callback) |
void |
deleteActivityContainer(IActivityContainer container) |
protected void |
dump(FileDescriptor fd,
PrintWriter pw,
String[] args)
Print the object's state into the given stream.
|
protected boolean |
dumpActivity(FileDescriptor fd,
PrintWriter pw,
String name,
String[] args,
int opti,
boolean dumpAll)
There are three things that cmd can be:
- a flattened component name that matches an existing activity
- the cmd arg isn't the flattened component name of an existing activity:
dump all activity whose component contains the cmd as a substring
- A hex number of the ActivityRecord object instance.
|
boolean |
dumpHeap(String process,
int userId,
boolean managed,
String path,
ParcelFileDescriptor fd) |
void |
dumpHeapFinished(String path) |
protected boolean |
dumpProvider(FileDescriptor fd,
PrintWriter pw,
String name,
String[] args,
int opti,
boolean dumpAll)
There are three ways to call this:
- no provider specified: dump all the providers
- a flattened component name that matched an existing provider was specified as the
first arg: dump that one provider
- the first arg isn't the flattened component name of an existing provider:
dump all providers whose component contains the first arg as a substring
|
static File |
dumpStackTraces(boolean clearTraces,
ArrayList<Integer> firstPids,
ProcessCpuTracker processCpuTracker,
SparseArray<Boolean> lastPids,
String[] nativeProcs)
If a stack trace dump file is configured, dump process stack traces.
|
void |
enterPictureInPictureMode(IBinder token) |
void |
enterSafeMode() |
void |
exitFreeformMode(IBinder token) |
boolean |
finishActivity(IBinder token,
int resultCode,
Intent resultData,
int finishTask)
This is the internal entry point for handling Activity.finish().
|
boolean |
finishActivityAffinity(IBinder token) |
void |
finishHeavyWeightApp() |
void |
finishInstrumentation(IApplicationThread target,
int resultCode,
Bundle results) |
void |
finishReceiver(IBinder who,
int resultCode,
String resultData,
Bundle resultExtras,
boolean resultAbort,
int flags) |
void |
finishSubActivity(IBinder token,
String resultWho,
int requestCode) |
void |
finishVoiceTask(IVoiceInteractionSession session) |
void |
forceStopPackage(String packageName,
int userId) |
ComponentName |
getActivityClassForToken(IBinder token) |
int |
getActivityDisplayId(IBinder activityToken) |
ActivityOptions |
getActivityOptions(IBinder token) |
int |
getActivityStackId(IBinder token) |
List<ActivityManager.StackInfo> |
getAllStackInfos() |
IAppOpsService |
getAppOpsService() |
int |
getAppStartMode(int uid,
String packageName) |
List<IAppTask> |
getAppTasks(String callingPackage) |
Point |
getAppTaskThumbnailSize() |
Bundle |
getAssistContextExtras(int requestType) |
ComponentName |
getCallingActivity(IBinder token) |
String |
getCallingPackage(IBinder token) |
Configuration |
getConfiguration() |
IActivityManager.ContentProviderHolder |
getContentProvider(IApplicationThread caller,
String name,
int userId,
boolean stable) |
IActivityManager.ContentProviderHolder |
getContentProviderExternal(String name,
int userId,
IBinder token) |
UserInfo |
getCurrentUser() |
ConfigurationInfo |
getDeviceConfigurationInfo() |
int |
getFocusedStackId() |
int |
getFrontActivityScreenCompatMode() |
ParceledListSlice<UriPermission> |
getGrantedUriPermissions(String packageName,
int userId) |
static long |
getInputDispatchingTimeoutLocked(com.android.server.am.ActivityRecord r) |
static long |
getInputDispatchingTimeoutLocked(com.android.server.am.ProcessRecord r) |
Intent |
getIntentForIntentSender(IIntentSender pendingResult) |
IIntentSender |
getIntentSender(int type,
String packageName,
IBinder token,
String resultWho,
int requestCode,
Intent[] intents,
String[] resolvedTypes,
int flags,
Bundle bOptions,
int userId) |
String |
getLaunchedFromPackage(IBinder activityToken) |
int |
getLaunchedFromUid(IBinder activityToken) |
int |
getLockTaskModeState() |
void |
getMemoryInfo(ActivityManager.MemoryInfo outInfo) |
int |
getMemoryTrimLevel() |
void |
getMyMemoryState(ActivityManager.RunningAppProcessInfo outInfo) |
boolean |
getPackageAskScreenCompat(String packageName) |
String |
getPackageForIntentSender(IIntentSender pendingResult) |
String |
getPackageForToken(IBinder token) |
int |
getPackageProcessState(String packageName,
String callingPackage) |
int |
getPackageScreenCompatMode(String packageName) |
ParceledListSlice<UriPermission> |
getPersistedUriPermissions(String packageName,
boolean incoming) |
List<ActivityManager.ProcessErrorStateInfo> |
getProcessesInErrorState() |
int |
getProcessLimit() |
Debug.MemoryInfo[] |
getProcessMemoryInfo(int[] pids) |
long[] |
getProcessPss(int[] pids) |
void |
getProcessStatesAndOomScoresForPIDs(int[] pids,
int[] states,
int[] scores)
For each PID in the given input array, write the current process state
for that process into the states array, or -1 to indicate that no
process with the given PID exists.
|
String |
getProviderMimeType(Uri uri,
int userId)
Allows apps to retrieve the MIME type of a URI.
|
ParceledListSlice<ActivityManager.RecentTaskInfo> |
getRecentTasks(int maxNum,
int flags,
int userId) |
int |
getRequestedOrientation(IBinder token) |
List<ActivityManager.RunningAppProcessInfo> |
getRunningAppProcesses() |
List<ApplicationInfo> |
getRunningExternalApplications() |
PendingIntent |
getRunningServiceControlPanel(ComponentName name) |
int[] |
getRunningUserIds() |
List<ActivityManager.RunningServiceInfo> |
getServices(int maxNum,
int flags) |
ActivityManager.StackInfo |
getStackInfo(int stackId) |
String |
getTagForIntentSender(IIntentSender pendingResult,
String prefix) |
Rect |
getTaskBounds(int taskId) |
Bitmap |
getTaskDescriptionIcon(String filePath,
int userId) |
int |
getTaskForActivity(IBinder token,
boolean onlyRoot) |
List<ActivityManager.RunningTaskInfo> |
getTasks(int maxNum,
int flags) |
ActivityManager.TaskThumbnail |
getTaskThumbnail(int id) |
int |
getUidForIntentSender(IIntentSender sender) |
IBinder |
getUriPermissionOwnerForActivity(IBinder activityToken) |
void |
grantUriPermission(IApplicationThread caller,
String targetPkg,
Uri uri,
int modeFlags,
int userId) |
void |
grantUriPermissionFromOwner(IBinder token,
int fromUid,
String targetPkg,
Uri uri,
int modeFlags,
int sourceUserId,
int targetUserId) |
void |
handleApplicationCrash(IBinder app,
ApplicationErrorReport.CrashInfo crashInfo)
Used by
RuntimeInit to report when an application crashes. |
void |
handleApplicationStrictModeViolation(IBinder app,
int violationMask,
StrictMode.ViolationInfo info) |
boolean |
handleApplicationWtf(IBinder app,
String tag,
boolean system,
ApplicationErrorReport.CrashInfo crashInfo)
Used by
Log via RuntimeInit to report serious errors. |
int |
handleIncomingUser(int callingPid,
int callingUid,
int userId,
boolean allowAll,
boolean requireFull,
String name,
String callerPackage) |
void |
hang(IBinder who,
boolean allowRestart) |
void |
initPowerManagement() |
long |
inputDispatchingTimedOut(int pid,
boolean aboveSystem,
String reason) |
boolean |
inputDispatchingTimedOut(com.android.server.am.ProcessRecord proc,
com.android.server.am.ActivityRecord activity,
com.android.server.am.ActivityRecord parent,
boolean aboveSystem,
String reason)
Handle input dispatching timeouts.
|
void |
installSystemProviders() |
boolean |
isAppForeground(int uid) |
boolean |
isAssistDataAllowedOnCurrentActivity() |
boolean |
isBackgroundVisibleBehind(IBinder token) |
boolean |
isImmersive(IBinder token) |
boolean |
isInHomeStack(int taskId) |
boolean |
isInLockTaskMode() |
boolean |
isInMultiWindowMode(IBinder token) |
boolean |
isInPictureInPictureMode(IBinder token) |
boolean |
isIntentSenderAnActivity(IIntentSender pendingResult) |
boolean |
isIntentSenderTargetedToPackage(IIntentSender pendingResult) |
boolean |
isRootVoiceInteraction(IBinder token) |
boolean |
isTopActivityImmersive() |
boolean |
isTopOfTask(IBinder token) |
boolean |
isUserAMonkey() |
boolean |
isUserRunning(int userId,
int flags) |
boolean |
isUserStopped(int userId) |
boolean |
isVrModePackageEnabled(ComponentName packageName) |
void |
keyguardGoingAway(int flags)
Notify the system that the keyguard is going away.
|
void |
keyguardWaitingForActivityDrawn() |
void |
killAllBackgroundProcesses() |
void |
killApplication(String pkg,
int appId,
int userId,
String reason) |
void |
killApplicationProcess(String processName,
int uid) |
void |
killBackgroundProcesses(String packageName,
int userId) |
void |
killPackageDependents(String packageName,
int userId)
Kill processes for the user with id userId and that depend on the package named packageName
|
boolean |
killPids(int[] pids,
String pReason,
boolean secure) |
boolean |
killProcessesBelowForeground(String reason) |
void |
killUid(int appId,
int userId,
String reason) |
boolean |
launchAssistIntent(Intent intent,
int requestType,
String hint,
int userHandle,
Bundle args) |
void |
monitor()
In this method we try to acquire our lock to make sure that we have not deadlocked
|
boolean |
moveActivityTaskToBack(IBinder token,
boolean nonRoot)
Moves an activity, and all of the other activities within the same task, to the bottom
of the history stack.
|
void |
moveTaskBackwards(int task) |
void |
moveTasksToFullscreenStack(int fromStackId,
boolean onTop) |
boolean |
moveTaskToDockedStack(int taskId,
int createMode,
boolean toTop,
boolean animate,
Rect initialBounds,
boolean moveHomeStackFront)
Moves the input task to the docked stack.
|
void |
moveTaskToFront(int taskId,
int flags,
Bundle bOptions)
TODO: Add mController hook
|
void |
moveTaskToStack(int taskId,
int stackId,
boolean toTop) |
boolean |
moveTopActivityToPinnedStack(int stackId,
Rect bounds)
Moves the top activity in the input stackId to the pinned stack.
|
boolean |
navigateUpTo(IBinder token,
Intent destIntent,
int resultCode,
Intent resultData) |
IBinder |
newUriPermissionOwner(String name) |
void |
noteAlarmFinish(IIntentSender sender,
int sourceUid,
String tag) |
void |
noteAlarmStart(IIntentSender sender,
int sourceUid,
String tag) |
void |
noteWakeupAlarm(IIntentSender sender,
int sourceUid,
String sourcePkg,
String tag) |
void |
notifyActivityDrawn(IBinder token) |
void |
notifyCleartextNetwork(int uid,
byte[] firstPacket) |
void |
notifyEnterAnimationComplete(IBinder token) |
void |
notifyLaunchTaskBehindComplete(IBinder token) |
void |
notifyLockedProfile(int userId) |
void |
notifyPinnedStackAnimationEnded()
Notifies all listeners when the pinned stack animation ends.
|
void |
onShellCommand(FileDescriptor in,
FileDescriptor out,
FileDescriptor err,
String[] args,
ResultReceiver resultReceiver)
|
boolean |
onTransact(int code,
Parcel data,
Parcel reply,
int flags)
Default implementation is a stub that returns false.
|
ParcelFileDescriptor |
openContentUri(Uri uri) |
void |
overridePendingTransition(IBinder token,
String packageName,
int enterAnim,
int exitAnim) |
IBinder |
peekService(Intent service,
String resolvedType,
String callingPackage) |
void |
performIdleMaintenance() |
void |
positionTaskInStack(int taskId,
int stackId,
int position) |
boolean |
profileControl(String process,
int userId,
boolean start,
ProfilerInfo profilerInfo,
int profileType) |
void |
publishContentProviders(IApplicationThread caller,
List<IActivityManager.ContentProviderHolder> providers) |
void |
publishService(IBinder token,
Intent intent,
IBinder service) |
boolean |
refContentProvider(IBinder connection,
int stable,
int unstable) |
void |
registerProcessObserver(IProcessObserver observer) |
Intent |
registerReceiver(IApplicationThread caller,
String callerPackage,
IIntentReceiver receiver,
IntentFilter filter,
String permission,
int userId) |
void |
registerTaskStackListener(ITaskStackListener listener)
Sets the task stack listener that gets callbacks when a task stack changes.
|
void |
registerUidObserver(IUidObserver observer,
int which) |
void |
registerUserSwitchObserver(IUserSwitchObserver observer,
String name) |
boolean |
releaseActivityInstance(IBinder token) |
void |
releasePersistableUriPermission(Uri uri,
int modeFlags,
int userId) |
void |
releaseSomeActivities(IApplicationThread appInt) |
void |
removeContentProvider(IBinder connection,
boolean stable)
Drop a content provider from a ProcessRecord's bookkeeping
|
void |
removeContentProviderExternal(String name,
IBinder token) |
void |
removeStack(int stackId) |
boolean |
removeTask(int taskId) |
void |
reportActivityFullyDrawn(IBinder token) |
void |
reportAssistContextExtras(IBinder token,
Bundle extras,
AssistStructure structure,
AssistContent content,
Uri referrer) |
void |
reportSizeConfigurations(IBinder token,
int[] horizontalSizeConfiguration,
int[] verticalSizeConfigurations,
int[] smallestSizeConfigurations) |
boolean |
requestAssistContextExtras(int requestType,
IResultReceiver receiver,
Bundle receiverExtras,
IBinder activityToken,
boolean focused,
boolean newSessionId) |
void |
requestBugReport(int bugreportType) |
boolean |
requestVisibleBehind(IBinder token,
boolean visible) |
void |
resizeDockedStack(Rect dockedBounds,
Rect tempDockedTaskBounds,
Rect tempDockedTaskInsetBounds,
Rect tempOtherTaskBounds,
Rect tempOtherTaskInsetBounds)
Resizes the docked stack, and all other stacks as the result of the dock stack bounds change.
|
void |
resizePinnedStack(Rect pinnedBounds,
Rect tempPinnedTaskBounds)
Resizes the pinned stack.
|
void |
resizeStack(int stackId,
Rect bounds,
boolean allowResizeInDockedMode,
boolean preserveWindows,
boolean animate,
int animationDuration)
Resizes the input stack id to the given bounds.
|
void |
resizeTask(int taskId,
Rect bounds,
int resizeMode) |
void |
restart() |
void |
resumeAppSwitches() |
void |
revokeUriPermission(IApplicationThread caller,
Uri uri,
int modeFlags,
int userId) |
void |
revokeUriPermissionFromOwner(IBinder token,
Uri uri,
int mode,
int userId) |
void |
sendIdleJobTrigger() |
int |
sendIntentSender(IIntentSender target,
int code,
Intent intent,
String resolvedType,
IIntentReceiver finishedReceiver,
String requiredPermission,
Bundle options) |
void |
serviceDoneExecuting(IBinder token,
int type,
int startId,
int res) |
void |
setActivityController(IActivityController controller,
boolean imAMonkey) |
void |
setAlwaysFinish(boolean enabled) |
void |
setDebugApp(String packageName,
boolean waitForDebugger,
boolean persistent) |
void |
setDumpHeapDebugLimit(String processName,
int uid,
long maxMemSize,
String reportPackage) |
void |
setFocusedStack(int stackId) |
void |
setFocusedTask(int taskId) |
void |
setFrontActivityScreenCompatMode(int mode) |
void |
setHasTopUi(boolean hasTopUi)
Lets activity manager know whether the calling process is currently showing "top-level" UI
that is not an activity, i.e. windows on the screen the user is currently interacting with.
|
void |
setImmersive(IBinder token,
boolean immersive) |
void |
setInstaller(Installer installer) |
void |
setLenientBackgroundCheck(boolean enabled) |
void |
setLockScreenShown(boolean showing,
boolean occluded) |
void |
setPackageAskScreenCompat(String packageName,
boolean ask) |
void |
setPackageScreenCompatMode(String packageName,
int mode) |
void |
setProcessForeground(IBinder token,
int pid,
boolean isForeground) |
void |
setProcessLimit(int max) |
boolean |
setProcessMemoryTrimLevel(String process,
int userId,
int level) |
void |
setRenderThread(int tid) |
void |
setRequestedOrientation(IBinder token,
int requestedOrientation) |
void |
setServiceForeground(ComponentName className,
IBinder token,
int id,
Notification notification,
int flags) |
void |
setSystemProcess() |
void |
setSystemServiceManager(SystemServiceManager mgr) |
void |
setTaskDescription(IBinder token,
ActivityManager.TaskDescription td) |
void |
setTaskResizeable(int taskId,
int resizeableMode) |
void |
setTestPssMode(boolean enabled) |
void |
setUsageStatsManager(UsageStatsManagerInternal usageStatsManager) |
void |
setUserIsMonkey(boolean userIsMonkey) |
void |
setVoiceKeepAwake(IVoiceInteractionSession session,
boolean keepAwake) |
int |
setVrMode(IBinder token,
boolean enabled,
ComponentName packageName) |
void |
setVrThread(int tid) |
void |
setWindowManager(WindowManagerService wm) |
boolean |
shouldUpRecreateTask(IBinder token,
String destAffinity) |
boolean |
showAssistFromActivity(IBinder token,
Bundle args) |
void |
showBootMessage(CharSequence msg,
boolean always) |
void |
showLockTaskEscapeMessage(IBinder token) |
void |
showSafeModeOverlay() |
void |
showWaitingForDebugger(IApplicationThread who,
boolean waiting) |
boolean |
shutdown(int timeout) |
void |
signalPersistentProcesses(int sig)
This method sends the specified signal to each of the persistent apps
|
int |
startActivities(IApplicationThread caller,
String callingPackage,
Intent[] intents,
String[] resolvedTypes,
IBinder resultTo,
Bundle bOptions,
int userId) |
int |
startActivity(IApplicationThread caller,
String callingPackage,
Intent intent,
String resolvedType,
IBinder resultTo,
String resultWho,
int requestCode,
int startFlags,
ProfilerInfo profilerInfo,
Bundle bOptions) |
IActivityManager.WaitResult |
startActivityAndWait(IApplicationThread caller,
String callingPackage,
Intent intent,
String resolvedType,
IBinder resultTo,
String resultWho,
int requestCode,
int startFlags,
ProfilerInfo profilerInfo,
Bundle bOptions,
int userId) |
int |
startActivityAsCaller(IApplicationThread caller,
String callingPackage,
Intent intent,
String resolvedType,
IBinder resultTo,
String resultWho,
int requestCode,
int startFlags,
ProfilerInfo profilerInfo,
Bundle bOptions,
boolean ignoreTargetSecurity,
int userId) |
int |
startActivityAsUser(IApplicationThread caller,
String callingPackage,
Intent intent,
String resolvedType,
IBinder resultTo,
String resultWho,
int requestCode,
int startFlags,
ProfilerInfo profilerInfo,
Bundle bOptions,
int userId) |
int |
startActivityFromRecents(int taskId,
Bundle bOptions) |
int |
startActivityIntentSender(IApplicationThread caller,
IntentSender intent,
Intent fillInIntent,
String resolvedType,
IBinder resultTo,
String resultWho,
int requestCode,
int flagsMask,
int flagsValues,
Bundle bOptions) |
int |
startActivityWithConfig(IApplicationThread caller,
String callingPackage,
Intent intent,
String resolvedType,
IBinder resultTo,
String resultWho,
int requestCode,
int startFlags,
Configuration config,
Bundle bOptions,
int userId) |
boolean |
startBinderTracking() |
void |
startConfirmDeviceCredentialIntent(Intent intent) |
void |
startInPlaceAnimationOnFrontMostApplication(ActivityOptions opts) |
boolean |
startInstrumentation(ComponentName className,
String profileFile,
int flags,
Bundle arguments,
IInstrumentationWatcher watcher,
IUiAutomationConnection uiAutomationConnection,
int userId,
String abiOverride) |
void |
startLocalVoiceInteraction(IBinder callingActivity,
Bundle options) |
void |
startLockTaskMode(IBinder token) |
void |
startLockTaskMode(int taskId) |
boolean |
startNextMatchingActivity(IBinder callingActivity,
Intent intent,
Bundle bOptions) |
void |
startObservingNativeCrashes() |
ComponentName |
startService(IApplicationThread caller,
Intent service,
String resolvedType,
String callingPackage,
int userId) |
void |
startSystemLockTaskMode(int taskId) |
boolean |
startUserInBackground(int userId)
Start user, if its not already running, but don't bring it to foreground.
|
int |
startVoiceActivity(String callingPackage,
int callingPid,
int callingUid,
Intent intent,
String resolvedType,
IVoiceInteractionSession session,
IVoiceInteractor interactor,
int startFlags,
ProfilerInfo profilerInfo,
Bundle bOptions,
int userId) |
void |
stopAppSwitches() |
boolean |
stopBinderTrackingAndDump(ParcelFileDescriptor fd) |
void |
stopLocalVoiceInteraction(IBinder callingActivity) |
void |
stopLockTaskMode() |
int |
stopService(IApplicationThread caller,
Intent service,
String resolvedType,
int userId) |
boolean |
stopServiceToken(ComponentName className,
IBinder token,
int startId) |
void |
stopSystemLockTaskMode()
This API should be called by SystemUI only when user perform certain action to dismiss
lock task mode.
|
int |
stopUser(int userId,
boolean force,
IStopUserCallback callback) |
boolean |
supportsLocalVoiceInteraction() |
void |
suppressResizeConfigChanges(boolean suppress) |
void |
swapDockedAndFullscreenStack()
Moves all tasks from the docked stack in the fullscreen stack and puts the top task of the
fullscreen stack into the docked stack.
|
boolean |
switchUser(int targetUserId) |
void |
systemReady(Runnable goingCallback) |
void |
takePersistableUriPermission(Uri uri,
int modeFlags,
int userId) |
boolean |
testIsSystemReady() |
void |
unbindBackupAgent(ApplicationInfo appInfo) |
void |
unbindFinished(IBinder token,
Intent intent,
boolean doRebind) |
boolean |
unbindService(IServiceConnection connection) |
void |
unbroadcastIntent(IApplicationThread caller,
Intent intent,
int userId) |
void |
unhandledBack() |
boolean |
unlockUser(int userId,
byte[] token,
byte[] secret,
IProgressListener listener) |
void |
unregisterProcessObserver(IProcessObserver observer) |
void |
unregisterReceiver(IIntentReceiver receiver) |
void |
unregisterUidObserver(IUidObserver observer) |
void |
unregisterUserSwitchObserver(IUserSwitchObserver observer) |
void |
unstableProviderDied(IBinder connection) |
void |
updateConfiguration(Configuration values) |
void |
updateDeviceOwner(String packageName) |
void |
updateLockTaskPackages(int userId,
String[] packages) |
void |
updatePersistentConfiguration(Configuration values) |
boolean |
willActivityBeVisible(IBinder token) |
asBinder, asInterface, broadcastStickyIntent, broadcastStickyIntent, getDefault, isSystemReady
attachInterface, blockUntilThreadAvailable, clearCallingIdentity, disableTracing, dump, dumpAsync, enableTracing, finalize, flushPendingCommands, getCallingPid, getCallingUid, getCallingUserHandle, getInterfaceDescriptor, getThreadStrictModePolicy, getTransactionTracker, isBinderAlive, isProxy, isTracingEnabled, joinThreadPool, linkToDeath, pingBinder, queryLocalInterface, restoreCallingIdentity, setDumpDisabled, setThreadStrictModePolicy, shellCommand, transact, unlinkToDeath
public static final String ACTION_TRIGGER_IDLE
public static final float FULLSCREEN_SCREENSHOT_SCALE
public IntentFirewall mIntentFirewall
public ActivityManagerService(Context systemContext)
public boolean canShowErrorDialogs()
public void setSystemProcess()
public void setWindowManager(WindowManagerService wm)
public void setUsageStatsManager(UsageStatsManagerInternal usageStatsManager)
public void startObservingNativeCrashes()
public IAppOpsService getAppOpsService()
public void setSystemServiceManager(SystemServiceManager mgr)
public void setInstaller(Installer installer)
public void initPowerManagement()
public boolean onTransact(int code, Parcel data, Parcel reply, int flags) throws RemoteException
Binder
If you want to call this, call transact().
onTransact
in class ActivityManagerNative
RemoteException
public void batteryNeedsCpuUpdate()
batteryNeedsCpuUpdate
in interface BatteryStatsImpl.BatteryCallback
public void batteryPowerChanged(boolean onBattery)
batteryPowerChanged
in interface BatteryStatsImpl.BatteryCallback
public void batterySendBroadcast(Intent intent)
batterySendBroadcast
in interface BatteryStatsImpl.BatteryCallback
public void setFocusedStack(int stackId)
setFocusedStack
in interface IActivityManager
public void setFocusedTask(int taskId)
setFocusedTask
in interface IActivityManager
public void registerTaskStackListener(ITaskStackListener listener) throws RemoteException
registerTaskStackListener
in interface IActivityManager
RemoteException
public void notifyActivityDrawn(IBinder token)
notifyActivityDrawn
in interface IActivityManager
public int getFrontActivityScreenCompatMode()
getFrontActivityScreenCompatMode
in interface IActivityManager
public void setFrontActivityScreenCompatMode(int mode)
setFrontActivityScreenCompatMode
in interface IActivityManager
public int getPackageScreenCompatMode(String packageName)
getPackageScreenCompatMode
in interface IActivityManager
public void setPackageScreenCompatMode(String packageName, int mode)
setPackageScreenCompatMode
in interface IActivityManager
public boolean getPackageAskScreenCompat(String packageName)
getPackageAskScreenCompat
in interface IActivityManager
public void setPackageAskScreenCompat(String packageName, boolean ask)
setPackageAskScreenCompat
in interface IActivityManager
public int getPackageProcessState(String packageName, String callingPackage)
getPackageProcessState
in interface IActivityManager
public boolean setProcessMemoryTrimLevel(String process, int userId, int level)
setProcessMemoryTrimLevel
in interface IActivityManager
public final int startActivity(IApplicationThread caller, String callingPackage, Intent intent, String resolvedType, IBinder resultTo, String resultWho, int requestCode, int startFlags, ProfilerInfo profilerInfo, Bundle bOptions)
startActivity
in interface IActivityManager
public final int startActivityAsUser(IApplicationThread caller, String callingPackage, Intent intent, String resolvedType, IBinder resultTo, String resultWho, int requestCode, int startFlags, ProfilerInfo profilerInfo, Bundle bOptions, int userId)
startActivityAsUser
in interface IActivityManager
public final int startActivityAsCaller(IApplicationThread caller, String callingPackage, Intent intent, String resolvedType, IBinder resultTo, String resultWho, int requestCode, int startFlags, ProfilerInfo profilerInfo, Bundle bOptions, boolean ignoreTargetSecurity, int userId)
startActivityAsCaller
in interface IActivityManager
public final IActivityManager.WaitResult startActivityAndWait(IApplicationThread caller, String callingPackage, Intent intent, String resolvedType, IBinder resultTo, String resultWho, int requestCode, int startFlags, ProfilerInfo profilerInfo, Bundle bOptions, int userId)
startActivityAndWait
in interface IActivityManager
public final int startActivityWithConfig(IApplicationThread caller, String callingPackage, Intent intent, String resolvedType, IBinder resultTo, String resultWho, int requestCode, int startFlags, Configuration config, Bundle bOptions, int userId)
startActivityWithConfig
in interface IActivityManager
public int startActivityIntentSender(IApplicationThread caller, IntentSender intent, Intent fillInIntent, String resolvedType, IBinder resultTo, String resultWho, int requestCode, int flagsMask, int flagsValues, Bundle bOptions) throws TransactionTooLargeException
startActivityIntentSender
in interface IActivityManager
TransactionTooLargeException
public int startVoiceActivity(String callingPackage, int callingPid, int callingUid, Intent intent, String resolvedType, IVoiceInteractionSession session, IVoiceInteractor interactor, int startFlags, ProfilerInfo profilerInfo, Bundle bOptions, int userId)
startVoiceActivity
in interface IActivityManager
public void startLocalVoiceInteraction(IBinder callingActivity, Bundle options) throws RemoteException
startLocalVoiceInteraction
in interface IActivityManager
RemoteException
public void stopLocalVoiceInteraction(IBinder callingActivity) throws RemoteException
stopLocalVoiceInteraction
in interface IActivityManager
RemoteException
public boolean supportsLocalVoiceInteraction() throws RemoteException
supportsLocalVoiceInteraction
in interface IActivityManager
RemoteException
public void setVoiceKeepAwake(IVoiceInteractionSession session, boolean keepAwake)
setVoiceKeepAwake
in interface IActivityManager
public boolean startNextMatchingActivity(IBinder callingActivity, Intent intent, Bundle bOptions)
startNextMatchingActivity
in interface IActivityManager
public final int startActivityFromRecents(int taskId, Bundle bOptions)
startActivityFromRecents
in interface IActivityManager
public final int startActivities(IApplicationThread caller, String callingPackage, Intent[] intents, String[] resolvedTypes, IBinder resultTo, Bundle bOptions, int userId)
startActivities
in interface IActivityManager
public void reportActivityFullyDrawn(IBinder token)
reportActivityFullyDrawn
in interface IActivityManager
public void setRequestedOrientation(IBinder token, int requestedOrientation)
setRequestedOrientation
in interface IActivityManager
public int getRequestedOrientation(IBinder token)
getRequestedOrientation
in interface IActivityManager
public final boolean finishActivity(IBinder token, int resultCode, Intent resultData, int finishTask)
finishActivity
in interface IActivityManager
token
- The Binder token referencing the Activity we want to finish.resultCode
- Result code, if any, from this Activity.resultData
- Result data (Intent), if any, from this Activity.finishTask
- Whether to finish the task associated with this Activity.public final void finishHeavyWeightApp()
finishHeavyWeightApp
in interface IActivityManager
public void crashApplication(int uid, int initialPid, String packageName, String message)
crashApplication
in interface IActivityManager
public final void finishSubActivity(IBinder token, String resultWho, int requestCode)
finishSubActivity
in interface IActivityManager
public boolean finishActivityAffinity(IBinder token)
finishActivityAffinity
in interface IActivityManager
public void finishVoiceTask(IVoiceInteractionSession session)
finishVoiceTask
in interface IActivityManager
public boolean releaseActivityInstance(IBinder token)
releaseActivityInstance
in interface IActivityManager
public void releaseSomeActivities(IApplicationThread appInt)
releaseSomeActivities
in interface IActivityManager
public boolean willActivityBeVisible(IBinder token)
willActivityBeVisible
in interface IActivityManager
public void overridePendingTransition(IBinder token, String packageName, int enterAnim, int exitAnim)
overridePendingTransition
in interface IActivityManager
public static File dumpStackTraces(boolean clearTraces, ArrayList<Integer> firstPids, ProcessCpuTracker processCpuTracker, SparseArray<Boolean> lastPids, String[] nativeProcs)
clearTraces
- causes the dump file to be erased prior to the new
traces being written, if true; when false, the new traces will be
appended to any existing file content.firstPids
- of dalvik VM processes to dump stack traces for firstlastPids
- of dalvik VM processes to dump stack traces for lastnativeProcs
- optional list of native process names to dump stack crawlspublic boolean clearApplicationUserData(String packageName, IPackageDataObserver observer, int userId)
clearApplicationUserData
in interface IActivityManager
public void killBackgroundProcesses(String packageName, int userId)
killBackgroundProcesses
in interface IActivityManager
public void killAllBackgroundProcesses()
killAllBackgroundProcesses
in interface IActivityManager
public void forceStopPackage(String packageName, int userId)
forceStopPackage
in interface IActivityManager
public void addPackageDependency(String packageName)
addPackageDependency
in interface IActivityManager
public void killApplication(String pkg, int appId, int userId, String reason)
killApplication
in interface IActivityManager
public void closeSystemDialogs(String reason)
closeSystemDialogs
in interface IActivityManager
public Debug.MemoryInfo[] getProcessMemoryInfo(int[] pids)
getProcessMemoryInfo
in interface IActivityManager
public long[] getProcessPss(int[] pids)
getProcessPss
in interface IActivityManager
public void killApplicationProcess(String processName, int uid)
killApplicationProcess
in interface IActivityManager
public final void attachApplication(IApplicationThread thread)
attachApplication
in interface IActivityManager
public final void activityIdle(IBinder token, Configuration config, boolean stopProfiling)
activityIdle
in interface IActivityManager
public void showBootMessage(CharSequence msg, boolean always)
showBootMessage
in interface IActivityManager
public void keyguardWaitingForActivityDrawn()
keyguardWaitingForActivityDrawn
in interface IActivityManager
public void keyguardGoingAway(int flags)
IActivityManager
keyguardGoingAway
in interface IActivityManager
flags
- See WindowManagerPolicy.KEYGUARD_GOING_AWAY_FLAG_TO_SHADE
etc.public void bootAnimationComplete()
bootAnimationComplete
in interface IActivityManager
public final void activityResumed(IBinder token)
activityResumed
in interface IActivityManager
public final void activityPaused(IBinder token)
activityPaused
in interface IActivityManager
public final void activityStopped(IBinder token, Bundle icicle, PersistableBundle persistentState, CharSequence description)
activityStopped
in interface IActivityManager
public final void activityDestroyed(IBinder token)
activityDestroyed
in interface IActivityManager
public final void activityRelaunched(IBinder token)
activityRelaunched
in interface IActivityManager
public void reportSizeConfigurations(IBinder token, int[] horizontalSizeConfiguration, int[] verticalSizeConfigurations, int[] smallestSizeConfigurations)
reportSizeConfigurations
in interface IActivityManager
public final void backgroundResourcesReleased(IBinder token)
backgroundResourcesReleased
in interface IActivityManager
public final void notifyLaunchTaskBehindComplete(IBinder token)
notifyLaunchTaskBehindComplete
in interface IActivityManager
public final void notifyEnterAnimationComplete(IBinder token)
notifyEnterAnimationComplete
in interface IActivityManager
public String getCallingPackage(IBinder token)
getCallingPackage
in interface IActivityManager
public ComponentName getCallingActivity(IBinder token)
getCallingActivity
in interface IActivityManager
public ComponentName getActivityClassForToken(IBinder token)
getActivityClassForToken
in interface IActivityManager
public String getPackageForToken(IBinder token)
getPackageForToken
in interface IActivityManager
public boolean isRootVoiceInteraction(IBinder token)
isRootVoiceInteraction
in interface IActivityManager
public IIntentSender getIntentSender(int type, String packageName, IBinder token, String resultWho, int requestCode, Intent[] intents, String[] resolvedTypes, int flags, Bundle bOptions, int userId)
getIntentSender
in interface IActivityManager
public int sendIntentSender(IIntentSender target, int code, Intent intent, String resolvedType, IIntentReceiver finishedReceiver, String requiredPermission, Bundle options)
sendIntentSender
in interface IActivityManager
public void cancelIntentSender(IIntentSender sender)
cancelIntentSender
in interface IActivityManager
public String getPackageForIntentSender(IIntentSender pendingResult)
getPackageForIntentSender
in interface IActivityManager
public int getUidForIntentSender(IIntentSender sender)
getUidForIntentSender
in interface IActivityManager
public boolean isIntentSenderTargetedToPackage(IIntentSender pendingResult)
isIntentSenderTargetedToPackage
in interface IActivityManager
public boolean isIntentSenderAnActivity(IIntentSender pendingResult)
isIntentSenderAnActivity
in interface IActivityManager
public Intent getIntentForIntentSender(IIntentSender pendingResult)
getIntentForIntentSender
in interface IActivityManager
public String getTagForIntentSender(IIntentSender pendingResult, String prefix)
getTagForIntentSender
in interface IActivityManager
public void setProcessLimit(int max)
setProcessLimit
in interface IActivityManager
public int getProcessLimit()
getProcessLimit
in interface IActivityManager
public void setProcessForeground(IBinder token, int pid, boolean isForeground)
setProcessForeground
in interface IActivityManager
public boolean isAppForeground(int uid) throws RemoteException
isAppForeground
in interface IActivityManager
RemoteException
public boolean isInMultiWindowMode(IBinder token)
isInMultiWindowMode
in interface IActivityManager
public boolean isInPictureInPictureMode(IBinder token)
isInPictureInPictureMode
in interface IActivityManager
public void enterPictureInPictureMode(IBinder token)
enterPictureInPictureMode
in interface IActivityManager
public void getProcessStatesAndOomScoresForPIDs(int[] pids, int[] states, int[] scores)
public int checkPermission(String permission, int pid, int uid)
checkComponentPermission(java.lang.String, int, int, int, boolean)
in cases
when only uid-based security is needed.)
This can be called with or without the global lock held.checkPermission
in interface IActivityManager
public int checkPermissionWithToken(String permission, int pid, int uid, IBinder callerToken)
checkPermissionWithToken
in interface IActivityManager
public int getAppStartMode(int uid, String packageName)
getAppStartMode
in interface IActivityManager
public int checkUriPermission(Uri uri, int pid, int uid, int modeFlags, int userId, IBinder callerToken)
checkUriPermission
in interface IActivityManager
uri
- This uri must NOT contain an embedded userId.userId
- The userId in which the uri is to be resolved.public int checkGrantUriPermission(int callingUid, String targetPkg, Uri uri, int modeFlags, int userId)
checkGrantUriPermission
in interface IActivityManager
uri
- This uri must NOT contain an embedded userId.userId
- The userId in which the uri is to be resolved.public void grantUriPermission(IApplicationThread caller, String targetPkg, Uri uri, int modeFlags, int userId)
grantUriPermission
in interface IActivityManager
uri
- This uri must NOT contain an embedded userId.userId
- The userId in which the uri is to be resolved.public void revokeUriPermission(IApplicationThread caller, Uri uri, int modeFlags, int userId)
revokeUriPermission
in interface IActivityManager
uri
- This uri must NOT contain an embedded userId.userId
- The userId in which the uri is to be resolved.public IBinder newUriPermissionOwner(String name)
newUriPermissionOwner
in interface IActivityManager
public IBinder getUriPermissionOwnerForActivity(IBinder activityToken)
getUriPermissionOwnerForActivity
in interface IActivityManager
public void grantUriPermissionFromOwner(IBinder token, int fromUid, String targetPkg, Uri uri, int modeFlags, int sourceUserId, int targetUserId)
grantUriPermissionFromOwner
in interface IActivityManager
uri
- This uri must NOT contain an embedded userId.sourceUserId
- The userId in which the uri is to be resolved.targetUserId
- The userId of the app that receives the grant.public void revokeUriPermissionFromOwner(IBinder token, Uri uri, int mode, int userId)
revokeUriPermissionFromOwner
in interface IActivityManager
uri
- This uri must NOT contain an embedded userId.userId
- The userId in which the uri is to be resolved.public void takePersistableUriPermission(Uri uri, int modeFlags, int userId)
takePersistableUriPermission
in interface IActivityManager
uri
- This uri must NOT contain an embedded userId.userId
- The userId in which the uri is to be resolved.public void releasePersistableUriPermission(Uri uri, int modeFlags, int userId)
releasePersistableUriPermission
in interface IActivityManager
uri
- This uri must NOT contain an embedded userId.userId
- The userId in which the uri is to be resolved.public ParceledListSlice<UriPermission> getPersistedUriPermissions(String packageName, boolean incoming)
getPersistedUriPermissions
in interface IActivityManager
public ParceledListSlice<UriPermission> getGrantedUriPermissions(String packageName, int userId)
getGrantedUriPermissions
in interface IActivityManager
public void clearGrantedUriPermissions(String packageName, int userId)
clearGrantedUriPermissions
in interface IActivityManager
public void showWaitingForDebugger(IApplicationThread who, boolean waiting)
showWaitingForDebugger
in interface IActivityManager
public void getMemoryInfo(ActivityManager.MemoryInfo outInfo)
getMemoryInfo
in interface IActivityManager
public List<IAppTask> getAppTasks(String callingPackage)
getAppTasks
in interface IActivityManager
public List<ActivityManager.RunningTaskInfo> getTasks(int maxNum, int flags)
getTasks
in interface IActivityManager
public ParceledListSlice<ActivityManager.RecentTaskInfo> getRecentTasks(int maxNum, int flags, int userId)
getRecentTasks
in interface IActivityManager
public ActivityManager.TaskThumbnail getTaskThumbnail(int id)
getTaskThumbnail
in interface IActivityManager
public int addAppTask(IBinder activityToken, Intent intent, ActivityManager.TaskDescription description, Bitmap thumbnail) throws RemoteException
addAppTask
in interface IActivityManager
RemoteException
public Point getAppTaskThumbnailSize()
getAppTaskThumbnailSize
in interface IActivityManager
public void setTaskDescription(IBinder token, ActivityManager.TaskDescription td)
setTaskDescription
in interface IActivityManager
public void setTaskResizeable(int taskId, int resizeableMode)
setTaskResizeable
in interface IActivityManager
public void resizeTask(int taskId, Rect bounds, int resizeMode)
resizeTask
in interface IActivityManager
public Rect getTaskBounds(int taskId)
getTaskBounds
in interface IActivityManager
public Bitmap getTaskDescriptionIcon(String filePath, int userId)
getTaskDescriptionIcon
in interface IActivityManager
public void startInPlaceAnimationOnFrontMostApplication(ActivityOptions opts) throws RemoteException
startInPlaceAnimationOnFrontMostApplication
in interface IActivityManager
RemoteException
public void removeStack(int stackId)
removeStack
in interface IActivityManager
public boolean removeTask(int taskId)
removeTask
in interface IActivityManager
public void moveTaskToFront(int taskId, int flags, Bundle bOptions)
moveTaskToFront
in interface IActivityManager
public boolean moveActivityTaskToBack(IBinder token, boolean nonRoot)
moveActivityTaskToBack
in interface IActivityManager
token
- A reference to the activity we wish to movenonRoot
- If false then this only works if the activity is the root
of a task; if true it will work for any activity in a task.public void moveTaskBackwards(int task)
moveTaskBackwards
in interface IActivityManager
public IActivityContainer createVirtualActivityContainer(IBinder parentActivityToken, IActivityContainerCallback callback) throws RemoteException
createVirtualActivityContainer
in interface IActivityManager
RemoteException
public void deleteActivityContainer(IActivityContainer container) throws RemoteException
deleteActivityContainer
in interface IActivityManager
RemoteException
public IActivityContainer createStackOnDisplay(int displayId) throws RemoteException
createStackOnDisplay
in interface IActivityManager
RemoteException
public int getActivityDisplayId(IBinder activityToken) throws RemoteException
getActivityDisplayId
in interface IActivityManager
RemoteException
public int getActivityStackId(IBinder token) throws RemoteException
getActivityStackId
in interface IActivityManager
RemoteException
public void exitFreeformMode(IBinder token) throws RemoteException
exitFreeformMode
in interface IActivityManager
RemoteException
public void moveTaskToStack(int taskId, int stackId, boolean toTop)
moveTaskToStack
in interface IActivityManager
public void swapDockedAndFullscreenStack() throws RemoteException
IActivityManager
swapDockedAndFullscreenStack
in interface IActivityManager
RemoteException
public boolean moveTaskToDockedStack(int taskId, int createMode, boolean toTop, boolean animate, Rect initialBounds, boolean moveHomeStackFront)
moveTaskToDockedStack
in interface IActivityManager
taskId
- Id of task to move.createMode
- The mode the docked stack should be created in if it doesn't exist
already. See
ActivityManager.DOCKED_STACK_CREATE_MODE_TOP_OR_LEFT
and
ActivityManager.DOCKED_STACK_CREATE_MODE_BOTTOM_OR_RIGHT
toTop
- If the task and stack should be moved to the top.animate
- Whether we should play an animation for the moving the taskinitialBounds
- If the docked stack gets created, it will use these bounds for the
docked stack. Pass null
to use default bounds.public boolean moveTopActivityToPinnedStack(int stackId, Rect bounds)
moveTopActivityToPinnedStack
in interface IActivityManager
stackId
- Id of stack to move the top activity to pinned stack.bounds
- Bounds to use for pinned stack.public void resizeStack(int stackId, Rect bounds, boolean allowResizeInDockedMode, boolean preserveWindows, boolean animate, int animationDuration)
IActivityManager
resizeStack
in interface IActivityManager
stackId
- Id of the stack to resize.bounds
- Bounds to resize the stack to or null
for fullscreen.allowResizeInDockedMode
- True if the resize should be allowed when the docked stack is
active.preserveWindows
- True if the windows of activities contained in the stack should be
preserved.animate
- True if the stack resize should be animated.animationDuration
- The duration of the resize animation in milliseconds or -1 if the
default animation duration should be used.public void resizeDockedStack(Rect dockedBounds, Rect tempDockedTaskBounds, Rect tempDockedTaskInsetBounds, Rect tempOtherTaskBounds, Rect tempOtherTaskInsetBounds)
IActivityManager
resizeDockedStack
in interface IActivityManager
dockedBounds
- The bounds for the docked stack.tempDockedTaskBounds
- The temporary bounds for the tasks in the docked stack, which
might be different from the stack bounds to allow more
flexibility while resizing, or null
if they should be the
same as the stack bounds.tempDockedTaskInsetBounds
- The temporary bounds for the tasks to calculate the insets.
When resizing, we usually "freeze" the layout of a task. To
achieve that, we also need to "freeze" the insets, which
gets achieved by changing task bounds but not bounds used
to calculate the insets in this transient statetempOtherTaskBounds
- The temporary bounds for the tasks in all other stacks, or
null
if they should be the same as the stack bounds.tempOtherTaskInsetBounds
- Like tempDockedTaskInsetBounds
, but for the other
stacks.public void resizePinnedStack(Rect pinnedBounds, Rect tempPinnedTaskBounds)
IActivityManager
resizePinnedStack
in interface IActivityManager
pinnedBounds
- The bounds for the pinned stack.tempPinnedTaskBounds
- The temporary bounds for the tasks in the pinned stack, which
might be different from the stack bounds to allow more
flexibility while resizing, or null
if they should be the
same as the stack bounds.public void positionTaskInStack(int taskId, int stackId, int position)
positionTaskInStack
in interface IActivityManager
public List<ActivityManager.StackInfo> getAllStackInfos()
getAllStackInfos
in interface IActivityManager
public ActivityManager.StackInfo getStackInfo(int stackId)
getStackInfo
in interface IActivityManager
public boolean isInHomeStack(int taskId)
isInHomeStack
in interface IActivityManager
public int getTaskForActivity(IBinder token, boolean onlyRoot)
getTaskForActivity
in interface IActivityManager
public void updateDeviceOwner(String packageName)
updateDeviceOwner
in interface IActivityManager
public void updateLockTaskPackages(int userId, String[] packages)
updateLockTaskPackages
in interface IActivityManager
public void startLockTaskMode(int taskId)
startLockTaskMode
in interface IActivityManager
public void startLockTaskMode(IBinder token)
startLockTaskMode
in interface IActivityManager
public void startSystemLockTaskMode(int taskId) throws RemoteException
startSystemLockTaskMode
in interface IActivityManager
RemoteException
public void stopLockTaskMode()
stopLockTaskMode
in interface IActivityManager
public void stopSystemLockTaskMode() throws RemoteException
stopSystemLockTaskMode
in interface IActivityManager
RemoteException
public boolean isInLockTaskMode()
isInLockTaskMode
in interface IActivityManager
public int getLockTaskModeState()
getLockTaskModeState
in interface IActivityManager
public void showLockTaskEscapeMessage(IBinder token)
showLockTaskEscapeMessage
in interface IActivityManager
public String checkContentProviderAccess(String authority, int userId)
public final IActivityManager.ContentProviderHolder getContentProvider(IApplicationThread caller, String name, int userId, boolean stable)
getContentProvider
in interface IActivityManager
public IActivityManager.ContentProviderHolder getContentProviderExternal(String name, int userId, IBinder token)
getContentProviderExternal
in interface IActivityManager
public void removeContentProvider(IBinder connection, boolean stable)
removeContentProvider
in interface IActivityManager
public void removeContentProviderExternal(String name, IBinder token)
removeContentProviderExternal
in interface IActivityManager
public final void publishContentProviders(IApplicationThread caller, List<IActivityManager.ContentProviderHolder> providers)
publishContentProviders
in interface IActivityManager
public boolean refContentProvider(IBinder connection, int stable, int unstable)
refContentProvider
in interface IActivityManager
public void unstableProviderDied(IBinder connection)
unstableProviderDied
in interface IActivityManager
public void appNotRespondingViaProvider(IBinder connection)
appNotRespondingViaProvider
in interface IActivityManager
public final void installSystemProviders()
public String getProviderMimeType(Uri uri, int userId)
getProviderMimeType
in interface IActivityManager
public void unhandledBack()
unhandledBack
in interface IActivityManager
public ParcelFileDescriptor openContentUri(Uri uri) throws RemoteException
openContentUri
in interface IActivityManager
RemoteException
public void notifyPinnedStackAnimationEnded()
notifyPinnedStackAnimationEnded
in interface IActivityManager
public void notifyCleartextNetwork(int uid, byte[] firstPacket)
notifyCleartextNetwork
in interface IActivityManager
public boolean shutdown(int timeout)
shutdown
in interface IActivityManager
public final void activitySlept(IBinder token)
activitySlept
in interface IActivityManager
public void setLockScreenShown(boolean showing, boolean occluded)
setLockScreenShown
in interface IActivityManager
public void notifyLockedProfile(int userId)
notifyLockedProfile
in interface IActivityManager
public void startConfirmDeviceCredentialIntent(Intent intent)
startConfirmDeviceCredentialIntent
in interface IActivityManager
public void stopAppSwitches()
stopAppSwitches
in interface IActivityManager
public void resumeAppSwitches()
resumeAppSwitches
in interface IActivityManager
public void setDebugApp(String packageName, boolean waitForDebugger, boolean persistent)
setDebugApp
in interface IActivityManager
public void setAlwaysFinish(boolean enabled)
setAlwaysFinish
in interface IActivityManager
public void setLenientBackgroundCheck(boolean enabled)
setLenientBackgroundCheck
in interface IActivityManager
public void setActivityController(IActivityController controller, boolean imAMonkey)
setActivityController
in interface IActivityManager
public void setUserIsMonkey(boolean userIsMonkey)
setUserIsMonkey
in interface IActivityManager
public boolean isUserAMonkey()
isUserAMonkey
in interface IActivityManager
public void requestBugReport(int bugreportType)
requestBugReport
in interface IActivityManager
public static long getInputDispatchingTimeoutLocked(com.android.server.am.ActivityRecord r)
public static long getInputDispatchingTimeoutLocked(com.android.server.am.ProcessRecord r)
public long inputDispatchingTimedOut(int pid, boolean aboveSystem, String reason)
inputDispatchingTimedOut
in interface IActivityManager
public boolean inputDispatchingTimedOut(com.android.server.am.ProcessRecord proc, com.android.server.am.ActivityRecord activity, com.android.server.am.ActivityRecord parent, boolean aboveSystem, String reason)
public Bundle getAssistContextExtras(int requestType)
getAssistContextExtras
in interface IActivityManager
public boolean isAssistDataAllowedOnCurrentActivity()
isAssistDataAllowedOnCurrentActivity
in interface IActivityManager
public boolean showAssistFromActivity(IBinder token, Bundle args)
showAssistFromActivity
in interface IActivityManager
public boolean requestAssistContextExtras(int requestType, IResultReceiver receiver, Bundle receiverExtras, IBinder activityToken, boolean focused, boolean newSessionId)
requestAssistContextExtras
in interface IActivityManager
public void reportAssistContextExtras(IBinder token, Bundle extras, AssistStructure structure, AssistContent content, Uri referrer)
reportAssistContextExtras
in interface IActivityManager
public boolean launchAssistIntent(Intent intent, int requestType, String hint, int userHandle, Bundle args)
launchAssistIntent
in interface IActivityManager
public void registerProcessObserver(IProcessObserver observer)
registerProcessObserver
in interface IActivityManager
public void unregisterProcessObserver(IProcessObserver observer)
unregisterProcessObserver
in interface IActivityManager
public void registerUidObserver(IUidObserver observer, int which)
registerUidObserver
in interface IActivityManager
public void unregisterUidObserver(IUidObserver observer)
unregisterUidObserver
in interface IActivityManager
public boolean convertFromTranslucent(IBinder token)
convertFromTranslucent
in interface IActivityManager
public boolean convertToTranslucent(IBinder token, ActivityOptions options)
convertToTranslucent
in interface IActivityManager
public boolean requestVisibleBehind(IBinder token, boolean visible)
requestVisibleBehind
in interface IActivityManager
public boolean isBackgroundVisibleBehind(IBinder token)
isBackgroundVisibleBehind
in interface IActivityManager
public ActivityOptions getActivityOptions(IBinder token)
getActivityOptions
in interface IActivityManager
public void setImmersive(IBinder token, boolean immersive)
setImmersive
in interface IActivityManager
public boolean isImmersive(IBinder token)
isImmersive
in interface IActivityManager
public void setVrThread(int tid)
setVrThread
in interface IActivityManager
public void setRenderThread(int tid)
setRenderThread
in interface IActivityManager
public int setVrMode(IBinder token, boolean enabled, ComponentName packageName)
setVrMode
in interface IActivityManager
public boolean isVrModePackageEnabled(ComponentName packageName)
isVrModePackageEnabled
in interface IActivityManager
public boolean isTopActivityImmersive()
isTopActivityImmersive
in interface IActivityManager
public boolean isTopOfTask(IBinder token)
isTopOfTask
in interface IActivityManager
public void setHasTopUi(boolean hasTopUi) throws RemoteException
IActivityManager
This flag can only be set for persistent processes.
setHasTopUi
in interface IActivityManager
hasTopUi
- Whether the calling process has "top-level" UI.RemoteException
public final void enterSafeMode()
enterSafeMode
in interface IActivityManager
public final void showSafeModeOverlay()
public void noteWakeupAlarm(IIntentSender sender, int sourceUid, String sourcePkg, String tag)
noteWakeupAlarm
in interface IActivityManager
noteWakeupAlarm
in class ActivityManagerNative
public void noteAlarmStart(IIntentSender sender, int sourceUid, String tag)
noteAlarmStart
in interface IActivityManager
noteAlarmStart
in class ActivityManagerNative
public void noteAlarmFinish(IIntentSender sender, int sourceUid, String tag)
noteAlarmFinish
in interface IActivityManager
noteAlarmFinish
in class ActivityManagerNative
public boolean killPids(int[] pids, String pReason, boolean secure)
killPids
in interface IActivityManager
public void killUid(int appId, int userId, String reason)
killUid
in interface IActivityManager
public boolean killProcessesBelowForeground(String reason)
killProcessesBelowForeground
in interface IActivityManager
public void hang(IBinder who, boolean allowRestart)
hang
in interface IActivityManager
public void restart()
restart
in interface IActivityManager
public void performIdleMaintenance()
performIdleMaintenance
in interface IActivityManager
public void sendIdleJobTrigger()
sendIdleJobTrigger
in interface IActivityManager
public boolean testIsSystemReady()
testIsSystemReady
in interface IActivityManager
public void systemReady(Runnable goingCallback)
public void handleApplicationCrash(IBinder app, ApplicationErrorReport.CrashInfo crashInfo)
RuntimeInit
to report when an application crashes.
The application process will exit immediately after this call returns.handleApplicationCrash
in interface IActivityManager
app
- object of the crashing app, null for the system servercrashInfo
- describing the exceptionpublic void handleApplicationStrictModeViolation(IBinder app, int violationMask, StrictMode.ViolationInfo info)
handleApplicationStrictModeViolation
in interface IActivityManager
public boolean handleApplicationWtf(IBinder app, String tag, boolean system, ApplicationErrorReport.CrashInfo crashInfo)
Log
via RuntimeInit
to report serious errors.handleApplicationWtf
in interface IActivityManager
app
- object of the crashing app, null for the system servertag
- reported by the callersystem
- whether this wtf is coming from the systemcrashInfo
- describing the context of the errorpublic void addErrorToDropBox(String eventType, com.android.server.am.ProcessRecord process, String processName, com.android.server.am.ActivityRecord activity, com.android.server.am.ActivityRecord parent, String subject, String report, File dataFile, ApplicationErrorReport.CrashInfo crashInfo)
eventType
- to include in the drop box tag ("crash", "wtf", etc.)process
- which caused the error, null means the system serveractivity
- which triggered the error, null if unknownparent
- activity related to the error, null if unknownsubject
- line related to the error, null if absentreport
- in long form describing the error, null if absentdataFile
- text file to include in the report, null if nonecrashInfo
- giving an application stack trace, null if absentpublic List<ActivityManager.ProcessErrorStateInfo> getProcessesInErrorState()
getProcessesInErrorState
in interface IActivityManager
public List<ActivityManager.RunningAppProcessInfo> getRunningAppProcesses()
getRunningAppProcesses
in interface IActivityManager
public List<ApplicationInfo> getRunningExternalApplications()
getRunningExternalApplications
in interface IActivityManager
public void getMyMemoryState(ActivityManager.RunningAppProcessInfo outInfo)
getMyMemoryState
in interface IActivityManager
public int getMemoryTrimLevel()
getMemoryTrimLevel
in interface IActivityManager
public void onShellCommand(FileDescriptor in, FileDescriptor out, FileDescriptor err, String[] args, ResultReceiver resultReceiver)
Binder
Binder.shellCommand(java.io.FileDescriptor, java.io.FileDescriptor, java.io.FileDescriptor, java.lang.String[], android.os.ResultReceiver)
. The default implementation simply prints
an error message. Override and replace with your own.
Note: no permission checking is done before calling this method; you must
apply any security checks as appropriate for the command being executed.
Consider using ShellCommand
to help in the implementation.
onShellCommand
in class Binder
protected void dump(FileDescriptor fd, PrintWriter pw, String[] args)
Binder
protected boolean dumpProvider(FileDescriptor fd, PrintWriter pw, String name, String[] args, int opti, boolean dumpAll)
protected boolean dumpActivity(FileDescriptor fd, PrintWriter pw, String name, String[] args, int opti, boolean dumpAll)
public List<ActivityManager.RunningServiceInfo> getServices(int maxNum, int flags)
getServices
in interface IActivityManager
public PendingIntent getRunningServiceControlPanel(ComponentName name)
getRunningServiceControlPanel
in interface IActivityManager
public ComponentName startService(IApplicationThread caller, Intent service, String resolvedType, String callingPackage, int userId) throws TransactionTooLargeException
startService
in interface IActivityManager
TransactionTooLargeException
public int stopService(IApplicationThread caller, Intent service, String resolvedType, int userId)
stopService
in interface IActivityManager
public IBinder peekService(Intent service, String resolvedType, String callingPackage)
peekService
in interface IActivityManager
public boolean stopServiceToken(ComponentName className, IBinder token, int startId)
stopServiceToken
in interface IActivityManager
public void setServiceForeground(ComponentName className, IBinder token, int id, Notification notification, int flags)
setServiceForeground
in interface IActivityManager
public int handleIncomingUser(int callingPid, int callingUid, int userId, boolean allowAll, boolean requireFull, String name, String callerPackage)
handleIncomingUser
in interface IActivityManager
public int bindService(IApplicationThread caller, IBinder token, Intent service, String resolvedType, IServiceConnection connection, int flags, String callingPackage, int userId) throws TransactionTooLargeException
bindService
in interface IActivityManager
TransactionTooLargeException
public boolean unbindService(IServiceConnection connection)
unbindService
in interface IActivityManager
public void publishService(IBinder token, Intent intent, IBinder service)
publishService
in interface IActivityManager
public void unbindFinished(IBinder token, Intent intent, boolean doRebind)
unbindFinished
in interface IActivityManager
public void serviceDoneExecuting(IBinder token, int type, int startId, int res)
serviceDoneExecuting
in interface IActivityManager
public boolean bindBackupAgent(String packageName, int backupMode, int userId)
bindBackupAgent
in interface IActivityManager
public void clearPendingBackup()
clearPendingBackup
in interface IActivityManager
public void backupAgentCreated(String agentPackageName, IBinder agent)
backupAgentCreated
in interface IActivityManager
public void unbindBackupAgent(ApplicationInfo appInfo)
unbindBackupAgent
in interface IActivityManager
public Intent registerReceiver(IApplicationThread caller, String callerPackage, IIntentReceiver receiver, IntentFilter filter, String permission, int userId)
registerReceiver
in interface IActivityManager
public void unregisterReceiver(IIntentReceiver receiver)
unregisterReceiver
in interface IActivityManager
public final int broadcastIntent(IApplicationThread caller, Intent intent, String resolvedType, IIntentReceiver resultTo, int resultCode, String resultData, Bundle resultExtras, String[] requiredPermissions, int appOp, Bundle bOptions, boolean serialized, boolean sticky, int userId)
broadcastIntent
in interface IActivityManager
public final void unbroadcastIntent(IApplicationThread caller, Intent intent, int userId)
unbroadcastIntent
in interface IActivityManager
public void finishReceiver(IBinder who, int resultCode, String resultData, Bundle resultExtras, boolean resultAbort, int flags)
finishReceiver
in interface IActivityManager
public boolean startInstrumentation(ComponentName className, String profileFile, int flags, Bundle arguments, IInstrumentationWatcher watcher, IUiAutomationConnection uiAutomationConnection, int userId, String abiOverride)
startInstrumentation
in interface IActivityManager
public void finishInstrumentation(IApplicationThread target, int resultCode, Bundle results)
finishInstrumentation
in interface IActivityManager
public ConfigurationInfo getDeviceConfigurationInfo()
getDeviceConfigurationInfo
in interface IActivityManager
public int getFocusedStackId() throws RemoteException
getFocusedStackId
in interface IActivityManager
RemoteException
public Configuration getConfiguration()
getConfiguration
in interface IActivityManager
public void suppressResizeConfigChanges(boolean suppress) throws RemoteException
suppressResizeConfigChanges
in interface IActivityManager
RemoteException
public void moveTasksToFullscreenStack(int fromStackId, boolean onTop)
moveTasksToFullscreenStack
in interface IActivityManager
public void updatePersistentConfiguration(Configuration values)
updatePersistentConfiguration
in interface IActivityManager
public void updateConfiguration(Configuration values)
updateConfiguration
in interface IActivityManager
public boolean shouldUpRecreateTask(IBinder token, String destAffinity)
shouldUpRecreateTask
in interface IActivityManager
public boolean navigateUpTo(IBinder token, Intent destIntent, int resultCode, Intent resultData)
navigateUpTo
in interface IActivityManager
public int getLaunchedFromUid(IBinder activityToken)
getLaunchedFromUid
in interface IActivityManager
public String getLaunchedFromPackage(IBinder activityToken)
getLaunchedFromPackage
in interface IActivityManager
public void setTestPssMode(boolean enabled)
public void signalPersistentProcesses(int sig) throws RemoteException
signalPersistentProcesses
in interface IActivityManager
RemoteException
public boolean profileControl(String process, int userId, boolean start, ProfilerInfo profilerInfo, int profileType) throws RemoteException
profileControl
in interface IActivityManager
RemoteException
public boolean dumpHeap(String process, int userId, boolean managed, String path, ParcelFileDescriptor fd) throws RemoteException
dumpHeap
in interface IActivityManager
RemoteException
public void setDumpHeapDebugLimit(String processName, int uid, long maxMemSize, String reportPackage)
setDumpHeapDebugLimit
in interface IActivityManager
public void dumpHeapFinished(String path)
dumpHeapFinished
in interface IActivityManager
public void monitor()
monitor
in interface Watchdog.Monitor
public boolean startUserInBackground(int userId)
startUserInBackground
in interface IActivityManager
public boolean unlockUser(int userId, byte[] token, byte[] secret, IProgressListener listener)
unlockUser
in interface IActivityManager
public boolean switchUser(int targetUserId)
switchUser
in interface IActivityManager
public int stopUser(int userId, boolean force, IStopUserCallback callback)
stopUser
in interface IActivityManager
public UserInfo getCurrentUser()
getCurrentUser
in interface IActivityManager
public boolean isUserRunning(int userId, int flags)
isUserRunning
in interface IActivityManager
public int[] getRunningUserIds()
getRunningUserIds
in interface IActivityManager
public void registerUserSwitchObserver(IUserSwitchObserver observer, String name)
registerUserSwitchObserver
in interface IActivityManager
public void unregisterUserSwitchObserver(IUserSwitchObserver observer)
unregisterUserSwitchObserver
in interface IActivityManager
public boolean isUserStopped(int userId)
public boolean startBinderTracking() throws RemoteException
startBinderTracking
in interface IActivityManager
RemoteException
public boolean stopBinderTrackingAndDump(ParcelFileDescriptor fd) throws RemoteException
stopBinderTrackingAndDump
in interface IActivityManager
RemoteException
public void killPackageDependents(String packageName, int userId)
killPackageDependents
in interface IActivityManager
public boolean canBypassWorkChallenge(PendingIntent intent) throws RemoteException
IActivityManager
canBypassWorkChallenge
in interface IActivityManager
intent
- the PendingIntent
to be tested.true
if the intent should not trigger a work challenge, false
otherwise.RemoteException