public abstract class ActivityManagerInternal extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ActivityManagerInternal.SleepToken
Sleep tokens cause the activity manager to put the top activity to sleep.
|
Modifier and Type | Field and Description |
---|---|
static int |
APP_TRANSITION_SAVED_SURFACE
Type for
notifyAppTransitionStarting(int) : The transition was started because we had
the surface saved. |
static int |
APP_TRANSITION_STARTING_WINDOW
Type for
notifyAppTransitionStarting(int) : The transition was started because we drew
the starting window. |
static int |
APP_TRANSITION_TIMEOUT
Type for
notifyAppTransitionStarting(int) : The transition was started because of a
timeout. |
static int |
APP_TRANSITION_WINDOWS_DRAWN
Type for
notifyAppTransitionStarting(int) : The transition was started because we all
app windows were drawn |
Constructor and Description |
---|
ActivityManagerInternal() |
Modifier and Type | Method and Description |
---|---|
abstract ActivityManagerInternal.SleepToken |
acquireSleepToken(String tag)
Acquires a sleep token with the specified tag.
|
abstract String |
checkContentProviderAccess(String authority,
int userId)
Verify that calling app has access to the given provider.
|
abstract ComponentName |
getHomeActivityForUser(int userId)
Returns home activity for the specified user.
|
abstract List<IBinder> |
getTopVisibleActivities()
Returns the top activity from each of the currently visible stacks.
|
abstract int |
getUidProcessState(int uid)
Get the procstate for the UID.
|
abstract void |
killForegroundAppsForUser(int userHandle)
Kill foreground apps from the specified user.
|
abstract void |
notifyAppTransitionCancelled()
Callback for window manager to let activity manager know that the app transition was
cancelled.
|
abstract void |
notifyAppTransitionFinished()
Callback for window manager to let activity manager know that the app transition is finished.
|
abstract void |
notifyAppTransitionStarting(int reason)
Callback for window manager to let activity manager know that we are finally starting the
app transition;
|
abstract void |
notifyDockedStackMinimizedChanged(boolean minimized)
Callback for window manager to let activity manager know that docked stack changes its
minimized state.
|
abstract void |
notifyStartingWindowDrawn()
Callback for window manager to let activity manager know that the starting window has been
drawn
|
abstract void |
onLocalVoiceInteractionStarted(IBinder callingActivity,
IVoiceInteractionSession mSession,
IVoiceInteractor mInteractor) |
abstract void |
onUserRemoved(int userId)
Called when a user has been deleted.
|
abstract void |
onWakefulnessChanged(int wakefulness) |
abstract void |
setPendingIntentWhitelistDuration(IIntentSender target,
long duration)
Sets how long a
PendingIntent can be temporarily whitelist to by bypass restrictions
such as Power Save mode. |
abstract int |
startActivitiesAsPackage(String packageName,
int userId,
Intent[] intents,
Bundle bOptions)
Start activity
intents as if packageName on user userId did it. |
abstract int |
startIsolatedProcess(String entryPoint,
String[] mainArgs,
String processName,
String abiOverride,
int uid,
Runnable crashHandler) |
abstract void |
updatePersistentConfigurationForUser(Configuration values,
int userId)
Updates and persists the
Configuration for a given user. |
public static final int APP_TRANSITION_SAVED_SURFACE
notifyAppTransitionStarting(int)
: The transition was started because we had
the surface saved.public static final int APP_TRANSITION_STARTING_WINDOW
notifyAppTransitionStarting(int)
: The transition was started because we drew
the starting window.public static final int APP_TRANSITION_WINDOWS_DRAWN
notifyAppTransitionStarting(int)
: The transition was started because we all
app windows were drawnpublic static final int APP_TRANSITION_TIMEOUT
notifyAppTransitionStarting(int)
: The transition was started because of a
timeout.public abstract String checkContentProviderAccess(String authority, int userId)
public abstract void onWakefulnessChanged(int wakefulness)
public abstract int startIsolatedProcess(String entryPoint, String[] mainArgs, String processName, String abiOverride, int uid, Runnable crashHandler)
public abstract ActivityManagerInternal.SleepToken acquireSleepToken(String tag)
tag
- A string identifying the purpose of the token (eg. "Dream").public abstract ComponentName getHomeActivityForUser(int userId)
userId
- ID of the user or UserHandle.USER_ALL
public abstract void onUserRemoved(int userId)
userId
- The user being cleaned up.public abstract void onLocalVoiceInteractionStarted(IBinder callingActivity, IVoiceInteractionSession mSession, IVoiceInteractor mInteractor)
public abstract void notifyStartingWindowDrawn()
public abstract void notifyAppTransitionStarting(int reason)
reason
- The reason why the app transition started. Must be one of the APP_TRANSITION_*
values.public abstract void notifyAppTransitionCancelled()
public abstract void notifyAppTransitionFinished()
public abstract List<IBinder> getTopVisibleActivities()
public abstract void notifyDockedStackMinimizedChanged(boolean minimized)
public abstract void killForegroundAppsForUser(int userHandle)
public abstract void setPendingIntentWhitelistDuration(IIntentSender target, long duration)
PendingIntent
can be temporarily whitelist to by bypass restrictions
such as Power Save mode.public abstract void updatePersistentConfigurationForUser(Configuration values, int userId)
Configuration
for a given user.values
- the configuration to updateuserId
- the user to update the configuration forpublic abstract int startActivitiesAsPackage(String packageName, int userId, Intent[] intents, Bundle bOptions)
intents
as if packageName
on user userId
did it.public abstract int getUidProcessState(int uid)
ActivityManager.MIN_PROCESS_STATE
and ActivityManager.MAX_PROCESS_STATE
.
Note if the UID doesn't exist, it'll return ActivityManager.PROCESS_STATE_NONEXISTENT
(-1).