Add callback hack to find out when to reload system properties.
Every IBinder object can accept a new transaction to tell it that
it might want to reload system properties, and in the process
anyone can register a callback to be executed when this happens.
Use this to reload the trace property.
This is very much ONLY for debugging.
Change-Id: I55c67c46f8f3fa9073bef0dfaab4577ed1d47eb4
diff --git a/libs/binder/Binder.cpp b/libs/binder/Binder.cpp
index e20d8a3..1f21f9c 100644
--- a/libs/binder/Binder.cpp
+++ b/libs/binder/Binder.cpp
@@ -17,6 +17,7 @@
#include <binder/Binder.h>
#include <utils/Atomic.h>
+#include <utils/misc.h>
#include <binder/BpBinder.h>
#include <binder/IInterface.h>
#include <binder/Parcel.h>
@@ -199,6 +200,12 @@
}
return dump(fd, args);
}
+
+ case SYSPROPS_TRANSACTION: {
+ report_sysprop_change();
+ return NO_ERROR;
+ }
+
default:
return UNKNOWN_TRANSACTION;
}