[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
This commit is contained in:
Caitlin Cassidy
2021-10-15 20:14:32 +00:00
parent e2132cdaed
commit 3483f6e8aa
3 changed files with 3 additions and 11 deletions

View File

@@ -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.

View File

@@ -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;
}

View File

@@ -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);