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

Commit 06fe9de6 authored by Chandru S's avatar Chandru S
Browse files

Add debug logs for haptics in NotificationPanelViewController.

Bug: 258138790
Test: manually, can see the logs in dump.
Change-Id: I84502e6837dbd935fa81f15d6a1a4f574ba83a0f
parent 0a33f423
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -4721,6 +4721,7 @@ public final class NotificationPanelViewController implements Dumpable {
            if (!openingWithTouch || !mHasVibratedOnOpen) {
                mVibratorHelper.vibrate(VibrationEffect.EFFECT_TICK);
                mHasVibratedOnOpen = true;
                mShadeLog.v("Vibrating on opening, mHasVibratedOnOpen=true");
            }
        }
    }
@@ -6104,6 +6105,7 @@ public final class NotificationPanelViewController implements Dumpable {
                    if (isFullyCollapsed()) {
                        // If panel is fully collapsed, reset haptic effect before adding movement.
                        mHasVibratedOnOpen = false;
                        mShadeLog.logHasVibrated(mHasVibratedOnOpen, mExpandedFraction);
                    }
                    addMovement(event);
                    if (!isFullyCollapsed()) {
+9 −0
Original line number Diff line number Diff line
@@ -117,6 +117,15 @@ class ShadeLogger @Inject constructor(@ShadeLog private val buffer: LogBuffer) {
        })
    }

    fun logHasVibrated(hasVibratedOnOpen: Boolean, fraction: Float) {
        log(LogLevel.VERBOSE, {
            bool1 = hasVibratedOnOpen
            double1 = fraction.toDouble()
        }, {
            "hasVibratedOnOpen=$bool1, expansionFraction=$double1"
        })
    }

    fun logQsExpansionChanged(
            message: String,
            qsExpanded: Boolean,