Add callback hack to find out when to load system properties.
Use this to reload the trace and layout bounds properties.
This is ONLY for debugging.
Change-Id: I1c4bdb52c823520c352c5bac45fa9ee31160793c
diff --git a/services/java/com/android/server/am/ActivityManagerService.java b/services/java/com/android/server/am/ActivityManagerService.java
index 40f64bf..aa7de82 100644
--- a/services/java/com/android/server/am/ActivityManagerService.java
+++ b/services/java/com/android/server/am/ActivityManagerService.java
@@ -1567,6 +1567,31 @@
@Override
public boolean onTransact(int code, Parcel data, Parcel reply, int flags)
throws RemoteException {
+ if (code == SYSPROPS_TRANSACTION) {
+ // We need to tell all apps about the system property change.
+ ArrayList<IBinder> procs = new ArrayList<IBinder>();
+ synchronized(this) {
+ for (SparseArray<ProcessRecord> apps : mProcessNames.getMap().values()) {
+ final int NA = apps.size();
+ for (int ia=0; ia<NA; ia++) {
+ ProcessRecord app = apps.valueAt(ia);
+ if (app.thread != null) {
+ procs.add(app.thread.asBinder());
+ }
+ }
+ }
+ }
+
+ int N = procs.size();
+ for (int i=0; i<N; i++) {
+ Parcel data2 = Parcel.obtain();
+ try {
+ procs.get(i).transact(IBinder.SYSPROPS_TRANSACTION, data2, null, 0);
+ } catch (RemoteException e) {
+ }
+ data2.recycle();
+ }
+ }
try {
return super.onTransact(code, data, reply, flags);
} catch (RuntimeException e) {