OSDN Git Service

Remove volume motion delay
authorJorim Jaggi <jjaggi@google.com>
Mon, 6 Jul 2015 23:18:11 +0000 (16:18 -0700)
committerJorim Jaggi <jjaggi@google.com>
Wed, 8 Jul 2015 21:57:14 +0000 (21:57 +0000)
Disable window animations, so we can start the show animation directly.

Bug: 21335976
Change-Id: I1d25d0ce46b9a068efed0a1561051072cda226a9

packages/SystemUI/src/com/android/systemui/volume/VolumeDialog.java
packages/SystemUI/src/com/android/systemui/volume/VolumeDialogMotion.java

index a4ccfd1..7836411 100644 (file)
@@ -157,6 +157,7 @@ public class VolumeDialog {
         lp.gravity = Gravity.TOP | Gravity.CENTER_HORIZONTAL;
         lp.y = res.getDimensionPixelSize(R.dimen.volume_offset_top);
         lp.gravity = Gravity.TOP;
+        lp.windowAnimations = -1;
         window.setAttributes(lp);
         window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_NOTHING);
 
index 4bb1011..8144ea4 100644 (file)
@@ -36,7 +36,6 @@ public class VolumeDialogMotion {
 
     private static final float ANIMATION_SCALE = 1.0f;
     private static final int PRE_DISMISS_DELAY = 50;
-    private static final int POST_SHOW_DELAY = 200;
 
     private final Dialog mDialog;
     private final View mDialogView;
@@ -70,12 +69,7 @@ public class VolumeDialogMotion {
                 if (D.BUG) Log.d(TAG, "mDialog.onShow");
                 final int h = mDialogView.getHeight();
                 mDialogView.setTranslationY(-h);
-                mHandler.postDelayed(new Runnable() {
-                    @Override
-                    public void run() {
-                        startShowAnimation();
-                    }
-                }, POST_SHOW_DELAY);
+                startShowAnimation();
             }
         });
     }