summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorDaniel Sandler <dsandler@google.com>2010-12-17 14:50:03 -0500
committerDaniel Sandler <dsandler@google.com>2010-12-17 14:50:03 -0500
commitef6e9360175eaa1cad2d178f3dbf469cc7036c1e (patch)
treec68b9212543bc833be6d0cae0ca17edd1cd4ab26 /packages
parentb67529b905440e2ba550742773b927abad882c19 (diff)
downloadframeworks_base-ef6e9360175eaa1cad2d178f3dbf469cc7036c1e.zip
frameworks_base-ef6e9360175eaa1cad2d178f3dbf469cc7036c1e.tar.gz
frameworks_base-ef6e9360175eaa1cad2d178f3dbf469cc7036c1e.tar.bz2
Fix for the notification panel getting stuck open.
Bug: 3295437 Change-Id: I2205902790818048a637729249f3dfd844c101ea
Diffstat (limited to 'packages')
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/tablet/NotificationPanel.java16
1 files changed, 11 insertions, 5 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/NotificationPanel.java b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/NotificationPanel.java
index c9fd9a9..759c17c 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/NotificationPanel.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/NotificationPanel.java
@@ -39,7 +39,8 @@ import com.android.systemui.R;
public class NotificationPanel extends LinearLayout implements StatusBarPanel,
View.OnClickListener {
- static final String TAG = "NotificationPanel";
+ static final String TAG = "Tablet/NotificationPanel";
+ static final boolean DEBUG = false;
boolean mShowing;
View mTitleArea;
@@ -248,6 +249,7 @@ public class NotificationPanel extends LinearLayout implements StatusBarPanel,
}
void startAnimation(boolean visible) {
+ if (DEBUG) Slog.d(TAG, "startAnimation(visible=" + visible + ")");
if (mBgAnim != null && mVisible != visible) {
mBgAnim.reverse();
mPositionAnim.reverse();
@@ -303,18 +305,22 @@ public class NotificationPanel extends LinearLayout implements StatusBarPanel,
if (mPanelBottom == 0) {
// fully closed, no animation necessary
setPanelBottom(0);
- } else {
- // a little bit visible, schedule an animation
+ } else if (mVisible) {
+ if (DEBUG) {
+ Slog.d(TAG, "panelHeight not zero but trying to open; scheduling an anim to open fully");
+ }
startAnimation(true);
}
}
public void onAnimationCancel(Animator animation) {
- //Slog.d(TAG, "onAnimationCancel mBgAlpha=" + mBgAlpha);
+ if (DEBUG) Slog.d(TAG, "onAnimationCancel mBgAlpha=" + mBgAlpha);
+ // force this to zero so we close the window
+ mBgAlpha = 0;
}
public void onAnimationEnd(Animator animation) {
- //Slog.d(TAG, "onAnimationEnd mBgAlpha=" + mBgAlpha);
+ if (DEBUG) Slog.d(TAG, "onAnimationEnd mBgAlpha=" + mBgAlpha);
if (mBgAlpha == 0) {
setVisibility(View.GONE);
}