Merge "Fixed the behavior when dragging down on home screen with a hun" into qt-r1-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
201d00ed14
@@ -184,4 +184,6 @@ public interface NotificationListContainer extends ExpandableView.OnHeightChange
|
|||||||
default boolean containsView(View v) {
|
default boolean containsView(View v) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
default void setWillExpand(boolean willExpand) {};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -500,6 +500,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd
|
|||||||
private boolean mAnimateBottomOnLayout;
|
private boolean mAnimateBottomOnLayout;
|
||||||
private float mLastSentAppear;
|
private float mLastSentAppear;
|
||||||
private float mLastSentExpandedHeight;
|
private float mLastSentExpandedHeight;
|
||||||
|
private boolean mWillExpand;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
public NotificationStackScrollLayout(
|
public NotificationStackScrollLayout(
|
||||||
@@ -4406,6 +4407,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd
|
|||||||
mStateAnimator.setShadeExpanded(isExpanded);
|
mStateAnimator.setShadeExpanded(isExpanded);
|
||||||
mSwipeHelper.setIsExpanded(isExpanded);
|
mSwipeHelper.setIsExpanded(isExpanded);
|
||||||
if (changed) {
|
if (changed) {
|
||||||
|
mWillExpand = false;
|
||||||
if (!mIsExpanded) {
|
if (!mIsExpanded) {
|
||||||
mGroupManager.collapseAllGroups();
|
mGroupManager.collapseAllGroups();
|
||||||
mExpandHelper.cancelImmediately();
|
mExpandHelper.cancelImmediately();
|
||||||
@@ -5055,7 +5057,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd
|
|||||||
if (mAnimationsEnabled && (isHeadsUp || mHeadsUpGoingAwayAnimationsAllowed)) {
|
if (mAnimationsEnabled && (isHeadsUp || mHeadsUpGoingAwayAnimationsAllowed)) {
|
||||||
mHeadsUpChangeAnimations.add(new Pair<>(row, isHeadsUp));
|
mHeadsUpChangeAnimations.add(new Pair<>(row, isHeadsUp));
|
||||||
mNeedsAnimation = true;
|
mNeedsAnimation = true;
|
||||||
if (!mIsExpanded && !isHeadsUp) {
|
if (!mIsExpanded && !mWillExpand && !isHeadsUp) {
|
||||||
row.setHeadsUpAnimatingAway(true);
|
row.setHeadsUpAnimatingAway(true);
|
||||||
}
|
}
|
||||||
requestChildrenUpdate();
|
requestChildrenUpdate();
|
||||||
@@ -5076,6 +5078,11 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd
|
|||||||
requestChildrenUpdate();
|
requestChildrenUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setWillExpand(boolean willExpand) {
|
||||||
|
mWillExpand = willExpand;
|
||||||
|
}
|
||||||
|
|
||||||
@ShadeViewRefactor(RefactorComponent.SHADE_VIEW)
|
@ShadeViewRefactor(RefactorComponent.SHADE_VIEW)
|
||||||
public void setTrackingHeadsUp(ExpandableNotificationRow row) {
|
public void setTrackingHeadsUp(ExpandableNotificationRow row) {
|
||||||
mTrackingHeadsUp = row != null;
|
mTrackingHeadsUp = row != null;
|
||||||
|
|||||||
@@ -1283,6 +1283,7 @@ public class NotificationPanelView extends PanelView implements
|
|||||||
}
|
}
|
||||||
mExpectingSynthesizedDown = true;
|
mExpectingSynthesizedDown = true;
|
||||||
onTrackingStarted();
|
onTrackingStarted();
|
||||||
|
updatePanelExpanded();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2034,7 +2035,7 @@ public class NotificationPanelView extends PanelView implements
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void updatePanelExpanded() {
|
private void updatePanelExpanded() {
|
||||||
boolean isExpanded = !isFullyCollapsed();
|
boolean isExpanded = !isFullyCollapsed() || mExpectingSynthesizedDown;
|
||||||
if (mPanelExpanded != isExpanded) {
|
if (mPanelExpanded != isExpanded) {
|
||||||
mHeadsUpManager.setIsPanelExpanded(isExpanded);
|
mHeadsUpManager.setIsPanelExpanded(isExpanded);
|
||||||
mStatusBar.setPanelExpanded(isExpanded);
|
mStatusBar.setPanelExpanded(isExpanded);
|
||||||
|
|||||||
@@ -1803,6 +1803,8 @@ public class StatusBar extends SystemUI implements DemoMode,
|
|||||||
mVibratorHelper.vibrate(VibrationEffect.EFFECT_TICK);
|
mVibratorHelper.vibrate(VibrationEffect.EFFECT_TICK);
|
||||||
}
|
}
|
||||||
mNotificationPanel.expand(true /* animate */);
|
mNotificationPanel.expand(true /* animate */);
|
||||||
|
((NotificationListContainer) mStackScroller).setWillExpand(true);
|
||||||
|
mHeadsUpManager.unpinAll(true /* userUnpinned */);
|
||||||
mMetricsLogger.count(NotificationPanelView.COUNTER_PANEL_OPEN, 1);
|
mMetricsLogger.count(NotificationPanelView.COUNTER_PANEL_OPEN, 1);
|
||||||
} else if (!mNotificationPanel.isInSettings() && !mNotificationPanel.isExpanding()){
|
} else if (!mNotificationPanel.isInSettings() && !mNotificationPanel.isExpanding()){
|
||||||
mNotificationPanel.flingSettings(0 /* velocity */,
|
mNotificationPanel.flingSettings(0 /* velocity */,
|
||||||
@@ -1940,7 +1942,6 @@ public class StatusBar extends SystemUI implements DemoMode,
|
|||||||
|
|
||||||
if (start) {
|
if (start) {
|
||||||
mNotificationPanel.startWaitingForOpenPanelGesture();
|
mNotificationPanel.startWaitingForOpenPanelGesture();
|
||||||
setPanelExpanded(true);
|
|
||||||
} else {
|
} else {
|
||||||
mNotificationPanel.stopWaitingForOpenPanelGesture(velocity);
|
mNotificationPanel.stopWaitingForOpenPanelGesture(velocity);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user