Add massive logging to investigate blank Keyguard
This CL needs to be reverted after the issue is fixed, as it clutters
the code a lot.
Bug: 17439581
Change-Id: I548fdd73bbcd6d6ce727901f9dcd9f3f7268db9d
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 006e480..c3b263d 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
@@ -134,6 +134,9 @@
}
private void runPeekAnimation() {
+ if (PhoneStatusBar.DEBUG_EMPTY_KEYGUARD) {
+ Log.i(TAG, "Starting peek animation");
+ }
mPeekHeight = getPeekHeight();
if (DEBUG) logf("peek to height=%.1f", mPeekHeight);
if (mHeightAnimator != null) {
@@ -154,9 +157,15 @@
public void onAnimationEnd(Animator animation) {
mPeekAnimator = null;
if (mCollapseAfterPeek && !mCancelled) {
+ if (PhoneStatusBar.DEBUG_EMPTY_KEYGUARD) {
+ Log.i(TAG, "Peek animation finished, posting collapse");
+ }
postOnAnimation(new Runnable() {
@Override
public void run() {
+ if (PhoneStatusBar.DEBUG_EMPTY_KEYGUARD) {
+ Log.i(TAG, "Peek animation finished, collapsing");
+ }
collapse(false /* delayed */);
}
});
@@ -330,6 +339,9 @@
}
boolean expand = flingExpands(vel, vectorVel);
onTrackingStopped(expand);
+ if (PhoneStatusBar.DEBUG_EMPTY_KEYGUARD) {
+ Log.i(TAG, "Flinging: expand=" + expand);
+ }
fling(vel, expand);
mUpdateFlingOnLayout = expand && mPanelClosedOnDown && !mHasLayoutedSinceDown;
if (mUpdateFlingOnLayout) {
@@ -510,6 +522,9 @@
notifyExpandingFinished();
return;
}
+ if (PhoneStatusBar.DEBUG_EMPTY_KEYGUARD) {
+ Log.i(TAG, "Executing fling: expand=" + expand + " vel=" + vel);
+ }
mOverExpandedBeforeFling = getOverExpansionAmount() > 0f;
ValueAnimator animator = createHeightAnimator(target);
if (expand) {
@@ -691,8 +706,14 @@
mClosing = true;
notifyExpandingStarted();
if (delayed) {
+ if (PhoneStatusBar.DEBUG_EMPTY_KEYGUARD) {
+ Log.i(TAG, "Posting collapse runnable, will be run in 120ms");
+ }
postDelayed(mFlingCollapseRunnable, 120);
} else {
+ if (PhoneStatusBar.DEBUG_EMPTY_KEYGUARD) {
+ Log.i(TAG, "Animating collapsing now");
+ }
fling(0, false /* expand */);
}
}
@@ -701,6 +722,9 @@
private final Runnable mFlingCollapseRunnable = new Runnable() {
@Override
public void run() {
+ if (PhoneStatusBar.DEBUG_EMPTY_KEYGUARD) {
+ Log.i(TAG, "Executing collapse runnable, animating collapsing now");
+ }
fling(0, false /* expand */);
}
};
@@ -729,6 +753,11 @@
}
public void instantExpand() {
+ if (PhoneStatusBar.DEBUG_EMPTY_KEYGUARD) {
+ Log.i(TAG, "Before instant expanding"
+ + " mTracking=" + mTracking
+ + " mExpanding=" + mExpanding);
+ }
mInstantExpanding = true;
mUpdateFlingOnLayout = false;
abortAnimations();
@@ -749,6 +778,11 @@
public void onGlobalLayout() {
if (mStatusBar.getStatusBarWindow().getHeight()
!= mStatusBar.getStatusBarHeight()) {
+ if (PhoneStatusBar.DEBUG_EMPTY_KEYGUARD) {
+ Log.i(TAG, "Now instant expanding after layout"
+ + " mTracking=" + mTracking
+ + " mExpanding=" + mExpanding);
+ }
getViewTreeObserver().removeOnGlobalLayoutListener(this);
setExpandedFraction(1f);
mInstantExpanding = false;
@@ -895,6 +929,9 @@
private final Runnable mPostCollapseRunnable = new Runnable() {
@Override
public void run() {
+ if (PhoneStatusBar.DEBUG_EMPTY_KEYGUARD) {
+ Log.i(TAG, "Collapsing after middle clicked");
+ }
collapse(false /* delayed */);
}
};
@@ -907,6 +944,9 @@
mStatusBar.goToKeyguard();
return true;
case StatusBarState.SHADE:
+ if (PhoneStatusBar.DEBUG_EMPTY_KEYGUARD) {
+ Log.i(TAG, "Middle clicked in shade state, posting collapsing runnable");
+ }
// This gets called in the middle of the touch handling, where the state is still
// that we are tracking the panel. Collapse the panel after this is done.