diff options
author | Jeff Sharkey <jsharkey@android.com> | 2012-03-23 15:21:00 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-03-23 15:21:00 -0700 |
commit | 69f819b397e5e4b50b1931da6ef1caba0229640a (patch) | |
tree | 20e9ae659dc16338fb20faab562a8dedf5b5ad0f /core/java | |
parent | 7cf4640e812a86451d17514f01bb7ffa5e56c33b (diff) | |
parent | b9a070189c2280a6356a8abb9483b517a41e14c3 (diff) | |
download | frameworks_base-69f819b397e5e4b50b1931da6ef1caba0229640a.zip frameworks_base-69f819b397e5e4b50b1931da6ef1caba0229640a.tar.gz frameworks_base-69f819b397e5e4b50b1931da6ef1caba0229640a.tar.bz2 |
Merge "Include GIDs for unenforced permissions."
Diffstat (limited to 'core/java')
-rw-r--r-- | core/java/android/app/ActivityManagerNative.java | 21 | ||||
-rw-r--r-- | core/java/android/app/IActivityManager.java | 6 |
2 files changed, 25 insertions, 2 deletions
diff --git a/core/java/android/app/ActivityManagerNative.java b/core/java/android/app/ActivityManagerNative.java index c000bdf..c402329 100644 --- a/core/java/android/app/ActivityManagerNative.java +++ b/core/java/android/app/ActivityManagerNative.java @@ -1057,6 +1057,15 @@ public abstract class ActivityManagerNative extends Binder implements IActivityM return true; } + case KILL_PROCESSES_BELOW_FOREGROUND_TRANSACTION: { + data.enforceInterface(IActivityManager.descriptor); + String reason = data.readString(); + boolean res = killProcessesBelowForeground(reason); + reply.writeNoException(); + reply.writeInt(res ? 1 : 0); + return true; + } + case START_RUNNING_TRANSACTION: { data.enforceInterface(IActivityManager.descriptor); String pkg = data.readString(); @@ -2910,6 +2919,18 @@ class ActivityManagerProxy implements IActivityManager reply.recycle(); return res; } + @Override + public boolean killProcessesBelowForeground(String reason) throws RemoteException { + Parcel data = Parcel.obtain(); + Parcel reply = Parcel.obtain(); + data.writeInterfaceToken(IActivityManager.descriptor); + data.writeString(reason); + mRemote.transact(KILL_PROCESSES_BELOW_FOREGROUND_TRANSACTION, data, reply, 0); + boolean res = reply.readInt() != 0; + data.recycle(); + reply.recycle(); + return res; + } public void startRunning(String pkg, String cls, String action, String indata) throws RemoteException { Parcel data = Parcel.obtain(); diff --git a/core/java/android/app/IActivityManager.java b/core/java/android/app/IActivityManager.java index a809cc1..1d994d8 100644 --- a/core/java/android/app/IActivityManager.java +++ b/core/java/android/app/IActivityManager.java @@ -216,9 +216,10 @@ public interface IActivityManager extends IInterface { public void enterSafeMode() throws RemoteException; public void noteWakeupAlarm(IIntentSender sender) throws RemoteException; - + public boolean killPids(int[] pids, String reason, boolean secure) throws RemoteException; - + public boolean killProcessesBelowForeground(String reason) throws RemoteException; + // Special low-level communication with activity manager. public void startRunning(String pkg, String cls, String action, String data) throws RemoteException; @@ -573,4 +574,5 @@ public interface IActivityManager extends IInterface { int GET_CONTENT_PROVIDER_EXTERNAL_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+140; int REMOVE_CONTENT_PROVIDER_EXTERNAL_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+141; int GET_MY_MEMORY_STATE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+142; + int KILL_PROCESSES_BELOW_FOREGROUND_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+143; } |