return true;
}
- case MOVE_TASK_TO_BACK_TRANSACTION: {
- data.enforceInterface(IActivityManager.descriptor);
- int task = data.readInt();
- moveTaskToBack(task);
- reply.writeNoException();
- return true;
- }
-
case MOVE_ACTIVITY_TASK_TO_BACK_TRANSACTION: {
data.enforceInterface(IActivityManager.descriptor);
IBinder token = data.readStrongBinder();
data.recycle();
reply.recycle();
}
- public void moveTaskToBack(int task) throws RemoteException
- {
- Parcel data = Parcel.obtain();
- Parcel reply = Parcel.obtain();
- data.writeInterfaceToken(IActivityManager.descriptor);
- data.writeInt(task);
- mRemote.transact(MOVE_TASK_TO_BACK_TRANSACTION, data, reply, 0);
- reply.readException();
- data.recycle();
- reply.recycle();
- }
public boolean moveActivityTaskToBack(IBinder token, boolean nonRoot)
throws RemoteException {
Parcel data = Parcel.obtain();
public List<ActivityManager.ProcessErrorStateInfo> getProcessesInErrorState()
throws RemoteException;
public void moveTaskToFront(int task, int flags, Bundle options) throws RemoteException;
- public void moveTaskToBack(int task) throws RemoteException;
public boolean moveActivityTaskToBack(IBinder token, boolean nonRoot) throws RemoteException;
public void moveTaskBackwards(int task) throws RemoteException;
public void moveTaskToStack(int taskId, int stackId, boolean toTop) throws RemoteException;
int GET_CALLING_ACTIVITY_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+21;
int GET_TASKS_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+22;
int MOVE_TASK_TO_FRONT_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+23;
- int MOVE_TASK_TO_BACK_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+24;
+
int MOVE_TASK_BACKWARDS_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+25;
int GET_TASK_FOR_ACTIVITY_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+26;
outInfo.foregroundAppThreshold = mProcessList.getMemLevel(
ProcessList.FOREGROUND_APP_ADJ);
}
-
+
// =========================================================
// TASK MANAGEMENT
// =========================================================
ActivityOptions.abort(options);
}
- @Override
- public void moveTaskToBack(int taskId) {
- enforceCallingPermission(android.Manifest.permission.REORDER_TASKS,
- "moveTaskToBack()");
-
- synchronized(this) {
- TaskRecord tr = mStackSupervisor.anyTaskForIdLocked(taskId);
- if (tr != null) {
- if (tr == mStackSupervisor.mLockTaskModeTask) {
- mStackSupervisor.showLockTaskToast();
- return;
- }
- if (DEBUG_STACK) Slog.d(TAG, "moveTaskToBack: moving task=" + tr);
- ActivityStack stack = tr.stack;
- if (stack.mResumedActivity != null && stack.mResumedActivity.task == tr) {
- if (!checkAppSwitchAllowedLocked(Binder.getCallingPid(),
- Binder.getCallingUid(), -1, -1, "Task to back")) {
- return;
- }
- }
- final long origId = Binder.clearCallingIdentity();
- try {
- stack.moveTaskToBackLocked(taskId, null);
- } finally {
- Binder.restoreCallingIdentity(origId);
- }
- }
- }
- }
-
/**
* Moves an activity, and all of the other activities within the same task, to the bottom
* of the history stack. The activity's order within the task is unchanged.
- *
+ *
* @param token A reference to the activity we wish to move
* @param nonRoot 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.
== PackageManager.PERMISSION_GRANTED) {
return null;
}
-
+
PathPermission[] pps = cpi.pathPermissions;
if (pps != null) {
int i = pps.length;
} else if (app.notResponding) {
report = app.notRespondingReport;
}
-
+
if (report != null) {
if (errList == null) {
errList = new ArrayList<ActivityManager.ProcessErrorStateInfo>(1);
}
errList.add(report);
} else {
- Slog.w(TAG, "Missing app error report, app = " + app.processName +
+ Slog.w(TAG, "Missing app error report, app = " + app.processName +
" crashing = " + app.crashing +
" notResponding = " + app.notResponding);
}
}
if ((app.thread != null) && (!app.crashing && !app.notResponding)) {
// Generate process state info for running application
- ActivityManager.RunningAppProcessInfo currApp =
+ ActivityManager.RunningAppProcessInfo currApp =
new ActivityManager.RunningAppProcessInfo(app.processName,
app.pid, app.getPackageList());
fillInProcMemInfo(app, currApp);
boolean dumpAll = false;
boolean dumpClient = false;
String dumpPackage = null;
-
+
int opti = 0;
while (opti < args.length) {
String opt = args[opti];