Skip to content

Commit 2c37f7b

Browse files
Craig MautnerAndroid (Google) Code Review
authored andcommitted
Merge "Synchronize access to Locked methods. DO NOT MERGE" into jb-mr1.1-dev
2 parents 03fb569 + d861590 commit 2c37f7b

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewManager.java

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -129,12 +129,19 @@ public ViewManagerHost(Context context) {
129129
@Override
130130
protected void onConfigurationChanged(Configuration newConfig) {
131131
super.onConfigurationChanged(newConfig);
132-
if (mKeyguardHost.getVisibility() == View.VISIBLE) {
133-
// only propagate configuration messages if we're currently showing
134-
maybeCreateKeyguardLocked(shouldEnableScreenRotation(), true, null);
135-
} else {
136-
if (DEBUG) Log.v(TAG, "onConfigurationChanged: view not visible");
137-
}
132+
post(new Runnable() {
133+
@Override
134+
public void run() {
135+
synchronized (KeyguardViewManager.this) {
136+
if (mKeyguardHost.getVisibility() == View.VISIBLE) {
137+
// only propagate configuration messages if we're currently showing
138+
maybeCreateKeyguardLocked(shouldEnableScreenRotation(), true, null);
139+
} else {
140+
if (DEBUG) Log.v(TAG, "onConfigurationChanged: view not visible");
141+
}
142+
}
143+
}
144+
});
138145
}
139146

140147
@Override

0 commit comments

Comments
 (0)