diff options
| author | 2016-05-03 15:52:51 -0700 | |
|---|---|---|
| committer | 2016-05-04 19:24:46 -0400 | |
| commit | def35a86530200958384191d43d321dbcda16e2a (patch) | |
| tree | fe3b26769704d5fa5c7f8183a3b53c7b532f0134 | |
| parent | 972123d1f1b5dd276c5e81357e4598b96d6f6a5a (diff) | |
Fixed a bug where the content height was wrong
when dragging down from a HUN the content height was
wrong.
Change-Id: Ic30e4de67625ed88942c71e68e6009b832d064ed
Fixes: 28563238
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(); } } |