diff options
3 files changed, 8 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java index b25adc3f2cfc..1a34dd79d63a 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java @@ -455,7 +455,11 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { * @param pinned whether it is pinned */ public void setPinned(boolean pinned) { + int intrinsicHeight = getIntrinsicHeight(); mIsPinned = pinned; + if (intrinsicHeight != getIntrinsicHeight()) { + notifyHeightChanged(false); + } if (pinned) { setIconAnimationRunning(true); mExpandedWhenPinned = false; diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/HeadsUpTouchHelper.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/HeadsUpTouchHelper.java index 33315c58fb4a..bd59fb03d59a 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/HeadsUpTouchHelper.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/HeadsUpTouchHelper.java @@ -103,10 +103,12 @@ public class HeadsUpTouchHelper implements Gefingerpoken { mInitialTouchX = x; mInitialTouchY = y; int expandedHeight = mPickedChild.getActualHeight(); - mHeadsUpManager.unpinAll(); mPanel.setPanelScrimMinFraction((float) expandedHeight / mPanel.getMaxPanelHeight()); mPanel.startExpandMotion(x, y, true /* startTracking */, expandedHeight); + // This call needs to be after the expansion start otherwise we will get a + // flicker of one frame as it's not expanded yet. + mHeadsUpManager.unpinAll(); mPanel.clearNotificationEffects(); return true; } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java index 7c70e22c5302..e4aa10361e87 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java @@ -362,6 +362,7 @@ public abstract class PanelView extends FrameLayout { mInitialTouchX = newX; if (startTracking) { mTouchSlopExceeded = true; + setExpandedHeight(mInitialOffsetOnTouch); onTrackingStarted(); } } |