am 149c0543: Partial fix for 2069703: Fix race condition in KeyguardViewManager.hide() that could result in a blank screen.

Merge commit '149c0543a3d5f450686b7c3d142ac5f8fcf61ed4'

* commit '149c0543a3d5f450686b7c3d142ac5f8fcf61ed4':
  Partial fix for 2069703: Fix race condition in KeyguardViewManager.hide() that could result in a blank screen.
This commit is contained in:
Jim Miller
2009-10-12 12:30:04 -07:00
committed by Android Git Automerger

View File

@@ -48,7 +48,7 @@ public class KeyguardViewManager implements KeyguardWindowController {
private WindowManager.LayoutParams mWindowLayoutParams;
private boolean mNeedsInput = false;
private FrameLayout mKeyguardHost;
private KeyguardViewBase mKeyguardView;
@@ -154,7 +154,7 @@ public class KeyguardViewManager implements KeyguardWindowController {
mViewManager.updateViewLayout(mKeyguardHost, mWindowLayoutParams);
}
}
/**
* Reset the state of the view.
*/
@@ -218,15 +218,13 @@ public class KeyguardViewManager implements KeyguardWindowController {
// Don't do this right away, so we can let the view continue to animate
// as it goes away.
if (mKeyguardView != null) {
final View lastView = mKeyguardView;
final KeyguardViewBase lastView = mKeyguardView;
mKeyguardView = null;
mKeyguardHost.postDelayed(new Runnable() {
public void run() {
synchronized (KeyguardViewManager.this) {
if (mKeyguardView == lastView) {
mKeyguardHost.removeView(mKeyguardView);
mKeyguardView.cleanUp();
mKeyguardView = null;
}
mKeyguardHost.removeView(lastView);
lastView.cleanUp();
}
}
}, 500);