[Status Bar Refactor] Move a bunch of callbacks out of PanelBar and into
(N)PVC. No need for the callbacks to flow through PanelBar when (Notification)PanelViewController can just notify them directly. Test: Manual (verify callbacks still trigger at the correct times) Test: atest NotificationPanelViewControllerTest Bug: 200063118 Change-Id: I374dc97a5fec8ce9c08b167dfb1112262b475f2a
This commit is contained in:
@@ -2985,7 +2985,7 @@ public class NotificationPanelViewController extends PanelViewController {
|
||||
|
||||
@Override
|
||||
protected void onExpandingFinished() {
|
||||
super.onExpandingFinished();
|
||||
mScrimController.onExpandingFinished();
|
||||
mNotificationStackScrollLayoutController.onExpansionStopped();
|
||||
mHeadsUpManager.onExpandingFinished();
|
||||
mConversationNotificationManager.onNotificationPanelExpandStateChanged(isFullyCollapsed());
|
||||
@@ -3060,6 +3060,7 @@ public class NotificationPanelViewController extends PanelViewController {
|
||||
protected void onTrackingStarted() {
|
||||
mFalsingCollector.onTrackingStarted(!mKeyguardStateController.canDismissLockScreen());
|
||||
super.onTrackingStarted();
|
||||
mScrimController.onTrackingStarted();
|
||||
if (mQsFullyExpanded) {
|
||||
mQsExpandImmediate = true;
|
||||
if (!mShouldUseSplitNotificationShade) {
|
||||
@@ -3260,7 +3261,7 @@ public class NotificationPanelViewController extends PanelViewController {
|
||||
|
||||
@Override
|
||||
protected void onClosingFinished() {
|
||||
super.onClosingFinished();
|
||||
mStatusBar.onClosingFinished();
|
||||
setClosingWithAlphaFadeout(false);
|
||||
mMediaHierarchyManager.closeGuts();
|
||||
}
|
||||
|
||||
@@ -156,14 +156,6 @@ public abstract class PanelBar extends FrameLayout {
|
||||
mTracking = false;
|
||||
}
|
||||
|
||||
public void onExpandingFinished() {
|
||||
if (DEBUG) LOG("onExpandingFinished");
|
||||
}
|
||||
|
||||
public void onClosingFinished() {
|
||||
|
||||
}
|
||||
|
||||
/** An interface that will be notified of panel state changes. */
|
||||
public interface PanelStateChangeListener {
|
||||
/** Called when the state changes. */
|
||||
|
||||
@@ -187,10 +187,7 @@ public abstract class PanelViewController {
|
||||
protected final LockscreenGestureLogger mLockscreenGestureLogger;
|
||||
private final TouchHandler mTouchHandler;
|
||||
|
||||
|
||||
protected void onExpandingFinished() {
|
||||
mBar.onExpandingFinished();
|
||||
}
|
||||
protected abstract void onExpandingFinished();
|
||||
|
||||
protected void onExpandingStarted() {
|
||||
}
|
||||
@@ -455,6 +452,7 @@ public abstract class PanelViewController {
|
||||
protected void onTrackingStopped(boolean expand) {
|
||||
mTracking = false;
|
||||
mBar.onTrackingStopped(expand);
|
||||
mStatusBar.onTrackingStopped(expand);
|
||||
updatePanelExpansionAndVisibility();
|
||||
}
|
||||
|
||||
@@ -462,6 +460,7 @@ public abstract class PanelViewController {
|
||||
endClosing();
|
||||
mTracking = true;
|
||||
mBar.onTrackingStarted();
|
||||
mStatusBar.onTrackingStarted();
|
||||
notifyExpandingStarted();
|
||||
updatePanelExpansionAndVisibility();
|
||||
}
|
||||
@@ -934,10 +933,7 @@ public abstract class PanelViewController {
|
||||
mView.removeCallbacks(mFlingCollapseRunnable);
|
||||
}
|
||||
|
||||
protected void onClosingFinished() {
|
||||
mBar.onClosingFinished();
|
||||
}
|
||||
|
||||
protected abstract void onClosingFinished();
|
||||
|
||||
protected void startUnlockHintAnimation() {
|
||||
|
||||
|
||||
@@ -208,31 +208,6 @@ public class PhoneStatusBarView extends PanelBar {
|
||||
return mTouchEventHandler.handleTouchEvent(event);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTrackingStarted() {
|
||||
super.onTrackingStarted();
|
||||
mBar.onTrackingStarted();
|
||||
mScrimController.onTrackingStarted();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClosingFinished() {
|
||||
super.onClosingFinished();
|
||||
mBar.onClosingFinished();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTrackingStopped(boolean expand) {
|
||||
super.onTrackingStopped(expand);
|
||||
mBar.onTrackingStopped(expand);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onExpandingFinished() {
|
||||
super.onExpandingFinished();
|
||||
mScrimController.onExpandingFinished();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onInterceptTouchEvent(MotionEvent event) {
|
||||
mBar.onTouchEvent(event);
|
||||
|
||||
Reference in New Issue
Block a user