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

Commit a595edaa authored by Ibrahim Yilmaz's avatar Ibrahim Yilmaz Committed by Android (Google) Code Review
Browse files

Merge "[NSSL] Log hideSensitive parameters" into main

parents 0f6a9165 2f409a3f
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -382,9 +382,15 @@ public class NotificationStackScrollLayoutController implements Dumpable {

            // Only animate if in a non-sensitive state (not screen sharing)
            boolean shouldAnimate = animate && !isSensitiveContentProtectionActive;
            mLogger.logUpdateSensitivenessWithAnimation(shouldAnimate,
                    isSensitive,
                    isSensitiveContentProtectionActive,
                    isAnyProfilePublic);
            mView.updateSensitiveness(shouldAnimate, isSensitive);
        } else {
            mView.updateSensitiveness(animate, mLockscreenUserManager.isAnyProfilePublicMode());
            boolean anyProfilePublicMode = mLockscreenUserManager.isAnyProfilePublicMode();
            mLogger.logUpdateSensitivenessWithAnimation(animate, anyProfilePublicMode);
            mView.updateSensitiveness(animate, anyProfilePublicMode);
        }
        Trace.endSection();
    }
+39 −1
Original line number Diff line number Diff line
@@ -156,6 +156,44 @@ class NotificationStackScrollLogger @Inject constructor(
                { "removeTransientRow from NSSL: childKey: $str1" }
        )
    }

    fun logUpdateSensitivenessWithAnimation(
        shouldAnimate: Boolean,
        isSensitive: Boolean,
        isSensitiveContentProtectionActive: Boolean,
        isAnyProfilePublic: Boolean,
    ) {
        notificationRenderBuffer.log(
            TAG,
            INFO,
            {
                bool1 = shouldAnimate
                bool2 = isSensitive
                bool3 = isSensitiveContentProtectionActive
                bool4 = isAnyProfilePublic
            },
            {
                "updateSensitivenessWithAnimation from NSSL: shouldAnimate=$bool1 " +
                        "isSensitive(hideSensitive)=$bool2 isSensitiveContentProtectionActive=$bool3 " +
                        "isAnyProfilePublic=$bool4"
            },
        )
    }

    fun logUpdateSensitivenessWithAnimation(animate: Boolean, anyProfilePublicMode: Boolean) {
        notificationRenderBuffer.log(
            TAG,
            INFO,
            {
                bool1 = animate
                bool2 = anyProfilePublicMode
            },
            {
                "updateSensitivenessWithAnimation from NSSL: animate=$bool1 " +
                        "anyProfilePublicMode(hideSensitive)=$bool2"
            },
        )
    }
}

private const val TAG = "NotificationStackScroll"