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

Commit af42a5f6 authored by Richard MacGregor's avatar Richard MacGregor
Browse files

Add traces for otp redaction for notifications

Add traces around projection start/stop that trigger nofitication
redactions

Test: atest SystemUITests
Bug: 312784780
Flag: ACONFIG com.android.systemui.screenshare_notification_hiding DISABLED
Change-Id: I8c7b4685eb1aecbe44e6b0850d33ae4a63c9940c
parent 6d2615b3
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -404,6 +404,7 @@ public class NotificationStackScrollLayoutController implements Dumpable {
    }

    private void updateSensitivenessWithAnimation(boolean animate) {
        Trace.beginSection("NSSLC.updateSensitivenessWithAnimation");
        if (screenshareNotificationHiding()) {
            boolean isAnyProfilePublic = mLockscreenUserManager.isAnyProfilePublicMode();
            boolean isSensitiveContentProtectionActive =
@@ -416,6 +417,7 @@ public class NotificationStackScrollLayoutController implements Dumpable {
        } else {
            mView.updateSensitiveness(animate, mLockscreenUserManager.isAnyProfilePublicMode());
        }
        Trace.endSection();
    }

    /**
+7 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ import static com.android.systemui.Flags.screenshareNotificationHiding;
import android.media.projection.MediaProjectionInfo;
import android.media.projection.MediaProjectionManager;
import android.os.Handler;
import android.os.Trace;

import com.android.internal.annotations.VisibleForTesting;
import com.android.systemui.dagger.SysUISingleton;
@@ -43,14 +44,20 @@ public class SensitiveNotificationProtectionControllerImpl
            new MediaProjectionManager.Callback() {
                @Override
                public void onStart(MediaProjectionInfo info) {
                    Trace.beginSection(
                            "SNPC.onProjectionStart");
                    mProjection = info;
                    mListeners.forEach(Runnable::run);
                    Trace.endSection();
                }

                @Override
                public void onStop(MediaProjectionInfo info) {
                    Trace.beginSection(
                            "SNPC.onProjectionStop");
                    mProjection = null;
                    mListeners.forEach(Runnable::run);
                    Trace.endSection();
                }
            };