From 3483f6e8aa0396bc82ed7922e840a7a0bf7726a3 Mon Sep 17 00:00:00 2001 From: Caitlin Cassidy Date: Fri, 15 Oct 2021 20:14:32 +0000 Subject: [PATCH] [Status Bar Refactor] Remove PanelBar#onPanelPeeked and put its code in a callback instead. Test: manual (verified callback triggered correctly) Bug: 200063118 Change-Id: I59fe4951729da09ec8100ded4a1dfefffb6fd160 --- .../statusbar/phone/NotificationPanelViewController.java | 3 +++ .../src/com/android/systemui/statusbar/phone/PanelBar.java | 5 ----- .../systemui/statusbar/phone/PhoneStatusBarView.java | 6 ------ 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java index b531d27ea14b1..f1bc64b63afc4 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java @@ -4660,6 +4660,9 @@ public class NotificationPanelViewController extends PanelViewController { if (state == STATE_OPEN && mCurrentState != state) { mView.sendAccessibilityEvent(AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED); } + if (state == STATE_OPENING) { + mStatusBar.makeExpandedVisible(false); + } if (state == STATE_CLOSED) { // Close the status bar in the next frame so we can show the end of the // animation. diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelBar.java index 7e029f24e76f0..e90258db85718 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelBar.java @@ -125,7 +125,6 @@ public abstract class PanelBar extends FrameLayout { if (expanded) { if (mState == STATE_CLOSED) { go(STATE_OPENING); - onPanelPeeked(); } fullyClosed = false; fullyOpened = frac >= 1f; @@ -140,10 +139,6 @@ public abstract class PanelBar extends FrameLayout { fullyOpened?" fullyOpened":"", fullyClosed?" fullyClosed":""); } - public void onPanelPeeked() { - if (DEBUG) LOG("onPanelPeeked"); - } - public boolean isClosed() { return mState == STATE_CLOSED; } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java index 98d0f7cf88341..cfd845f8c24bc 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java @@ -185,12 +185,6 @@ public class PhoneStatusBarView extends PanelBar { return false; } - @Override - public void onPanelPeeked() { - super.onPanelPeeked(); - mBar.makeExpandedVisible(false); - } - @Override public boolean onTouchEvent(MotionEvent event) { mBar.onTouchEvent(event);