diff options
| author | Dianne Hackborn <hackbod@google.com> | 2009-08-31 21:31:47 -0700 |
|---|---|---|
| committer | Dianne Hackborn <hackbod@google.com> | 2009-09-01 11:16:25 -0700 |
| commit | 3025ef332c29e255388f74b2afefe05f64bce07c (patch) | |
| tree | b7982d9ebe8a578b5b439c564c014a9af8be952f /core/java/android/app/ApplicationThreadNative.java | |
| parent | d9942b5cb1662638bb6fb57c12a06976e3c34651 (diff) | |
Various infrastructure to support a running services UI.
Some of this is temporary (in particular the two approaches for getting
process memory, one working but horrible, the other not working but
preferred) until I figure out the best way to do it.
Change-Id: I8c8f25062d481fcea22a47d459b083d2fd8a5040
Diffstat (limited to 'core/java/android/app/ApplicationThreadNative.java')
| -rw-r--r-- | core/java/android/app/ApplicationThreadNative.java | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/core/java/android/app/ApplicationThreadNative.java b/core/java/android/app/ApplicationThreadNative.java index ad644655cf7f..15bf9edffccf 100644 --- a/core/java/android/app/ApplicationThreadNative.java +++ b/core/java/android/app/ApplicationThreadNative.java @@ -26,6 +26,7 @@ import android.content.pm.ServiceInfo; import android.content.res.Configuration; import android.os.Binder; import android.os.Bundle; +import android.os.Debug; import android.os.Parcelable; import android.os.RemoteException; import android.os.IBinder; @@ -370,6 +371,16 @@ public abstract class ApplicationThreadNative extends Binder scheduleDestroyBackupAgent(appInfo); return true; } + + case GET_MEMORY_INFO_TRANSACTION: + { + data.enforceInterface(IApplicationThread.descriptor); + Debug.MemoryInfo mi = new Debug.MemoryInfo(); + getMemoryInfo(mi); + reply.writeNoException(); + mi.writeToParcel(reply, 0); + return true; + } } return super.onTransact(code, data, reply, flags); @@ -756,5 +767,16 @@ class ApplicationThreadProxy implements IApplicationThread { IBinder.FLAG_ONEWAY); data.recycle(); } + + public void getMemoryInfo(Debug.MemoryInfo outInfo) throws RemoteException { + Parcel data = Parcel.obtain(); + Parcel reply = Parcel.obtain(); + data.writeInterfaceToken(IApplicationThread.descriptor); + mRemote.transact(GET_MEMORY_INFO_TRANSACTION, data, reply, 0); + reply.readException(); + outInfo.readFromParcel(reply); + data.recycle(); + reply.recycle(); + } } |
