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

Commit 23d65f1d authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "[DO NOT MERGE] Add the logging logic to distinguish the SS-reactivated...

Merge "[DO NOT MERGE] Add the logging logic to distinguish the SS-reactivated resume media and user-activated one when there is no recommendation card." into sc-v2-dev
parents 24391b88 816553f6
Loading
Loading
Loading
Loading
+74 −44
Original line number Diff line number Diff line
@@ -209,17 +209,17 @@ class MediaCarouselController @Inject constructor(
                oldKey: String?,
                data: MediaData,
                immediately: Boolean,
                receivedSmartspaceCardLatency: Int
                receivedSmartspaceCardLatency: Int,
                isSsReactivated: Boolean
            ) {
                if (addOrUpdatePlayer(key, oldKey, data)) {
                if (addOrUpdatePlayer(key, oldKey, data, isSsReactivated)) {
                    // Log card received if a new resumable media card is added
                    MediaPlayerData.getMediaPlayer(key)?.let {
                        /* ktlint-disable max-line-length */
                        logSmartspaceCardReported(759, // SMARTSPACE_CARD_RECEIVED
                                it.mInstanceId,
                                it.mUid,
                                /* isRecommendationCard */ false,
                                intArrayOf(
                                surfaces = intArrayOf(
                                        SysUiStatsLog.SMART_SPACE_CARD_REPORTED__DISPLAY_SURFACE__SHADE,
                                        SysUiStatsLog.SMART_SPACE_CARD_REPORTED__DISPLAY_SURFACE__LOCKSCREEN),
                                rank = MediaPlayerData.getMediaPlayerIndex(key))
@@ -242,8 +242,7 @@ class MediaCarouselController @Inject constructor(
                            logSmartspaceCardReported(759, // SMARTSPACE_CARD_RECEIVED
                                    it.mInstanceId,
                                    it.mUid,
                                    /* isRecommendationCard */ false,
                                    intArrayOf(
                                    surfaces = intArrayOf(
                                            SysUiStatsLog.SMART_SPACE_CARD_REPORTED__DISPLAY_SURFACE__SHADE,
                                            SysUiStatsLog.SMART_SPACE_CARD_REPORTED__DISPLAY_SURFACE__LOCKSCREEN),
                                    rank = index,
@@ -277,12 +276,17 @@ class MediaCarouselController @Inject constructor(
            override fun onSmartspaceMediaDataLoaded(
                key: String,
                data: SmartspaceMediaData,
                shouldPrioritize: Boolean,
                isSsReactivated: Boolean
                shouldPrioritize: Boolean
            ) {
                if (DEBUG) Log.d(TAG, "Loading Smartspace media update")
                // Log the case where the hidden media carousel with the existed inactive resume
                // media is shown by the Smartspace signal.
                if (data.isActive) {
                    if (isSsReactivated && shouldPrioritize) {
                    val hasActivatedExistedResumeMedia =
                            !mediaManager.hasActiveMedia() &&
                                    mediaManager.hasAnyMedia() &&
                                    shouldPrioritize
                    if (hasActivatedExistedResumeMedia) {
                        // Log resume card received if resumable media card is reactivated and
                        // recommendation card is valid and ranked first
                        MediaPlayerData.players().forEachIndexed { index, it ->
@@ -294,8 +298,7 @@ class MediaCarouselController @Inject constructor(
                                logSmartspaceCardReported(759, // SMARTSPACE_CARD_RECEIVED
                                        it.mInstanceId,
                                        it.mUid,
                                        /* isRecommendationCard */ false,
                                        intArrayOf(
                                        surfaces = intArrayOf(
                                                SysUiStatsLog.SMART_SPACE_CARD_REPORTED__DISPLAY_SURFACE__SHADE,
                                                SysUiStatsLog.SMART_SPACE_CARD_REPORTED__DISPLAY_SURFACE__LOCKSCREEN),
                                        rank = index,
@@ -310,8 +313,7 @@ class MediaCarouselController @Inject constructor(
                        logSmartspaceCardReported(759, // SMARTSPACE_CARD_RECEIVED
                                it.mInstanceId,
                                it.mUid,
                                /* isRecommendationCard */ true,
                                intArrayOf(
                                surfaces = intArrayOf(
                                        SysUiStatsLog.SMART_SPACE_CARD_REPORTED__DISPLAY_SURFACE__SHADE,
                                        SysUiStatsLog.SMART_SPACE_CARD_REPORTED__DISPLAY_SURFACE__LOCKSCREEN),
                                rank = MediaPlayerData.getMediaPlayerIndex(key),
@@ -408,7 +410,12 @@ class MediaCarouselController @Inject constructor(
    }

    // Returns true if new player is added
    private fun addOrUpdatePlayer(key: String, oldKey: String?, data: MediaData): Boolean {
    private fun addOrUpdatePlayer(
        key: String,
        oldKey: String?,
        data: MediaData,
        isSsReactivated: Boolean
    ): Boolean {
        val dataCopy = data.copy(backgroundColor = bgColor)
        MediaPlayerData.moveIfExists(oldKey, key)
        val existingPlayer = MediaPlayerData.getMediaPlayer(key)
@@ -424,12 +431,13 @@ class MediaCarouselController @Inject constructor(
            newPlayer.playerViewHolder?.player?.setLayoutParams(lp)
            newPlayer.bindPlayer(dataCopy, key)
            newPlayer.setListening(currentlyExpanded)
            MediaPlayerData.addMediaPlayer(key, dataCopy, newPlayer, systemClock)
            MediaPlayerData.addMediaPlayer(key, dataCopy, newPlayer, systemClock, isSsReactivated)
            updatePlayerToState(newPlayer, noAnimation = true)
            reorderAllPlayers(curVisibleMediaKey)
        } else {
            existingPlayer.bindPlayer(dataCopy, key)
            MediaPlayerData.addMediaPlayer(key, dataCopy, existingPlayer, systemClock)
            MediaPlayerData.addMediaPlayer(key, dataCopy, existingPlayer, systemClock,
                    isSsReactivated)
            if (visualStabilityManager.isReorderingAllowed || shouldScrollToActivePlayer) {
                reorderAllPlayers(curVisibleMediaKey)
            } else {
@@ -523,8 +531,10 @@ class MediaCarouselController @Inject constructor(
                            it.targetId, it, MediaPlayerData.shouldPrioritizeSs)
                }
            } else {
                val isSsReactivated = MediaPlayerData.isSsReactivated(key)
                removePlayer(key, dismissMediaData = false, dismissRecommendation = false)
                addOrUpdatePlayer(key = key, oldKey = null, data = data)
                addOrUpdatePlayer(
                        key = key, oldKey = null, data = data, isSsReactivated = isSsReactivated)
            }
        }
    }
@@ -682,7 +692,8 @@ class MediaCarouselController @Inject constructor(
            this.desiredHostState = it
            currentlyExpanded = it.expansion > 0

            val shouldCloseGuts = !currentlyExpanded && !mediaManager.hasActiveMedia() &&
            val shouldCloseGuts = !currentlyExpanded &&
                    !mediaManager.hasActiveMediaOrRecommendation() &&
                    desiredHostState.showsOnlyActiveMedia

            for (mediaPlayer in MediaPlayerData.players()) {
@@ -747,7 +758,6 @@ class MediaCarouselController @Inject constructor(
            val mediaControlPanel = MediaPlayerData.players().elementAt(visibleMediaIndex)
            val hasActiveMediaOrRecommendationCard =
                    MediaPlayerData.hasActiveMediaOrRecommendationCard()
            val isRecommendationCard = mediaControlPanel.recommendationViewHolder != null
            if (!hasActiveMediaOrRecommendationCard && !qsExpanded) {
                // Skip logging if on LS or QQS, and there is no active media card
                return
@@ -755,7 +765,6 @@ class MediaCarouselController @Inject constructor(
            logSmartspaceCardReported(800, // SMARTSPACE_CARD_SEEN
                    mediaControlPanel.mInstanceId,
                    mediaControlPanel.mUid,
                    isRecommendationCard,
                    intArrayOf(mediaControlPanel.surfaceForSmartspaceLogging))
            mediaControlPanel.mIsImpressed = true
        }
@@ -769,7 +778,6 @@ class MediaCarouselController @Inject constructor(
     * @param instanceId id to uniquely identify a card, e.g. each headphone generates a new
     * instanceId
     * @param uid uid for the application that media comes from
     * @param isRecommendationCard whether the card is media recommendation
     * @param surfaces list of display surfaces the media card is on (e.g. lockscreen, shade) when
     * the event happened
     * @param interactedSubcardRank the rank for interacted media item for recommendation card, -1
@@ -779,21 +787,27 @@ class MediaCarouselController @Inject constructor(
     * @param rank the rank for media card in the media carousel, starting from 0
     * @param receivedLatencyMillis latency in milliseconds for card received events. E.g. latency
     * between headphone connection to sysUI displays media recommendation card
     * @param isSwipeToDismiss whether is to log swipe-to-dismiss event
     *
     */
    fun logSmartspaceCardReported(
        eventId: Int,
        instanceId: Int,
        uid: Int,
        isRecommendationCard: Boolean,
        surfaces: IntArray,
        interactedSubcardRank: Int = 0,
        interactedSubcardCardinality: Int = 0,
        rank: Int = mediaCarouselScrollHandler.visibleMediaIndex,
        receivedLatencyMillis: Int = 0
        receivedLatencyMillis: Int = 0,
        isSwipeToDismiss: Boolean = false
    ) {
        if (MediaPlayerData.players().size <= rank) {
            return
        }

        val mediaControlKey = MediaPlayerData.playerKeys().elementAt(rank)
        // Only log media resume card when Smartspace data is available
        if (!isRecommendationCard &&
        if (!mediaControlKey.isSsMediaRec &&
                !mediaManager.smartspaceMediaData.isActive &&
                MediaPlayerData.smartspaceMediaData == null) {
            return
@@ -809,10 +823,13 @@ class MediaCarouselController @Inject constructor(
                    // card type for each new feature.
                    SysUiStatsLog.SMART_SPACE_CARD_REPORTED__CARD_TYPE__UNKNOWN_CARD,
                    surface,
                    rank,
                    // Use -1 as rank value to indicate user swipe to dismiss the card
                    if (isSwipeToDismiss) -1 else rank,
                    cardinality,
                    if (isRecommendationCard)
                    if (mediaControlKey.isSsMediaRec)
                        15 // MEDIA_RECOMMENDATION
                    else if (mediaControlKey.isSsReactivated)
                        43 // MEDIA_RESUME_SS_ACTIVATED
                    else
                        31, // MEDIA_RESUME
                    uid,
@@ -824,7 +841,9 @@ class MediaCarouselController @Inject constructor(
            if (DEBUG) {
                Log.d(TAG, "Log Smartspace card event id: $eventId instance id: $instanceId" +
                        " surface: $surface rank: $rank cardinality: $cardinality " +
                        "isRecommendationCard: $isRecommendationCard uid: $uid " +
                        "isRecommendationCard: ${mediaControlKey.isSsMediaRec} " +
                        "isSsReactivated: ${mediaControlKey.isSsReactivated}" +
                        "uid: $uid " +
                        "interactedSubcardRank: $interactedSubcardRank " +
                        "interactedSubcardCardinality: $interactedSubcardCardinality " +
                        "received_latency_millis: $receivedLatencyMillis")
@@ -839,10 +858,9 @@ class MediaCarouselController @Inject constructor(
                logSmartspaceCardReported(761, // SMARTSPACE_CARD_DISMISS
                        it.mInstanceId,
                        it.mUid,
                        it.recommendationViewHolder != null,
                        intArrayOf(it.surfaceForSmartspaceLogging),
                        // Use -1 as rank value to indicate user swipe to dismiss the card
                        rank = -1)
                        rank = index,
                        isSwipeToDismiss = true)
                // Reset card impressed state when swipe to dismissed
                it.mIsImpressed = false
            }
@@ -871,17 +889,18 @@ internal object MediaPlayerData {
        private set

    data class MediaSortKey(
            // Whether the item represents a Smartspace media recommendation.
        val isSsMediaRec: Boolean,
        val isSsMediaRec: Boolean, // Whether the item represents a Smartspace media recommendation.
        val data: MediaData,
        val updateTime: Long = 0
        val updateTime: Long = 0,
        val isSsReactivated: Boolean = false
    )

    private val comparator =
            compareByDescending<MediaSortKey> { it.data.isPlaying == true &&
                        it.data.playbackLocation == MediaData.PLAYBACK_LOCAL }
                    .thenByDescending { it.data.isPlaying == true &&
                        it.data.playbackLocation == MediaData.PLAYBACK_CAST_LOCAL }
                        it.data.playbackLocation == MediaData.PLAYBACK_CAST_LOCAL
                    }
                    .thenByDescending { if (shouldPrioritizeSs) it.isSsMediaRec else !it.isSsMediaRec }
                    .thenByDescending { !it.data.resumption }
                    .thenByDescending { it.data.playbackLocation != MediaData.PLAYBACK_CAST_REMOTE }
@@ -891,9 +910,16 @@ internal object MediaPlayerData {
    private val mediaPlayers = TreeMap<MediaSortKey, MediaControlPanel>(comparator)
    private val mediaData: MutableMap<String, MediaSortKey> = mutableMapOf()

    fun addMediaPlayer(key: String, data: MediaData, player: MediaControlPanel, clock: SystemClock) {
    fun addMediaPlayer(
        key: String,
        data: MediaData,
        player: MediaControlPanel,
        clock: SystemClock,
        isSsReactivated: Boolean
    ) {
        removeMediaPlayer(key)
        val sortKey = MediaSortKey(isSsMediaRec = false, data, clock.currentTimeMillis())
        val sortKey = MediaSortKey(isSsMediaRec = false,
                data, clock.currentTimeMillis(), isSsReactivated = isSsReactivated)
        mediaData.put(key, sortKey)
        mediaPlayers.put(sortKey, player)
    }
@@ -907,8 +933,8 @@ internal object MediaPlayerData {
    ) {
        shouldPrioritizeSs = shouldPrioritize
        removeMediaPlayer(key)
        val sortKey = MediaSortKey(/* isSsMediaRec= */ true,
            EMPTY.copy(isPlaying = false), clock.currentTimeMillis())
        val sortKey = MediaSortKey(isSsMediaRec = true,
            EMPTY.copy(isPlaying = false), clock.currentTimeMillis(), isSsReactivated = true)
        mediaData.put(key, sortKey)
        mediaPlayers.put(sortKey, player)
        smartspaceMediaData = data
@@ -988,4 +1014,8 @@ internal object MediaPlayerData {
        }
        return false
    }

    fun isSsReactivated(key: String): Boolean = mediaData.get(key)?.let {
        it.isSsReactivated
    } ?: false
}
 No newline at end of file
+17 −15
Original line number Diff line number Diff line
@@ -158,8 +158,8 @@ public class MediaControlPanel {

        mSeekBarViewModel.setLogSmartspaceClick(() -> {
            logSmartspaceCardReported(
                    760, // SMARTSPACE_CARD_CLICK
                    /* isRecommendationCard */ false);
                    760 // SMARTSPACE_CARD_CLICK
            );
            return Unit.INSTANCE;
        });
    }
@@ -326,8 +326,9 @@ public class MediaControlPanel {
                if (mFalsingManager.isFalseTap(FalsingManager.LOW_PENALTY)) return;
                if (mMediaViewController.isGutsVisible()) return;

                logSmartspaceCardReported(760, // SMARTSPACE_CARD_CLICK
                        /* isRecommendationCard */ false);
                logSmartspaceCardReported(
                        760 // SMARTSPACE_CARD_CLICK
                );
                mActivityStarter.postStartActivityDismissingKeyguard(clickIntent,
                        buildLaunchAnimatorController(mPlayerViewHolder.getPlayer()));
            });
@@ -447,8 +448,9 @@ public class MediaControlPanel {
                button.setEnabled(true);
                button.setOnClickListener(v -> {
                    if (!mFalsingManager.isFalseTap(FalsingManager.LOW_PENALTY)) {
                        logSmartspaceCardReported(760, // SMARTSPACE_CARD_CLICK
                                /* isRecommendationCard */ false);
                        logSmartspaceCardReported(
                                760 // SMARTSPACE_CARD_CLICK
                        );
                        action.run();
                    }
                });
@@ -484,8 +486,9 @@ public class MediaControlPanel {
        mPlayerViewHolder.getDismiss().setOnClickListener(v -> {
            if (mFalsingManager.isFalseTap(FalsingManager.LOW_PENALTY)) return;

            logSmartspaceCardReported(761, // SMARTSPACE_CARD_DISMISS
                    /* isRecommendationCard */ false);
            logSmartspaceCardReported(
                    761 // SMARTSPACE_CARD_DISMISS
            );

            if (mKey != null) {
                closeGuts();
@@ -683,8 +686,9 @@ public class MediaControlPanel {
        mRecommendationViewHolder.getDismiss().setOnClickListener(v -> {
            if (mFalsingManager.isFalseTap(FalsingManager.LOW_PENALTY)) return;

            logSmartspaceCardReported(761, // SMARTSPACE_CARD_DISMISS
                    /* isRecommendationCard */ true);
            logSmartspaceCardReported(
                    761 // SMARTSPACE_CARD_DISMISS
            );
            closeGuts();
            mMediaDataManagerLazy.get().dismissSmartspaceRecommendation(
                    data.getTargetId(), MediaViewController.GUTS_ANIMATION_DURATION + 100L);
@@ -841,7 +845,6 @@ public class MediaControlPanel {
            if (mFalsingManager.isFalseTap(FalsingManager.LOW_PENALTY)) return;

            logSmartspaceCardReported(760, // SMARTSPACE_CARD_CLICK
                    /* isRecommendationCard */ true,
                    interactedSubcardRank,
                    getSmartspaceSubCardCardinality());

@@ -911,18 +914,17 @@ public class MediaControlPanel {
        return SysUiStatsLog.SMART_SPACE_CARD_REPORTED__DISPLAY_SURFACE__DEFAULT_SURFACE;
    }

    private void logSmartspaceCardReported(int eventId, boolean isRecommendationCard) {
        logSmartspaceCardReported(eventId, isRecommendationCard,
    private void logSmartspaceCardReported(int eventId) {
        logSmartspaceCardReported(eventId,
                /* interactedSubcardRank */ 0,
                /* interactedSubcardCardinality */ 0);
    }

    private void logSmartspaceCardReported(int eventId, boolean isRecommendationCard,
    private void logSmartspaceCardReported(int eventId,
            int interactedSubcardRank, int interactedSubcardCardinality) {
        mMediaCarouselController.logSmartspaceCardReported(eventId,
                mInstanceId,
                mUid,
                isRecommendationCard,
                new int[]{getSurfaceForSmartspaceLogging()},
                interactedSubcardRank,
                interactedSubcardCardinality);
+3 −3
Original line number Diff line number Diff line
@@ -32,7 +32,8 @@ class MediaDataCombineLatest @Inject constructor() : MediaDataManager.Listener,
        oldKey: String?,
        data: MediaData,
        immediately: Boolean,
        receivedSmartspaceCardLatency: Int
        receivedSmartspaceCardLatency: Int,
        isSsReactivated: Boolean
    ) {
        if (oldKey != null && oldKey != key && entries.contains(oldKey)) {
            entries[key] = data to entries.remove(oldKey)?.second
@@ -46,8 +47,7 @@ class MediaDataCombineLatest @Inject constructor() : MediaDataManager.Listener,
    override fun onSmartspaceMediaDataLoaded(
        key: String,
        data: SmartspaceMediaData,
        shouldPrioritize: Boolean,
        isSsReactivated: Boolean
        shouldPrioritize: Boolean
    ) {
        listeners.toSet().forEach { it.onSmartspaceMediaDataLoaded(key, data) }
    }
+23 −12
Original line number Diff line number Diff line
@@ -87,7 +87,8 @@ class MediaDataFilter @Inject constructor(
        oldKey: String?,
        data: MediaData,
        immediately: Boolean,
        receivedSmartspaceCardLatency: Int
        receivedSmartspaceCardLatency: Int,
        isSsReactivated: Boolean
    ) {
        if (oldKey != null && oldKey != key) {
            allEntries.remove(oldKey)
@@ -112,8 +113,7 @@ class MediaDataFilter @Inject constructor(
    override fun onSmartspaceMediaDataLoaded(
        key: String,
        data: SmartspaceMediaData,
        shouldPrioritize: Boolean,
        isSsReactivated: Boolean
        shouldPrioritize: Boolean
    ) {
        if (!data.isActive) {
            Log.d(TAG, "Inactive recommendation data. Skip triggering.")
@@ -138,13 +138,12 @@ class MediaDataFilter @Inject constructor(
            }
        }

        val activeMedia = userEntries.filter { (key, value) -> value.active }
        var isSsReactivatedMutable = activeMedia.isEmpty() && userEntries.isNotEmpty()
        val shouldReactivate = !hasActiveMedia() && hasAnyMedia()

        if (timeSinceActive < smartspaceMaxAgeMillis) {
            // It could happen there are existing active media resume cards, then we don't need to
            // reactivate.
            if (isSsReactivatedMutable) {
            if (shouldReactivate) {
                val lastActiveKey = sorted.lastKey() // most recently active
                // Notify listeners to consider this media active
                Log.d(TAG, "reactivating $lastActiveKey instead of smartspace")
@@ -154,7 +153,7 @@ class MediaDataFilter @Inject constructor(
                    it.onMediaDataLoaded(lastActiveKey, lastActiveKey, mediaData,
                            receivedSmartspaceCardLatency =
                            (systemClock.currentTimeMillis() - data.headphoneConnectionTimeMillis)
                                    .toInt())
                                    .toInt(), isSsReactivated = true)
                }
            }
        } else {
@@ -166,8 +165,7 @@ class MediaDataFilter @Inject constructor(
            Log.d(TAG, "Invalid recommendation data. Skip showing the rec card")
            return
        }
        listeners.forEach { it.onSmartspaceMediaDataLoaded(key, data, shouldPrioritizeMutable,
                isSsReactivatedMutable) }
        listeners.forEach { it.onSmartspaceMediaDataLoaded(key, data, shouldPrioritizeMutable) }
    }

    override fun onMediaDataRemoved(key: String) {
@@ -258,14 +256,27 @@ class MediaDataFilter @Inject constructor(
    }

    /**
     * Are there any media notifications active?
     * Are there any media notifications active, including the recommendation?
     */
    fun hasActiveMedia() = userEntries.any { it.value.active } || smartspaceMediaData.isActive
    fun hasActiveMediaOrRecommendation() =
            userEntries.any { it.value.active } ||
                    (smartspaceMediaData.isActive && smartspaceMediaData.isValid)

    /**
     * Are there any media entries we should display?
     */
    fun hasAnyMedia() = userEntries.isNotEmpty() || smartspaceMediaData.isActive
    fun hasAnyMediaOrRecommendation() = userEntries.isNotEmpty() ||
            (smartspaceMediaData.isActive && smartspaceMediaData.isValid)

    /**
     * Are there any media notifications active (excluding the recommendation)?
     */
    fun hasActiveMedia() = userEntries.any { it.value.active }

    /**
     * Are there any media entries we should display (excluding the recommendation)?
     */
    fun hasAnyMedia() = userEntries.isNotEmpty()

    /**
     * Add a listener for filtered [MediaData] changes
+21 −9
Original line number Diff line number Diff line
@@ -828,12 +828,24 @@ class MediaDataManager(
    fun onSwipeToDismiss() = mediaDataFilter.onSwipeToDismiss()

    /**
     * Are there any media notifications active?
     * Are there any media notifications active, including the recommendations?
     */
    fun hasActiveMediaOrRecommendation() = mediaDataFilter.hasActiveMediaOrRecommendation()

    /**
     * Are there any media entries we should display, including the recommendations?
     * If resumption is enabled, this will include inactive players
     * If resumption is disabled, we only want to show active players
     */
    fun hasAnyMediaOrRecommendation() = mediaDataFilter.hasAnyMediaOrRecommendation()

    /**
     * Are there any resume media notifications active, excluding the recommendations?
     */
    fun hasActiveMedia() = mediaDataFilter.hasActiveMedia()

    /**
     * Are there any media entries we should display?
    * Are there any resume media notifications active, excluding the recommendations?
    * If resumption is enabled, this will include inactive players
    * If resumption is disabled, we only want to show active players
    */
@@ -855,13 +867,17 @@ class MediaDataManager(
         * @param receivedSmartspaceCardLatency is the latency between headphone connects and sysUI
         * displays Smartspace media targets. Will be 0 if the data is not activated by Smartspace
         * signal.
         *
         * @param isSsReactivated indicates resume media card is reactivated by Smartspace
         * recommendation signal
         */
        fun onMediaDataLoaded(
            key: String,
            oldKey: String?,
            data: MediaData,
            immediately: Boolean = true,
            receivedSmartspaceCardLatency: Int = 0
            receivedSmartspaceCardLatency: Int = 0,
            isSsReactivated: Boolean = false
        ) {}

        /**
@@ -870,15 +886,11 @@ class MediaDataManager(
         * @param shouldPrioritize indicates the sorting priority of the Smartspace card. If true,
         * it will be prioritized as the first card. Otherwise, it will show up as the last card as
         * default.
         *
         * @param isSsReactivated indicates resume media card is reactivated by Smartspace
         * recommendation signal
         */
        fun onSmartspaceMediaDataLoaded(
            key: String,
            data: SmartspaceMediaData,
            shouldPrioritize: Boolean = false,
            isSsReactivated: Boolean = false
            shouldPrioritize: Boolean = false
        ) {}

        /** Called whenever a previously existing Media notification was removed. */
Loading