From 827e0facfefd0c0033dcfb1747b4fa6f80f9e0e2 Mon Sep 17 00:00:00 2001 From: Jorim Jaggi Date: Thu, 7 May 2015 11:41:41 -0700 Subject: Make sure the app can draw a frame before unlocking - The mechanism to stop windows drawing while window animator was animating was somehow flaky. It relied on the fact that the client would call relayout() whenever the animating state changed. This is mostly the case, but not for lockscreen animations. Instead, we now use a push model, where window manager tells the app that the state has changed. - In addition, it only stopped drawing if that window was animating, but then only resumed drawing after all windows have finished animating. Now, we do this per window, so we only stop drawing for windows that are currently animating. - We resume the top activity now at the very beginning of the unlocking sequence. This gives the app a chance to draw a frame before the user sees anything. If it's to slow, then we just use the outdated framebuffer. Bug: 19964562 Change-Id: Ifef8abd189a3146d854b81b9b948861e4d38c155 --- .../src/com/android/layoutlib/bridge/android/BridgeWindow.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeWindow.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeWindow.java index 4c4454d..bcb98db 100644 --- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeWindow.java +++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeWindow.java @@ -91,7 +91,11 @@ public final class BridgeWindow implements IWindow { } @Override - public void doneAnimating() { + public void windowBeginAnimating(int remainingFrameCount) { + } + + @Override + public void windowEndAnimating() { } @Override -- cgit v1.1