Loading api/current.xml +22 −0 Original line number Diff line number Diff line Loading @@ -4695,6 +4695,17 @@ visibility="public" > </field> <field name="killAfterRestore" type="int" transient="false" volatile="false" value="16843416" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="label" type="int" transient="false" Loading Loading @@ -6477,6 +6488,17 @@ visibility="public" > </field> <field name="restoreNeedsApplication" type="int" transient="false" volatile="false" value="16843417" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="right" type="int" transient="false" core/java/android/app/ActivityManagerNative.java +22 −1 Original line number Diff line number Diff line Loading @@ -1118,6 +1118,15 @@ public abstract class ActivityManagerNative extends Binder implements IActivityM mi.writeToParcel(reply, 0); return true; } case KILL_APPLICATION_PROCESS_TRANSACTION: { data.enforceInterface(IActivityManager.descriptor); String processName = data.readString(); int uid = data.readInt(); killApplicationProcess(processName, uid); reply.writeNoException(); return true; } } return super.onTransact(code, data, reply, flags); Loading Loading @@ -2449,5 +2458,17 @@ class ActivityManagerProxy implements IActivityManager reply.recycle(); } public void killApplicationProcess(String processName, int uid) throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); data.writeInterfaceToken(IActivityManager.descriptor); data.writeString(processName); data.writeInt(uid); mRemote.transact(KILL_APPLICATION_PROCESS_TRANSACTION, data, reply, 0); reply.readException(); data.recycle(); reply.recycle(); } private IBinder mRemote; } core/java/android/app/ActivityThread.java +12 −1 Original line number Diff line number Diff line Loading @@ -1463,6 +1463,10 @@ public final class ActivityThread { queueOrSendMessage(H.EXIT_APPLICATION, null); } public final void scheduleSuicide() { queueOrSendMessage(H.SUICIDE, null); } public void requestThumbnail(IBinder token) { queueOrSendMessage(H.REQUEST_THUMBNAIL, token); } Loading Loading @@ -1753,6 +1757,7 @@ public final class ActivityThread { public static final int PROFILER_CONTROL = 127; public static final int CREATE_BACKUP_AGENT = 128; public static final int DESTROY_BACKUP_AGENT = 129; public static final int SUICIDE = 130; String codeToString(int code) { if (localLOGV) { switch (code) { Loading Loading @@ -1786,6 +1791,7 @@ public final class ActivityThread { case PROFILER_CONTROL: return "PROFILER_CONTROL"; case CREATE_BACKUP_AGENT: return "CREATE_BACKUP_AGENT"; case DESTROY_BACKUP_AGENT: return "DESTROY_BACKUP_AGENT"; case SUICIDE: return "SUICIDE"; } } return "(unknown)"; Loading Loading @@ -1894,6 +1900,11 @@ public final class ActivityThread { case DESTROY_BACKUP_AGENT: handleDestroyBackupAgent((CreateBackupAgentData)msg.obj); break; case SUICIDE: { Process.killProcess(Process.myPid()); } break; } } } Loading core/java/android/app/ApplicationThreadNative.java +16 −1 Original line number Diff line number Diff line Loading @@ -258,6 +258,13 @@ public abstract class ApplicationThreadNative extends Binder return true; } case SCHEDULE_SUICIDE_TRANSACTION: { data.enforceInterface(IApplicationThread.descriptor); scheduleSuicide(); return true; } case REQUEST_THUMBNAIL_TRANSACTION: { data.enforceInterface(IApplicationThread.descriptor); Loading Loading @@ -653,6 +660,14 @@ class ApplicationThreadProxy implements IApplicationThread { data.recycle(); } public final void scheduleSuicide() throws RemoteException { Parcel data = Parcel.obtain(); data.writeInterfaceToken(IApplicationThread.descriptor); mRemote.transact(SCHEDULE_SUICIDE_TRANSACTION, data, null, IBinder.FLAG_ONEWAY); data.recycle(); } public final void requestThumbnail(IBinder token) throws RemoteException { Parcel data = Parcel.obtain(); Loading core/java/android/app/IActivityManager.java +2 −0 Original line number Diff line number Diff line Loading @@ -158,6 +158,7 @@ public interface IActivityManager extends IInterface { throws RemoteException; public void backupAgentCreated(String packageName, IBinder agent) throws RemoteException; public void unbindBackupAgent(ApplicationInfo appInfo) throws RemoteException; public void killApplicationProcess(String processName, int uid) throws RemoteException; public boolean startInstrumentation(ComponentName className, String profileFile, int flags, Bundle arguments, IInstrumentationWatcher watcher) Loading Loading @@ -433,4 +434,5 @@ public interface IActivityManager extends IInterface { int KILL_APPLICATION_WITH_UID_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+95; int CLOSE_SYSTEM_DIALOGS_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+96; int GET_PROCESS_MEMORY_INFO_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+97; int KILL_APPLICATION_PROCESS_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+98; } Loading
api/current.xml +22 −0 Original line number Diff line number Diff line Loading @@ -4695,6 +4695,17 @@ visibility="public" > </field> <field name="killAfterRestore" type="int" transient="false" volatile="false" value="16843416" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="label" type="int" transient="false" Loading Loading @@ -6477,6 +6488,17 @@ visibility="public" > </field> <field name="restoreNeedsApplication" type="int" transient="false" volatile="false" value="16843417" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="right" type="int" transient="false"
core/java/android/app/ActivityManagerNative.java +22 −1 Original line number Diff line number Diff line Loading @@ -1118,6 +1118,15 @@ public abstract class ActivityManagerNative extends Binder implements IActivityM mi.writeToParcel(reply, 0); return true; } case KILL_APPLICATION_PROCESS_TRANSACTION: { data.enforceInterface(IActivityManager.descriptor); String processName = data.readString(); int uid = data.readInt(); killApplicationProcess(processName, uid); reply.writeNoException(); return true; } } return super.onTransact(code, data, reply, flags); Loading Loading @@ -2449,5 +2458,17 @@ class ActivityManagerProxy implements IActivityManager reply.recycle(); } public void killApplicationProcess(String processName, int uid) throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); data.writeInterfaceToken(IActivityManager.descriptor); data.writeString(processName); data.writeInt(uid); mRemote.transact(KILL_APPLICATION_PROCESS_TRANSACTION, data, reply, 0); reply.readException(); data.recycle(); reply.recycle(); } private IBinder mRemote; }
core/java/android/app/ActivityThread.java +12 −1 Original line number Diff line number Diff line Loading @@ -1463,6 +1463,10 @@ public final class ActivityThread { queueOrSendMessage(H.EXIT_APPLICATION, null); } public final void scheduleSuicide() { queueOrSendMessage(H.SUICIDE, null); } public void requestThumbnail(IBinder token) { queueOrSendMessage(H.REQUEST_THUMBNAIL, token); } Loading Loading @@ -1753,6 +1757,7 @@ public final class ActivityThread { public static final int PROFILER_CONTROL = 127; public static final int CREATE_BACKUP_AGENT = 128; public static final int DESTROY_BACKUP_AGENT = 129; public static final int SUICIDE = 130; String codeToString(int code) { if (localLOGV) { switch (code) { Loading Loading @@ -1786,6 +1791,7 @@ public final class ActivityThread { case PROFILER_CONTROL: return "PROFILER_CONTROL"; case CREATE_BACKUP_AGENT: return "CREATE_BACKUP_AGENT"; case DESTROY_BACKUP_AGENT: return "DESTROY_BACKUP_AGENT"; case SUICIDE: return "SUICIDE"; } } return "(unknown)"; Loading Loading @@ -1894,6 +1900,11 @@ public final class ActivityThread { case DESTROY_BACKUP_AGENT: handleDestroyBackupAgent((CreateBackupAgentData)msg.obj); break; case SUICIDE: { Process.killProcess(Process.myPid()); } break; } } } Loading
core/java/android/app/ApplicationThreadNative.java +16 −1 Original line number Diff line number Diff line Loading @@ -258,6 +258,13 @@ public abstract class ApplicationThreadNative extends Binder return true; } case SCHEDULE_SUICIDE_TRANSACTION: { data.enforceInterface(IApplicationThread.descriptor); scheduleSuicide(); return true; } case REQUEST_THUMBNAIL_TRANSACTION: { data.enforceInterface(IApplicationThread.descriptor); Loading Loading @@ -653,6 +660,14 @@ class ApplicationThreadProxy implements IApplicationThread { data.recycle(); } public final void scheduleSuicide() throws RemoteException { Parcel data = Parcel.obtain(); data.writeInterfaceToken(IApplicationThread.descriptor); mRemote.transact(SCHEDULE_SUICIDE_TRANSACTION, data, null, IBinder.FLAG_ONEWAY); data.recycle(); } public final void requestThumbnail(IBinder token) throws RemoteException { Parcel data = Parcel.obtain(); Loading
core/java/android/app/IActivityManager.java +2 −0 Original line number Diff line number Diff line Loading @@ -158,6 +158,7 @@ public interface IActivityManager extends IInterface { throws RemoteException; public void backupAgentCreated(String packageName, IBinder agent) throws RemoteException; public void unbindBackupAgent(ApplicationInfo appInfo) throws RemoteException; public void killApplicationProcess(String processName, int uid) throws RemoteException; public boolean startInstrumentation(ComponentName className, String profileFile, int flags, Bundle arguments, IInstrumentationWatcher watcher) Loading Loading @@ -433,4 +434,5 @@ public interface IActivityManager extends IInterface { int KILL_APPLICATION_WITH_UID_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+95; int CLOSE_SYSTEM_DIALOGS_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+96; int GET_PROCESS_MEMORY_INFO_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+97; int KILL_APPLICATION_PROCESS_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+98; }