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

Commit c9b63089 authored by Jeff DeCew's avatar Jeff DeCew
Browse files

Remove FSI_REQUIRES_KEYGUARD flag

Test: atest SystemUITests
Fixes: 254512517
Change-Id: I6b0cb27ab148271f13adf46b7eff427b4e333036
parent a1e56c40
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -58,9 +58,6 @@ object Flags {
            "notification_drag_to_contents"
        )

    // TODO(b/254512517): Tracking Bug
    val FSI_REQUIRES_KEYGUARD = releasedFlag(110, "fsi_requires_keyguard")

    // TODO(b/259130119): Tracking Bug
    val FSI_ON_DND_UPDATE = releasedFlag(259130119, "fsi_on_dnd_update")

+0 −3
Original line number Diff line number Diff line
@@ -31,9 +31,6 @@ class NotifPipelineFlags @Inject constructor(
    fun isDevLoggingEnabled(): Boolean =
        featureFlags.isEnabled(Flags.NOTIFICATION_PIPELINE_DEVELOPER_LOGGING)

    fun fullScreenIntentRequiresKeyguard(): Boolean =
        featureFlags.isEnabled(Flags.FSI_REQUIRES_KEYGUARD)

    fun fsiOnDNDUpdate(): Boolean = featureFlags.isEnabled(Flags.FSI_ON_DND_UPDATE)

    fun forceDemoteFsi(): Boolean =
+0 −4
Original line number Diff line number Diff line
@@ -97,10 +97,6 @@ public interface NotificationInterruptStateProvider {
         * that the HUN will probably not display.
         */
        NO_FSI_NO_HUN_OR_KEYGUARD(false),
        /**
         * No conditions blocking FSI launch.
         */
        FSI_EXPECTED_NOT_TO_HUN(true),
        /**
         * The notification is coming from a suspended packages, so FSI is suppressed.
         */
+14 −25
Original line number Diff line number Diff line
@@ -321,9 +321,6 @@ public class NotificationInterruptStateProviderImpl implements NotificationInter
                    suppressedByDND);
        }

        // Check whether FSI requires the keyguard to be showing.
        if (mFlags.fullScreenIntentRequiresKeyguard()) {

        // If notification won't HUN and keyguard is showing, launch the FSI.
        if (mKeyguardStateController.isShowing()) {
            if (mKeyguardStateController.isOccluded()) {
@@ -343,11 +340,6 @@ public class NotificationInterruptStateProviderImpl implements NotificationInter
                suppressedByDND);
    }

        // If the notification won't HUN for some other reason (DND/snooze/etc), launch FSI.
        return getDecisionGivenSuppression(FullScreenIntentDecision.FSI_EXPECTED_NOT_TO_HUN,
                suppressedByDND);
    }

    @Override
    public void logFullScreenIntentDecision(NotificationEntry entry,
            FullScreenIntentDecision decision) {
@@ -409,14 +401,11 @@ public class NotificationInterruptStateProviderImpl implements NotificationInter
        }

        final boolean isSnoozedPackage = isSnoozedPackage(sbn);
        final boolean fsiRequiresKeyguard = mFlags.fullScreenIntentRequiresKeyguard();
        final boolean hasFsi = sbn.getNotification().fullScreenIntent != null;

        // Assume any notification with an FSI is time-sensitive (like an alarm or incoming call)
        // and ignore whether HUNs have been snoozed for the package.
        final boolean shouldBypassSnooze = fsiRequiresKeyguard && hasFsi;

        if (isSnoozedPackage && !shouldBypassSnooze) {
        if (isSnoozedPackage && !hasFsi) {
            if (log) mLogger.logNoHeadsUpPackageSnoozed(entry);
            return false;
        }
+0 −20
Original line number Diff line number Diff line
@@ -364,26 +364,6 @@ class StatusBarNotificationPresenter implements NotificationPresenter,
                return true;
            }

            if (sbn.getNotification().fullScreenIntent != null
                    && !mNotifPipelineFlags.fullScreenIntentRequiresKeyguard()) {
                // we don't allow head-up on the lockscreen (unless there's a
                // "showWhenLocked" activity currently showing)  if
                // the potential HUN has a fullscreen intent
                if (mKeyguardStateController.isShowing() && !mCentralSurfaces.isOccluded()) {
                    if (DEBUG) {
                        Log.d(TAG, "No heads up: entry has fullscreen intent on lockscreen "
                                + sbn.getKey());
                    }
                    return true;
                }

                if (mAccessibilityManager.isTouchExplorationEnabled()) {
                    if (DEBUG) {
                        Log.d(TAG, "No heads up: accessible fullscreen: " + sbn.getKey());
                    }
                    return true;
                }
            }
            return false;
        }

Loading