From c6c9d4052f067306f76e87b564d288e5d3336d76 Mon Sep 17 00:00:00 2001 From: Winson Chung Date: Fri, 25 May 2018 18:25:52 -0700 Subject: Fix regression in swiping over rotation button. - Only send the hit target for visible buttons, otherwise we will defer starting the recents animation when swiping over them even if they are invisible. Bug: 80320221 Test: Swipe up over hidden rotation button, ensure we don't defer the animation start Change-Id: Ie6126eb25ca6cdda1dce2dccec92d83b8aca0563 --- .../com/android/systemui/statusbar/phone/ButtonDispatcher.java | 4 ++++ .../com/android/systemui/statusbar/phone/NavigationBarView.java | 9 +++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ButtonDispatcher.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ButtonDispatcher.java index 3c0b22660c17..894ea62b1b61 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ButtonDispatcher.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ButtonDispatcher.java @@ -114,6 +114,10 @@ public class ButtonDispatcher { return mVisibility != null ? mVisibility : View.VISIBLE; } + public boolean isVisible() { + return getVisibility() == View.VISIBLE; + } + public float getAlpha() { return mAlpha != null ? mAlpha : 1; } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java index 6c66cabf0da8..0fd8df09eaaa 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java @@ -336,13 +336,14 @@ public class NavigationBarView extends FrameLayout implements PluginListener