summaryrefslogtreecommitdiffstats
path: root/core/java/android/view/WindowManagerImpl.java
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2012-05-08 18:53:51 -0700
committerDianne Hackborn <hackbod@google.com>2012-05-09 14:53:20 -0700
commita53de0629f3b94472c0f160f5bbe1090b020feab (patch)
treed3816b90689fee8b1aee48cdc834ce0f597e99d3 /core/java/android/view/WindowManagerImpl.java
parent8b2e37e5a0e10d234ffe6815e9a462283cad3d78 (diff)
downloadframeworks_base-a53de0629f3b94472c0f160f5bbe1090b020feab.zip
frameworks_base-a53de0629f3b94472c0f160f5bbe1090b020feab.tar.gz
frameworks_base-a53de0629f3b94472c0f160f5bbe1090b020feab.tar.bz2
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
Diffstat (limited to 'core/java/android/view/WindowManagerImpl.java')
-rw-r--r--core/java/android/view/WindowManagerImpl.java19
1 files changed, 19 insertions, 0 deletions
diff --git a/core/java/android/view/WindowManagerImpl.java b/core/java/android/view/WindowManagerImpl.java
index b5690e9..5d33cec 100644
--- a/core/java/android/view/WindowManagerImpl.java
+++ b/core/java/android/view/WindowManagerImpl.java
@@ -23,6 +23,7 @@ import android.content.res.Configuration;
import android.graphics.PixelFormat;
import android.opengl.ManagedEGLContext;
import android.os.IBinder;
+import android.os.SystemProperties;
import android.util.AndroidRuntimeException;
import android.util.Log;
import android.view.inputmethod.InputMethodManager;
@@ -112,6 +113,8 @@ public class WindowManagerImpl implements WindowManager {
private WindowManager.LayoutParams[] mParams;
private boolean mNeedsEglTerminate;
+ private Runnable mSystemPropertyUpdater = null;
+
private final static Object sLock = new Object();
private final static WindowManagerImpl sWindowManager = new WindowManagerImpl();
private final static HashMap<CompatibilityInfo, WindowManager> sCompatWindowManagers
@@ -237,6 +240,22 @@ public class WindowManagerImpl implements WindowManager {
View panelParentView = null;
synchronized (this) {
+ // Start watching for system property changes.
+ if (mSystemPropertyUpdater == null) {
+ mSystemPropertyUpdater = new Runnable() {
+ @Override public void run() {
+ synchronized (this) {
+ synchronized (this) {
+ for (ViewRootImpl root : mRoots) {
+ root.loadSystemProperties();
+ }
+ }
+ }
+ }
+ };
+ SystemProperties.addChangeCallback(mSystemPropertyUpdater);
+ }
+
// Here's an odd/questionable case: if someone tries to add a
// view multiple times, then we simply bump up a nesting count
// and they need to remove the view the corresponding number of