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
This commit is contained in:
@@ -92,6 +92,7 @@ import com.android.systemui.SwipeHelper;
|
||||
import com.android.systemui.SystemUI;
|
||||
import com.android.systemui.statusbar.NotificationData.Entry;
|
||||
import com.android.systemui.statusbar.phone.KeyguardTouchDelegate;
|
||||
import com.android.systemui.statusbar.phone.PhoneStatusBar;
|
||||
import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager;
|
||||
import com.android.systemui.statusbar.policy.HeadsUpNotificationView;
|
||||
import com.android.systemui.statusbar.policy.PreviewInflater;
|
||||
@@ -288,6 +289,10 @@ public abstract class BaseStatusBar extends SystemUI implements
|
||||
|
||||
// close the shade if it was open
|
||||
if (handled) {
|
||||
if (PhoneStatusBar.DEBUG_EMPTY_KEYGUARD) {
|
||||
Log.i(TAG, "Collapsing panel from mOnClickHandler after keyguard"
|
||||
+ "dismiss");
|
||||
}
|
||||
animateCollapsePanels(CommandQueue.FLAG_EXCLUDE_NONE, true /* force */);
|
||||
visibilityChanged(false);
|
||||
}
|
||||
@@ -334,6 +339,9 @@ public abstract class BaseStatusBar extends SystemUI implements
|
||||
Settings.Secure.putInt(mContext.getContentResolver(),
|
||||
Settings.Secure.SHOW_NOTE_ABOUT_NOTIFICATION_HIDING, 0);
|
||||
if (BANNER_ACTION_SETUP.equals(action)) {
|
||||
if (PhoneStatusBar.DEBUG_EMPTY_KEYGUARD) {
|
||||
Log.i(TAG, "Animating collapse because of BANNER_ACTION_SETUP");
|
||||
}
|
||||
animateCollapsePanels(CommandQueue.FLAG_EXCLUDE_NONE, true /* force */);
|
||||
mContext.startActivity(new Intent(Settings.ACTION_APP_NOTIFICATION_REDACTION)
|
||||
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
|
||||
@@ -759,6 +767,10 @@ public abstract class BaseStatusBar extends SystemUI implements
|
||||
}
|
||||
}
|
||||
});
|
||||
if (PhoneStatusBar.DEBUG_EMPTY_KEYGUARD) {
|
||||
Log.i(TAG, "Collapsing panel from startNotificationGutsIntent after keyguard"
|
||||
+ "dismiss");
|
||||
}
|
||||
animateCollapsePanels(CommandQueue.FLAG_EXCLUDE_NONE, true /* force */);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -128,6 +128,9 @@ public class KeyguardBottomAreaView extends FrameLayout implements View.OnClickL
|
||||
public boolean performAccessibilityAction(View host, int action, Bundle args) {
|
||||
if (action == ACTION_CLICK) {
|
||||
if (host == mLockIcon) {
|
||||
if (PhoneStatusBar.DEBUG_EMPTY_KEYGUARD) {
|
||||
Log.i(TAG, "Collapsing panel from lock icon accessibility click");
|
||||
}
|
||||
mPhoneStatusBar.animateCollapsePanels(
|
||||
CommandQueue.FLAG_EXCLUDE_NONE, true /* force */);
|
||||
return true;
|
||||
|
||||
@@ -140,6 +140,9 @@ public class PanelBar extends FrameLayout {
|
||||
mPanelHolder.setSelectedPanel(mTouchingPanel);
|
||||
for (PanelView pv : mPanels) {
|
||||
if (pv != panel) {
|
||||
if (PhoneStatusBar.DEBUG_EMPTY_KEYGUARD) {
|
||||
Log.i(TAG, "Collapsing because opening another panel");
|
||||
}
|
||||
pv.collapse(false /* delayed */);
|
||||
}
|
||||
}
|
||||
@@ -191,9 +194,15 @@ public class PanelBar extends FrameLayout {
|
||||
boolean waiting = false;
|
||||
for (PanelView pv : mPanels) {
|
||||
if (animate && !pv.isFullyCollapsed()) {
|
||||
if (PhoneStatusBar.DEBUG_EMPTY_KEYGUARD) {
|
||||
Log.i(TAG, "Animating collapse, delayed");
|
||||
}
|
||||
pv.collapse(true /* delayed */);
|
||||
waiting = true;
|
||||
} else {
|
||||
if (PhoneStatusBar.DEBUG_EMPTY_KEYGUARD) {
|
||||
Log.i(TAG, "Collapsing without animation");
|
||||
}
|
||||
pv.resetViews();
|
||||
pv.setExpandedFraction(0); // just in case
|
||||
pv.setVisibility(View.GONE);
|
||||
|
||||
@@ -134,6 +134,9 @@ public abstract class PanelView extends FrameLayout {
|
||||
}
|
||||
|
||||
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 abstract class PanelView extends FrameLayout {
|
||||
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 @@ public abstract class PanelView extends FrameLayout {
|
||||
}
|
||||
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 @@ public abstract class PanelView extends FrameLayout {
|
||||
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 @@ public abstract class PanelView extends FrameLayout {
|
||||
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 @@ public abstract class PanelView extends FrameLayout {
|
||||
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 abstract class PanelView extends FrameLayout {
|
||||
}
|
||||
|
||||
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 abstract class PanelView extends FrameLayout {
|
||||
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 @@ public abstract class PanelView extends FrameLayout {
|
||||
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 @@ public abstract class PanelView extends FrameLayout {
|
||||
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.
|
||||
|
||||
@@ -177,6 +177,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
|
||||
public static final boolean DEBUG_GESTURES = false;
|
||||
public static final boolean DEBUG_MEDIA = false;
|
||||
public static final boolean DEBUG_MEDIA_FAKE_ARTWORK = false;
|
||||
public static final boolean DEBUG_EMPTY_KEYGUARD = true;
|
||||
|
||||
public static final boolean DEBUG_WINDOW_STATE = false;
|
||||
|
||||
@@ -2238,6 +2239,11 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
|
||||
mStatusBarWindowManager.setStatusBarFocusable(false);
|
||||
|
||||
mStatusBarWindow.cancelExpandHelper();
|
||||
if (DEBUG_EMPTY_KEYGUARD) {
|
||||
Log.i(TAG, "Collapsing panel from animateCollapsePanels:"
|
||||
+ " force=" + force
|
||||
+ " mState=" + mState);
|
||||
}
|
||||
mStatusBarView.collapseAllPanels(true);
|
||||
}
|
||||
}
|
||||
@@ -2325,6 +2331,9 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
|
||||
}
|
||||
|
||||
public void animateCollapseQuickSettings() {
|
||||
if (DEBUG_EMPTY_KEYGUARD) {
|
||||
Log.i(TAG, "Collapsing panel from animateCollapseQuickSettings");
|
||||
}
|
||||
mStatusBarView.collapseAllPanels(true);
|
||||
}
|
||||
|
||||
@@ -2337,6 +2346,9 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
|
||||
}
|
||||
|
||||
// Ensure the panel is fully collapsed (just in case; bug 6765842, 7260868)
|
||||
if (DEBUG_EMPTY_KEYGUARD) {
|
||||
Log.i(TAG, "Collapsing panel from makeExpandedInvisible");
|
||||
}
|
||||
mStatusBarView.collapseAllPanels(/*animate=*/ false);
|
||||
|
||||
// reset things to their proper state
|
||||
@@ -2430,6 +2442,9 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
|
||||
mStatusBarWindowState = state;
|
||||
if (DEBUG_WINDOW_STATE) Log.d(TAG, "Status bar " + windowStateToString(state));
|
||||
if (!showing) {
|
||||
if (DEBUG_EMPTY_KEYGUARD) {
|
||||
Log.i(TAG, "Collapsing panel from setWindowState");
|
||||
}
|
||||
mStatusBarView.collapseAllPanels(false);
|
||||
}
|
||||
}
|
||||
@@ -2987,6 +3002,10 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
|
||||
}
|
||||
});
|
||||
if (dismissShade) {
|
||||
if (PhoneStatusBar.DEBUG_EMPTY_KEYGUARD) {
|
||||
Log.i(TAG, "Collapsing panel startActivityDismissKeyguard after keyguard"
|
||||
+ "dismiss");
|
||||
}
|
||||
animateCollapsePanels(CommandQueue.FLAG_EXCLUDE_NONE, true /* force */);
|
||||
}
|
||||
return true;
|
||||
@@ -3654,6 +3673,9 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
|
||||
public boolean onSpacePressed() {
|
||||
if (mScreenOn != null && mScreenOn
|
||||
&& (mState == StatusBarState.KEYGUARD || mState == StatusBarState.SHADE_LOCKED)) {
|
||||
if (PhoneStatusBar.DEBUG_EMPTY_KEYGUARD) {
|
||||
Log.i(TAG, "Collapsing panel from onSpacePressed");
|
||||
}
|
||||
animateCollapsePanels(0 /* flags */, true /* force */);
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user