OSDN Git Service

Exempt the notification panel from animation lockout.
authorDaniel Sandler <dsandler@android.com>
Wed, 8 May 2013 19:57:06 +0000 (15:57 -0400)
committerDaniel Sandler <dsandler@android.com>
Wed, 8 May 2013 19:57:06 +0000 (15:57 -0400)
We do a lot of launch-app-then-collapse, and it's a game to
see whether the app's window activity animation starts
before the panel has a chance to finish collapsing.

The winning move here is not to play.

Requires change I2773601d in f/b.
Bug: 8666124

Change-Id: I3e3f1c5a4a505ad7d487c804139445ffd499d8d4

packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowView.java

index f526f0c..5620e1b 100644 (file)
@@ -24,6 +24,7 @@ import android.util.Log;
 import android.view.KeyEvent;
 import android.view.MotionEvent;
 import android.view.View;
+import android.view.ViewRootImpl;
 import android.widget.FrameLayout;
 import android.widget.ScrollView;
 import android.widget.TextSwitcher;
@@ -63,6 +64,13 @@ public class StatusBarWindowView extends FrameLayout
         mExpandHelper = new ExpandHelper(mContext, latestItems, minHeight, maxHeight);
         mExpandHelper.setEventSource(this);
         mExpandHelper.setScrollView(mScrollView);
+
+        // We really need to be able to animate while window animations are going on
+        // so that activities may be started asynchronously from panel animations
+        final ViewRootImpl root = getViewRootImpl();
+        if (root != null) {
+            root.setDrawDuringWindowsAnimating(true);
+        }
     }
 
     @Override