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

Commit 953c470b authored by Steve Elliott's avatar Steve Elliott
Browse files

Inline notif pipeline flag into new pipeline code

This change is a no-op; the flag is now enabled-by-default, so all
removed code paths here are effectively dead.

Bug: 200269355
Test: atest SystemUITests
Change-Id: I8e1b0eb0a6cd7b43e1ff3cb5292d187f46810202
parent 442896b4
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -578,13 +578,11 @@ public class NotifCollection implements Dumpable, PipelineDumpable {
                    // TODO: (b/145659174) update the sbn's overrideGroupKey in
                    //  NotificationEntry.setRanking instead of here once we fully migrate to the
                    //  NewNotifPipeline
                    if (mNotifPipelineFlags.isNewPipelineEnabled()) {
                    final String newOverrideGroupKey = ranking.getOverrideGroupKey();
                    if (!Objects.equals(entry.getSbn().getOverrideGroupKey(),
                            newOverrideGroupKey)) {
                        entry.getSbn().setOverrideGroupKey(newOverrideGroupKey);
                    }
                    }
                } else {
                    if (currentEntriesWithoutRankings == null) {
                        currentEntriesWithoutRankings = new ArrayMap<>();
+0 −3
Original line number Diff line number Diff line
@@ -76,7 +76,6 @@ import javax.inject.Inject
 */
@SysUISingleton
class NotifPipeline @Inject constructor(
    notifPipelineFlags: NotifPipelineFlags,
    private val mNotifCollection: NotifCollection,
    private val mShadeListBuilder: ShadeListBuilder,
    private val mRenderStageManager: RenderStageManager
@@ -107,8 +106,6 @@ class NotifPipeline @Inject constructor(
        return mNotifCollection.getEntry(key)
    }

    val isNewPipelineEnabled: Boolean = notifPipelineFlags.isNewPipelineEnabled()

    /**
     * Registers a lifetime extender. Lifetime extenders can cause notifications that have been
     * dismissed or retracted by system server to be temporarily retained in the collection.
+0 −8
Original line number Diff line number Diff line
@@ -127,14 +127,6 @@ public class BubbleCoordinator implements Coordinator {
                DismissedByUserStats dismissedByUserStats,
                int reason
        ) {
            if (!mNotifPipeline.isNewPipelineEnabled()) {
                // The `entry` will be from whichever pipeline is active, so if the old pipeline is
                // running, make sure that we use the new pipeline's entry (if it still exists).
                NotificationEntry newPipelineEntry = mNotifPipeline.getEntry(entry.getKey());
                if (newPipelineEntry != null) {
                    entry = newPipelineEntry;
                }
            }
            if (isInterceptingDismissal(entry)) {
                mInterceptedDismissalEntries.remove(entry.getKey());
                mOnEndDismissInterception.onEndDismissInterception(mDismissInterceptor, entry,
+6 −12
Original line number Diff line number Diff line
@@ -68,9 +68,7 @@ class NotifCoordinatorsImpl @Inject constructor(
        //  pipeline, such as this DataStoreCoordinator which cannot be removed, as it's a critical
        //  glue between the pipeline and parts of SystemUI which depend on pipeline output via the
        //  NotifLiveDataStore.
        if (notifPipelineFlags.isNewPipelineEnabled()) {
        mCoordinators.add(dataStoreCoordinator)
        }

        // Attach normal coordinators.
        mCoordinators.add(hideLocallyDismissedNotifsCoordinator)
@@ -93,18 +91,14 @@ class NotifCoordinatorsImpl @Inject constructor(
        if (notifPipelineFlags.isSmartspaceDedupingEnabled()) {
            mCoordinators.add(smartspaceDedupingCoordinator)
        }
        if (notifPipelineFlags.isNewPipelineEnabled()) {
        mCoordinators.add(headsUpCoordinator)
        mCoordinators.add(gutsCoordinator)
        mCoordinators.add(preparationCoordinator)
        mCoordinators.add(remoteInputCoordinator)
        }

        // Manually add Ordered Sections
        // HeadsUp > FGS > People > Alerting > Silent > Minimized > Unknown/Default
        if (notifPipelineFlags.isNewPipelineEnabled()) {
            mOrderedSections.add(headsUpCoordinator.sectioner) // HeadsUp
        }
        mOrderedSections.add(headsUpCoordinator.sectioner)
        mOrderedSections.add(appOpsCoordinator.sectioner) // ForegroundService
        mOrderedSections.add(conversationCoordinator.sectioner) // People
        mOrderedSections.add(rankingCoordinator.alertingSectioner) // Alerting
+0 −7
Original line number Diff line number Diff line
@@ -65,13 +65,6 @@ class SmartspaceDedupingCoordinator @Inject constructor(
        statusBarStateController.addCallback(statusBarStateListener)
        smartspaceController.addListener(this::onNewSmartspaceTargets)

        if (!pipeline.isNewPipelineEnabled) {
            // TODO (b/173126564): Remove this once the old pipeline is no longer necessary
            notificationLockscreenUserManager.addKeyguardNotificationSuppressor { entry ->
                isDupedWithSmartspaceContent(entry)
            }
        }

        recordStatusBarState(statusBarStateController.state)
    }

Loading