summaryrefslogtreecommitdiffstats
path: root/core/java/android/app/ApplicationThreadNative.java
diff options
context:
space:
mode:
Diffstat (limited to 'core/java/android/app/ApplicationThreadNative.java')
-rw-r--r--core/java/android/app/ApplicationThreadNative.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/core/java/android/app/ApplicationThreadNative.java b/core/java/android/app/ApplicationThreadNative.java
index dc0f529..16181e0 100644
--- a/core/java/android/app/ApplicationThreadNative.java
+++ b/core/java/android/app/ApplicationThreadNative.java
@@ -478,6 +478,13 @@ public abstract class ApplicationThreadNative extends Binder
updatePackageCompatibilityInfo(pkg, compat);
return true;
}
+
+ case SCHEDULE_TRIM_MEMORY_TRANSACTION: {
+ data.enforceInterface(IApplicationThread.descriptor);
+ int level = data.readInt();
+ scheduleTrimMemory(level);
+ return true;
+ }
}
return super.onTransact(code, data, reply, flags);
@@ -989,4 +996,12 @@ class ApplicationThreadProxy implements IApplicationThread {
mRemote.transact(UPDATE_PACKAGE_COMPATIBILITY_INFO_TRANSACTION, data, null,
IBinder.FLAG_ONEWAY);
}
+
+ public void scheduleTrimMemory(int level) throws RemoteException {
+ Parcel data = Parcel.obtain();
+ data.writeInterfaceToken(IApplicationThread.descriptor);
+ data.writeInt(level);
+ mRemote.transact(SCHEDULE_TRIM_MEMORY_TRANSACTION, data, null,
+ IBinder.FLAG_ONEWAY);
+ }
}