Methods Summary |
---|
public boolean | clearApplicationUserData(java.lang.String packageName, android.content.pm.IPackageDataObserver observer)
try {
return ActivityManagerNative.getDefault().clearApplicationUserData(packageName,
observer);
} catch (RemoteException e) {
return false;
}
|
public android.content.pm.ConfigurationInfo | getDeviceConfigurationInfo()Get the device configuration attributes.
try {
return ActivityManagerNative.getDefault().getDeviceConfigurationInfo();
} catch (RemoteException e) {
}
return null;
|
public void | getMemoryInfo(android.app.ActivityManager$MemoryInfo outInfo)
try {
ActivityManagerNative.getDefault().getMemoryInfo(outInfo);
} catch (RemoteException e) {
}
|
public java.util.List | getProcessesInErrorState()Returns a list of any processes that are currently in an error condition. The result
will be null if all processes are running properly at this time.
try {
return ActivityManagerNative.getDefault().getProcessesInErrorState();
} catch (RemoteException e) {
return null;
}
|
public java.util.List | getRecentTasks(int maxNum, int flags)Return a list of the tasks that the user has recently launched, with
the most recent being first and older ones after in order.
try {
return ActivityManagerNative.getDefault().getRecentTasks(maxNum,
flags);
} catch (RemoteException e) {
// System dead, we will be dead too soon!
return null;
}
|
public java.util.List | getRunningAppProcesses()Returns a list of application processes that are running on the device.
try {
return ActivityManagerNative.getDefault().getRunningAppProcesses();
} catch (RemoteException e) {
return null;
}
|
public java.util.List | getRunningServices(int maxNum)Return a list of the services that are currently running.
try {
return (List<RunningServiceInfo>)ActivityManagerNative.getDefault()
.getServices(maxNum, 0);
} catch (RemoteException e) {
// System dead, we will be dead too soon!
return null;
}
|
public java.util.List | getRunningTasks(int maxNum)Return a list of the tasks that are currently running, with
the most recent being first and older ones after in order. Note that
"running" does not mean any of the task's code is currently loaded or
activity -- the task may have been frozen by the system, so that it
can be restarted in its previous state when next brought to the
foreground.
try {
return (List<RunningTaskInfo>)ActivityManagerNative.getDefault()
.getTasks(maxNum, 0, null);
} catch (RemoteException e) {
// System dead, we will be dead too soon!
return null;
}
|
public void | restartPackage(java.lang.String packageName)Have the system perform a force stop of everything associated with
the given application package. All processes that share its uid
will be killed, all services it has running stopped, all activities
removed, etc. In addition, a {@link Intent#ACTION_PACKAGE_RESTARTED}
broadcast will be sent, so that any of its registered alarms can
be stopped, notifications removed, etc.
You must hold the permission
{@link android.Manifest.permission#RESTART_PACKAGES} to be able to
call this method.
try {
ActivityManagerNative.getDefault().restartPackage(packageName);
} catch (RemoteException e) {
}
|