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

Commit 0bdd1683 authored by Jeff DeCew's avatar Jeff DeCew Committed by Android (Google) Code Review
Browse files

Merge changes I64ec5165,I8e56a88e,I1aa582cd,I8e1b0eb0,I16163b42 into tm-qpr-dev

* changes:
  Inline notif pipeline flag into NotifLogger
  Inline notif pipeline flag in NotifInterruptPrvdr
  Inline notif pipeline flag into NotifController
  Inline notif pipeline flag into new pipeline code
  Inline notif pipeline flag into ConvoNotifMgr
parents c4c302a8 ea5be36f
Loading
Loading
Loading
Loading
+2 −7
Original line number Diff line number Diff line
@@ -31,7 +31,6 @@ import com.android.systemui.dagger.qualifiers.Main
import com.android.systemui.plugins.statusbar.StatusBarStateController
import com.android.systemui.statusbar.notification.collection.NotificationEntry
import com.android.systemui.statusbar.notification.collection.inflation.BindEventManager
import com.android.systemui.statusbar.notification.collection.legacy.NotificationGroupManagerLegacy
import com.android.systemui.statusbar.notification.collection.notifcollection.CommonNotifCollection
import com.android.systemui.statusbar.notification.collection.notifcollection.NotifCollectionListener
import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow
@@ -129,11 +128,9 @@ class AnimatedImageNotificationManager @Inject constructor(
 */
@SysUISingleton
class ConversationNotificationManager @Inject constructor(
    private val bindEventManager: BindEventManager,
    private val notificationGroupManager: NotificationGroupManagerLegacy,
    bindEventManager: BindEventManager,
    private val context: Context,
    private val notifCollection: CommonNotifCollection,
    private val featureFlags: NotifPipelineFlags,
    @Main private val mainHandler: Handler
) {
    // Need this state to be thread safe, since it's accessed from the ui thread
@@ -172,12 +169,10 @@ class ConversationNotificationManager @Inject constructor(
                                layout.setIsImportantConversation(important, false)
                            }
                        }
                if (changed && !featureFlags.isNewPipelineEnabled()) {
                    notificationGroupManager.updateIsolation(entry)
                }
            }
        }
    }

    fun onEntryViewBound(entry: NotificationEntry) {
        if (!entry.ranking.isConversation) {
            return
+4 −6
Original line number Diff line number Diff line
@@ -578,13 +578,11 @@ public class NotifCollection implements Dumpable {
                    // 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
@@ -72,9 +72,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)
@@ -97,18 +95,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
Loading