summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI/src/com/android
diff options
context:
space:
mode:
authorSelim Cinek <cinek@google.com>2014-10-14 22:31:32 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-10-14 22:31:32 +0000
commit7a140bd488bf6c4df778363c327bd1b749557a4e (patch)
treeb1786cec6389e782e50a3eeaa7f65de90939b29c /packages/SystemUI/src/com/android
parentfb213fe2223f3b1cde7df0f8d7eb2e8fd2e5e49f (diff)
parentcedb6dc7f2e19120d6889bc681d143bfb2891b80 (diff)
downloadframeworks_base-7a140bd488bf6c4df778363c327bd1b749557a4e.zip
frameworks_base-7a140bd488bf6c4df778363c327bd1b749557a4e.tar.gz
frameworks_base-7a140bd488bf6c4df778363c327bd1b749557a4e.tar.bz2
am cedb6dc7: Merge "Fixed a bug when double tapping a notification in the normal shade" into lmp-dev
* commit 'cedb6dc7f2e19120d6889bc681d143bfb2891b80': Fixed a bug when double tapping a notification in the normal shade
Diffstat (limited to 'packages/SystemUI/src/com/android')
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java1
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollAlgorithm.java14
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/stack/StackStateAnimator.java18
3 files changed, 28 insertions, 5 deletions
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 d8c99f8..a7ff0bd 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
@@ -372,6 +372,7 @@ public abstract class PanelView extends FrameLayout {
}
protected void onTrackingStarted() {
+ mClosing = false;
mTracking = true;
mCollapseAfterPeek = false;
mBar.onTrackingStarted(PanelView.this);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollAlgorithm.java b/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollAlgorithm.java
index e4a1c27..853628e 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollAlgorithm.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollAlgorithm.java
@@ -738,8 +738,9 @@ public class StackScrollAlgorithm {
if (mExpandedOnStart) {
// We are collapsing the shade, so the first child can get as most as high as the
- // current height.
- mFirstChildMaxHeight = mFirstChildWhileExpanding.getActualHeight();
+ // current height or the end value of the animation.
+ mFirstChildMaxHeight = StackStateAnimator.getFinalActualHeight(
+ mFirstChildWhileExpanding);
} else {
updateFirstChildMaxSizeToMaxHeight();
}
@@ -801,9 +802,14 @@ public class StackScrollAlgorithm {
this.mIsExpanded = isExpanded;
}
- public void notifyChildrenChanged(ViewGroup hostView) {
+ public void notifyChildrenChanged(final ViewGroup hostView) {
if (mIsExpansionChanging) {
- updateFirstChildHeightWhileExpanding(hostView);
+ hostView.post(new Runnable() {
+ @Override
+ public void run() {
+ updateFirstChildHeightWhileExpanding(hostView);
+ }
+ });
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackStateAnimator.java b/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackStateAnimator.java
index a69390e..433357e 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackStateAnimator.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackStateAnimator.java
@@ -709,7 +709,7 @@ public class StackStateAnimator {
};
}
- private <T> T getChildTag(View child, int tag) {
+ private static <T> T getChildTag(View child, int tag) {
return (T) child.getTag(tag);
}
@@ -848,4 +848,20 @@ public class StackStateAnimator {
currentAnimator.cancel();
}
}
+
+ /**
+ * Get the end value of the height animation running on a view or the actualHeight
+ * if no animation is running.
+ */
+ public static int getFinalActualHeight(ExpandableView view) {
+ if (view == null) {
+ return 0;
+ }
+ ValueAnimator heightAnimator = getChildTag(view, TAG_ANIMATOR_HEIGHT);
+ if (heightAnimator == null) {
+ return view.getActualHeight();
+ } else {
+ return getChildTag(view, TAG_END_HEIGHT);
+ }
+ }
}