File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
packages/SystemUI/src/com/android/systemui/statusbar/phone Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -2047,7 +2047,10 @@ public void onClick(View v) {
20472047 snapshot .add (child );
20482048 }
20492049 }
2050- final int N = snapshot .size ();
2050+ if (snapshot .isEmpty ()) {
2051+ animateCollapse (false );
2052+ return ;
2053+ }
20512054 new Thread (new Runnable () {
20522055 @ Override
20532056 public void run () {
@@ -2063,6 +2066,7 @@ public void run() {
20632066 mPile .setViewRemoval (false );
20642067
20652068 mPostCollapseCleanup = new Runnable () {
2069+ @ Override
20662070 public void run () {
20672071 try {
20682072 mPile .setViewRemoval (true );
@@ -2073,9 +2077,8 @@ public void run() {
20732077
20742078 View sampleView = snapshot .get (0 );
20752079 int width = sampleView .getWidth ();
2076- final int velocity = (int )(width * 8 ); // 1000/8 = 125 ms duration
2077- for (View v : snapshot ) {
2078- final View _v = v ;
2080+ final int velocity = width * 8 ; // 1000/8 = 125 ms duration
2081+ for (final View _v : snapshot ) {
20792082 mHandler .postDelayed (new Runnable () {
20802083 @ Override
20812084 public void run () {
@@ -2091,6 +2094,7 @@ public void run() {
20912094 // synchronize the end of those animations with the start of the collaps
20922095 // exactly.
20932096 mHandler .postDelayed (new Runnable () {
2097+ @ Override
20942098 public void run () {
20952099 animateCollapse (false );
20962100 }
You can’t perform that action at this time.
0 commit comments