summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Selim Cinek <cinek@google.com> 2016-05-03 15:52:51 -0700
committer Selim Cinek <cinek@google.com> 2016-05-04 19:24:46 -0400
commitdef35a86530200958384191d43d321dbcda16e2a (patch)
treefe3b26769704d5fa5c7f8183a3b53c7b532f0134
parent972123d1f1b5dd276c5e81357e4598b96d6f6a5a (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
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java4
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/HeadsUpTouchHelper.java4
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java1
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();
}
}