Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cb9e2d38 authored by Justin Weir's avatar Justin Weir
Browse files

Additional logging for b/407714441

Bug: 407714441
Test: Presubmits are sufficient
Flag: EXEMPT logging only
Change-Id: Iba7b256e669105140c21f0e31be24c50f0c96bee
parent e2a43c1e
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1638,6 +1638,8 @@ public final class NotificationPanelViewController implements
                } else {
                    expands = vel > 0;
                }
            } else {
                mShadeLog.d("flingExpands: ignoring false touch");
            }
        }

@@ -2657,6 +2659,7 @@ public final class NotificationPanelViewController implements
        ipw.print("mGestureWaitForTouchSlop="); ipw.println(mGestureWaitForTouchSlop);
        ipw.print("mIgnoreXTouchSlop="); ipw.println(mIgnoreXTouchSlop);
        ipw.print("mExpandLatencyTracking="); ipw.println(mExpandLatencyTracking);
        ipw.print("mUseExternalTouch="); ipw.println(mUseExternalTouch);
        ipw.println("gestureExclusionRect:" + calculateGestureExclusionRect());
        Trace.beginSection("Table<DownEvents>");
        new DumpsysTableLogger(
@@ -3949,10 +3952,12 @@ public final class NotificationPanelViewController implements
        @Override
        public boolean onTouchEvent(MotionEvent event) {
            if (!mUseExternalTouch) {
                mShadeLog.d("onTouch: external touch handling disabled");
                return false;
            }

            if (mAlternateBouncerInteractor.isVisibleState()) {
                mShadeLog.d("onTouch: alternate bouncer visible; ignoring touch");
                // never send touches to shade if the alternate bouncer is showing
                return false;
            }
+17 −14
Original line number Diff line number Diff line
@@ -316,8 +316,8 @@ public class NotificationShadeWindowViewController implements Dumpable {
        return mView.findViewById(R.id.keyguard_message_area);
    }

    private Boolean logDownDispatch(MotionEvent ev, String msg, Boolean result) {
        if (ev.getAction() == MotionEvent.ACTION_DOWN) {
    private Boolean logDownOrFalseResultDispatch(MotionEvent ev, String msg, Boolean result) {
        if (ev.getAction() == MotionEvent.ACTION_DOWN || Boolean.FALSE.equals(result)) {
            mShadeLogger.logShadeWindowDispatch(ev, msg, result);
        }
        return result;
@@ -369,7 +369,7 @@ public class NotificationShadeWindowViewController implements Dumpable {
            @Override
            public Boolean handleDispatchTouchEvent(MotionEvent ev) {
                if (mStatusBarViewController == null) { // Fix for b/192490822
                    return logDownDispatch(ev,
                    return logDownOrFalseResultDispatch(ev,
                            "Ignoring touch while statusBarView not yet set", false);
                }
                boolean isDown = ev.getActionMasked() == MotionEvent.ACTION_DOWN;
@@ -384,7 +384,7 @@ public class NotificationShadeWindowViewController implements Dumpable {
                // Reset manual touch dispatch state here but make sure the UP/CANCEL event still
                // gets delivered.
                if (!isCancel && mService.shouldIgnoreTouch()) {
                    return logDownDispatch(ev, "touch ignored by CS", false);
                    return logDownOrFalseResultDispatch(ev, "touch ignored by CS", false);
                }

                if (isDown) {
@@ -398,14 +398,14 @@ public class NotificationShadeWindowViewController implements Dumpable {
                    mDownEvent = null;
                }
                if (mTouchCancelled) {
                    return logDownDispatch(ev, "touch cancelled", false);
                    return logDownOrFalseResultDispatch(ev, "touch cancelled", false);
                }
                if (mExpandAnimationRunning) {
                    if (isDown && mClock.uptimeMillis() > mLaunchAnimationTimeout) {
                        Log.wtf(TAG, "NSWVC: launch animation timed out");
                        setExpandAnimationRunning(false);
                    } else {
                        return logDownDispatch(ev, "expand animation running", false);
                        return logDownOrFalseResultDispatch(ev, "expand animation running", false);
                    }
                }

@@ -417,7 +417,7 @@ public class NotificationShadeWindowViewController implements Dumpable {
                }

                if (mIsOcclusionTransitionRunning) {
                    return logDownDispatch(ev, "occlusion transition running", false);
                    return logDownOrFalseResultDispatch(ev, "occlusion transition running", false);
                }

                mFalsingCollector.onTouchEvent(ev);
@@ -431,7 +431,8 @@ public class NotificationShadeWindowViewController implements Dumpable {
                        && !mHandlingExternalTouch
                        && mGlanceableHubContainerController.onTouchEvent(ev)) {
                    // GlanceableHubContainerController is only used pre-flexiglass.
                    return logDownDispatch(ev, "dispatched to glanceable hub container", true);
                    return logDownOrFalseResultDispatch(ev,
                            "dispatched to glanceable hub container", true);
                }
                if (mBrightnessMirror != null
                        && mBrightnessMirror.getVisibility() == View.VISIBLE) {
@@ -439,7 +440,7 @@ public class NotificationShadeWindowViewController implements Dumpable {
                    // you can't touch anything other than the brightness slider while the mirror is
                    // showing and the rest of the panel is transparent.
                    if (ev.getActionMasked() == MotionEvent.ACTION_POINTER_DOWN) {
                        return logDownDispatch(ev, "disallowed new pointer", false);
                        return logDownOrFalseResultDispatch(ev, "disallowed new pointer", false);
                    }
                }
                if (isDown) {
@@ -458,7 +459,7 @@ public class NotificationShadeWindowViewController implements Dumpable {
                    expandingBelowNotch = true;
                }
                if (expandingBelowNotch) {
                    return logDownDispatch(ev,
                    return logDownOrFalseResultDispatch(ev,
                            "expand below notch. sending touch to status bar",
                            mStatusBarViewController.sendTouchToView(ev));
                }
@@ -471,10 +472,11 @@ public class NotificationShadeWindowViewController implements Dumpable {
                        if (!mPrimaryBouncerInteractor.isBouncerShowing()) {
                            if (mStatusBarWindowStateController.windowIsShowing()) {
                                mIsTrackingBarGesture = true;
                                return logDownDispatch(ev, "sending touch to status bar",
                                return logDownOrFalseResultDispatch(ev,
                                        "sending touch to status bar",
                                        mStatusBarViewController.sendTouchToView(ev));
                            } else {
                                return logDownDispatch(ev, "hidden or hiding", true);
                                return logDownOrFalseResultDispatch(ev, "hidden or hiding", true);
                            }
                        } else {
                            mShadeLogger.d("NSWVC: bouncer showing");
@@ -487,13 +489,14 @@ public class NotificationShadeWindowViewController implements Dumpable {
                    if (isUp || isCancel) {
                        mIsTrackingBarGesture = false;
                    }
                    return logDownDispatch(ev, "sending bar gesture to status bar",
                    return logDownOrFalseResultDispatch(ev, "sending bar gesture to status bar",
                            sendToStatusBar);
                }
                if (isDown) {
                    mShadeLogger.logNoTouchDispatch(mIsTrackingBarGesture, mExpandAnimationRunning);
                }
                return logDownDispatch(ev, "no custom touch dispatch of down event", null);
                return logDownOrFalseResultDispatch(ev, "no custom touch dispatch of down event",
                        null);
            }

            @Override