Loading core/java/android/app/ActivityManager.java +2 −12 Original line number Diff line number Diff line Loading @@ -1242,27 +1242,17 @@ public class ActivityManager { } } /** * If set, the process of the root activity of the task will be killed * as part of removing the task. * @hide */ public static final int REMOVE_TASK_KILL_PROCESS = 0x0001; /** * Completely remove the given task. * * @param taskId Identifier of the task to be removed. * @param flags Additional operational flags. May be 0 or * {@link #REMOVE_TASK_KILL_PROCESS}. * @return Returns true if the given task was found and removed. * * @hide */ public boolean removeTask(int taskId, int flags) throws SecurityException { public boolean removeTask(int taskId) throws SecurityException { try { return ActivityManagerNative.getDefault().removeTask(taskId, flags); return ActivityManagerNative.getDefault().removeTask(taskId); } catch (RemoteException e) { // System dead, we will be dead too soon! return false; Loading core/java/android/app/ActivityManagerNative.java +2 −4 Original line number Diff line number Diff line Loading @@ -1884,8 +1884,7 @@ public abstract class ActivityManagerNative extends Binder implements IActivityM { data.enforceInterface(IActivityManager.descriptor); int taskId = data.readInt(); int fl = data.readInt(); boolean result = removeTask(taskId, fl); boolean result = removeTask(taskId); reply.writeNoException(); reply.writeInt(result ? 1 : 0); return true; Loading Loading @@ -4778,12 +4777,11 @@ class ActivityManagerProxy implements IActivityManager return result; } public boolean removeTask(int taskId, int flags) throws RemoteException { public boolean removeTask(int taskId) throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); data.writeInterfaceToken(IActivityManager.descriptor); data.writeInt(taskId); data.writeInt(flags); mRemote.transact(REMOVE_TASK_TRANSACTION, data, reply, 0); reply.readException(); boolean result = reply.readInt() != 0; Loading core/java/android/app/IActivityManager.java +1 −1 Original line number Diff line number Diff line Loading @@ -373,7 +373,7 @@ public interface IActivityManager extends IInterface { public boolean isUserRunning(int userid, boolean orStopping) throws RemoteException; public int[] getRunningUserIds() throws RemoteException; public boolean removeTask(int taskId, int flags) throws RemoteException; public boolean removeTask(int taskId) throws RemoteException; public void registerProcessObserver(IProcessObserver observer) throws RemoteException; public void unregisterProcessObserver(IProcessObserver observer) throws RemoteException; Loading packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java +1 −1 Original line number Diff line number Diff line Loading @@ -728,7 +728,7 @@ public class RecentsPanelView extends FrameLayout implements OnItemClickListener final ActivityManager am = (ActivityManager) getContext().getSystemService(Context.ACTIVITY_SERVICE); if (am != null) { am.removeTask(ad.persistentTaskId, ActivityManager.REMOVE_TASK_KILL_PROCESS); am.removeTask(ad.persistentTaskId); // Accessibility feedback setContentDescription( Loading packages/SystemUI/src/com/android/systemui/recents/misc/SystemServicesProxy.java +5 −5 Original line number Diff line number Diff line Loading @@ -291,13 +291,13 @@ public class SystemServicesProxy { } } /** Removes the task and kills the process */ public void removeTask(int taskId, boolean isDocument) { /** Removes the task */ public void removeTask(int taskId) { if (mAm == null) return; if (Constants.DebugFlags.App.EnableSystemServicesProxy) return; // Remove the task, and only kill the process if it is not a document mAm.removeTask(taskId, isDocument ? 0 : ActivityManager.REMOVE_TASK_KILL_PROCESS); // Remove the task. mAm.removeTask(taskId); } /** Loading Loading
core/java/android/app/ActivityManager.java +2 −12 Original line number Diff line number Diff line Loading @@ -1242,27 +1242,17 @@ public class ActivityManager { } } /** * If set, the process of the root activity of the task will be killed * as part of removing the task. * @hide */ public static final int REMOVE_TASK_KILL_PROCESS = 0x0001; /** * Completely remove the given task. * * @param taskId Identifier of the task to be removed. * @param flags Additional operational flags. May be 0 or * {@link #REMOVE_TASK_KILL_PROCESS}. * @return Returns true if the given task was found and removed. * * @hide */ public boolean removeTask(int taskId, int flags) throws SecurityException { public boolean removeTask(int taskId) throws SecurityException { try { return ActivityManagerNative.getDefault().removeTask(taskId, flags); return ActivityManagerNative.getDefault().removeTask(taskId); } catch (RemoteException e) { // System dead, we will be dead too soon! return false; Loading
core/java/android/app/ActivityManagerNative.java +2 −4 Original line number Diff line number Diff line Loading @@ -1884,8 +1884,7 @@ public abstract class ActivityManagerNative extends Binder implements IActivityM { data.enforceInterface(IActivityManager.descriptor); int taskId = data.readInt(); int fl = data.readInt(); boolean result = removeTask(taskId, fl); boolean result = removeTask(taskId); reply.writeNoException(); reply.writeInt(result ? 1 : 0); return true; Loading Loading @@ -4778,12 +4777,11 @@ class ActivityManagerProxy implements IActivityManager return result; } public boolean removeTask(int taskId, int flags) throws RemoteException { public boolean removeTask(int taskId) throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); data.writeInterfaceToken(IActivityManager.descriptor); data.writeInt(taskId); data.writeInt(flags); mRemote.transact(REMOVE_TASK_TRANSACTION, data, reply, 0); reply.readException(); boolean result = reply.readInt() != 0; Loading
core/java/android/app/IActivityManager.java +1 −1 Original line number Diff line number Diff line Loading @@ -373,7 +373,7 @@ public interface IActivityManager extends IInterface { public boolean isUserRunning(int userid, boolean orStopping) throws RemoteException; public int[] getRunningUserIds() throws RemoteException; public boolean removeTask(int taskId, int flags) throws RemoteException; public boolean removeTask(int taskId) throws RemoteException; public void registerProcessObserver(IProcessObserver observer) throws RemoteException; public void unregisterProcessObserver(IProcessObserver observer) throws RemoteException; Loading
packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java +1 −1 Original line number Diff line number Diff line Loading @@ -728,7 +728,7 @@ public class RecentsPanelView extends FrameLayout implements OnItemClickListener final ActivityManager am = (ActivityManager) getContext().getSystemService(Context.ACTIVITY_SERVICE); if (am != null) { am.removeTask(ad.persistentTaskId, ActivityManager.REMOVE_TASK_KILL_PROCESS); am.removeTask(ad.persistentTaskId); // Accessibility feedback setContentDescription( Loading
packages/SystemUI/src/com/android/systemui/recents/misc/SystemServicesProxy.java +5 −5 Original line number Diff line number Diff line Loading @@ -291,13 +291,13 @@ public class SystemServicesProxy { } } /** Removes the task and kills the process */ public void removeTask(int taskId, boolean isDocument) { /** Removes the task */ public void removeTask(int taskId) { if (mAm == null) return; if (Constants.DebugFlags.App.EnableSystemServicesProxy) return; // Remove the task, and only kill the process if it is not a document mAm.removeTask(taskId, isDocument ? 0 : ActivityManager.REMOVE_TASK_KILL_PROCESS); // Remove the task. mAm.removeTask(taskId); } /** Loading