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
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -362,6 +362,7 @@ public abstract class PanelView extends FrameLayout {
|
||||
mInitialTouchX = newX;
|
||||
if (startTracking) {
|
||||
mTouchSlopExceeded = true;
|
||||
setExpandedHeight(mInitialOffsetOnTouch);
|
||||
onTrackingStarted();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user