diff options
| author | Christopher Tate <ctate@google.com> | 2012-04-06 14:19:13 -0700 |
|---|---|---|
| committer | Christopher Tate <ctate@google.com> | 2012-04-06 14:23:12 -0700 |
| commit | c4a07d1caa9befd4fa8165ff05fa5e92480d8e27 (patch) | |
| tree | 21b4785e8bad532974031cbb2f580164689ec2bd /core/java/android/app/ActivityManagerNative.java | |
| parent | e4d8a5dd42070d919dbd774f24c6684ecf1e350e (diff) | |
Attribute alarm broadcast wakelocks to the sender
Wakelock usage for the purpose of sending an alarm broadcast is now
attributed to the application which posted the alarm, not to the OS.
Bug 5911317
Change-Id: I8cb79c3bd5db467388716ab68285f4ab0bfe468b
Diffstat (limited to 'core/java/android/app/ActivityManagerNative.java')
| -rw-r--r-- | core/java/android/app/ActivityManagerNative.java | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/core/java/android/app/ActivityManagerNative.java b/core/java/android/app/ActivityManagerNative.java index 000abc5f975a..a3fdf3e81a34 100644 --- a/core/java/android/app/ActivityManagerNative.java +++ b/core/java/android/app/ActivityManagerNative.java @@ -867,6 +867,16 @@ public abstract class ActivityManagerNative extends Binder implements IActivityM return true; } + case GET_UID_FOR_INTENT_SENDER_TRANSACTION: { + data.enforceInterface(IActivityManager.descriptor); + IIntentSender r = IIntentSender.Stub.asInterface( + data.readStrongBinder()); + int res = getUidForIntentSender(r); + reply.writeNoException(); + reply.writeInt(res); + return true; + } + case SET_PROCESS_LIMIT_TRANSACTION: { data.enforceInterface(IActivityManager.descriptor); int max = data.readInt(); @@ -2714,6 +2724,18 @@ class ActivityManagerProxy implements IActivityManager reply.recycle(); return res; } + public int getUidForIntentSender(IIntentSender sender) throws RemoteException { + Parcel data = Parcel.obtain(); + Parcel reply = Parcel.obtain(); + data.writeInterfaceToken(IActivityManager.descriptor); + data.writeStrongBinder(sender.asBinder()); + mRemote.transact(GET_UID_FOR_INTENT_SENDER_TRANSACTION, data, reply, 0); + reply.readException(); + int res = reply.readInt(); + data.recycle(); + reply.recycle(); + return res; + } public void setProcessLimit(int max) throws RemoteException { Parcel data = Parcel.obtain(); |
