Loading packages/SystemUI/src/com/android/systemui/media/ColorSchemeTransition.kt +4 −3 Original line number Diff line number Diff line Loading @@ -85,12 +85,13 @@ typealias ColorTransitionFactory = (Int, (ColorScheme) -> Int, (Int) -> Unit) -> */ class ColorSchemeTransition internal constructor( private val context: Context, bgColor: Int, mediaViewHolder: MediaViewHolder, colorTransitionFactory: ColorTransitionFactory ) { constructor(context: Context, bgColor: Int, mediaViewHolder: MediaViewHolder) : this(context, bgColor, mediaViewHolder, ::ColorTransition) constructor(context: Context, mediaViewHolder: MediaViewHolder) : this(context, mediaViewHolder, ::ColorTransition) val bgColor = context.getColor(com.android.systemui.R.color.material_dynamic_secondary95) val surfaceColor = colorTransitionFactory( bgColor, Loading packages/SystemUI/src/com/android/systemui/media/MediaCarouselController.kt +0 −1 Original line number Diff line number Diff line Loading @@ -904,7 +904,6 @@ internal object MediaPlayerData { private val EMPTY = MediaData( userId = -1, initialized = false, backgroundColor = 0, app = null, appIcon = null, artist = null, Loading packages/SystemUI/src/com/android/systemui/media/MediaControlPanel.java +4 −7 Original line number Diff line number Diff line Loading @@ -150,7 +150,6 @@ public class MediaControlPanel { private MediaSession.Token mToken; private MediaController mController; private Lazy<MediaDataManager> mMediaDataManagerLazy; private int mBackgroundColor; // Uid for the media app. protected int mUid = Process.INVALID_UID; private int mSmartspaceMediaItemsCount; Loading Loading @@ -343,8 +342,7 @@ public class MediaControlPanel { AnimatorSet exit = loadAnimator(R.anim.media_metadata_exit, Interpolators.EMPHASIZED_ACCELERATE, titleText, artistText); mColorSchemeTransition = new ColorSchemeTransition( mContext, mBackgroundColor, mMediaViewHolder); mColorSchemeTransition = new ColorSchemeTransition(mContext, mMediaViewHolder); mMetadataAnimationHandler = new MetadataAnimationHandler(exit, enter); } Loading Loading @@ -409,7 +407,6 @@ public class MediaControlPanel { } mInstanceId = data.getInstanceId(); mBackgroundColor = data.getBackgroundColor(); if (mToken == null || !mToken.equals(token)) { mToken = token; } Loading Loading @@ -485,7 +482,7 @@ public class MediaControlPanel { Drawable icon = device.getIcon(); if (icon instanceof AdaptiveIcon) { AdaptiveIcon aIcon = (AdaptiveIcon) icon; aIcon.setBackgroundColor(mBackgroundColor); aIcon.setBackgroundColor(mColorSchemeTransition.getBgColor()); iconView.setImageDrawable(aIcon); } else { iconView.setImageDrawable(icon); Loading Loading @@ -956,11 +953,11 @@ public class MediaControlPanel { } mSmartspaceId = SmallHash.hash(data.getTargetId()); mBackgroundColor = data.getBackgroundColor(); int backgroundColor = data.getBackgroundColor(); mPackageName = data.getPackageName(); mInstanceId = data.getInstanceId(); TransitionLayout recommendationCard = mRecommendationViewHolder.getRecommendations(); recommendationCard.setBackgroundTintList(ColorStateList.valueOf(mBackgroundColor)); recommendationCard.setBackgroundTintList(ColorStateList.valueOf(backgroundColor)); List<SmartspaceAction> mediaRecommendationList = data.getRecommendations(); if (mediaRecommendationList == null || mediaRecommendationList.isEmpty()) { Loading packages/SystemUI/src/com/android/systemui/media/MediaData.kt +0 −1 Original line number Diff line number Diff line Loading @@ -27,7 +27,6 @@ import com.android.systemui.R data class MediaData( val userId: Int, val initialized: Boolean = false, val backgroundColor: Int, /** * App name that will be displayed on the player. */ Loading packages/SystemUI/src/com/android/systemui/media/MediaDataManager.kt +2 −4 Original line number Diff line number Diff line Loading @@ -85,7 +85,6 @@ private const val EXTRAS_SMARTSPACE_DISMISS_INTENT_KEY = "dismiss_intent" private val LOADING = MediaData( userId = -1, initialized = false, backgroundColor = 0, app = null, appIcon = null, artist = null, Loading Loading @@ -177,7 +176,6 @@ class MediaDataManager( private val themeText = com.android.settingslib.Utils.getColorAttr(context, com.android.internal.R.attr.textColorPrimary).defaultColor private val bgColor = context.getColor(R.color.material_dynamic_secondary95) // Internal listeners are part of the internal pipeline. External listeners (those registered // with [MediaDeviceManager.addListener]) receive events after they have propagated through Loading Loading @@ -591,7 +589,7 @@ class MediaDataManager( val mediaAction = getResumeMediaAction(resumeAction) val lastActive = systemClock.elapsedRealtime() foregroundExecutor.execute { onMediaDataLoaded(packageName, null, MediaData(userId, true, bgColor, appName, onMediaDataLoaded(packageName, null, MediaData(userId, true, appName, null, desc.subtitle, desc.title, artworkIcon, listOf(mediaAction), listOf(0), MediaButton(playOrPause = mediaAction), packageName, token, appIntent, device = null, active = false, Loading Loading @@ -713,7 +711,7 @@ class MediaDataManager( val resumeAction: Runnable? = mediaEntries[key]?.resumeAction val hasCheckedForResume = mediaEntries[key]?.hasCheckedForResume == true val active = mediaEntries[key]?.active ?: true onMediaDataLoaded(key, oldKey, MediaData(sbn.normalizedUserId, true, bgColor, app, onMediaDataLoaded(key, oldKey, MediaData(sbn.normalizedUserId, true, app, smallIcon, artist, song, artWorkIcon, actionIcons, actionsToShowCollapsed, semanticActions, sbn.packageName, token, notif.contentIntent, device, active, resumeAction = resumeAction, playbackLocation = playbackLocation, Loading Loading
packages/SystemUI/src/com/android/systemui/media/ColorSchemeTransition.kt +4 −3 Original line number Diff line number Diff line Loading @@ -85,12 +85,13 @@ typealias ColorTransitionFactory = (Int, (ColorScheme) -> Int, (Int) -> Unit) -> */ class ColorSchemeTransition internal constructor( private val context: Context, bgColor: Int, mediaViewHolder: MediaViewHolder, colorTransitionFactory: ColorTransitionFactory ) { constructor(context: Context, bgColor: Int, mediaViewHolder: MediaViewHolder) : this(context, bgColor, mediaViewHolder, ::ColorTransition) constructor(context: Context, mediaViewHolder: MediaViewHolder) : this(context, mediaViewHolder, ::ColorTransition) val bgColor = context.getColor(com.android.systemui.R.color.material_dynamic_secondary95) val surfaceColor = colorTransitionFactory( bgColor, Loading
packages/SystemUI/src/com/android/systemui/media/MediaCarouselController.kt +0 −1 Original line number Diff line number Diff line Loading @@ -904,7 +904,6 @@ internal object MediaPlayerData { private val EMPTY = MediaData( userId = -1, initialized = false, backgroundColor = 0, app = null, appIcon = null, artist = null, Loading
packages/SystemUI/src/com/android/systemui/media/MediaControlPanel.java +4 −7 Original line number Diff line number Diff line Loading @@ -150,7 +150,6 @@ public class MediaControlPanel { private MediaSession.Token mToken; private MediaController mController; private Lazy<MediaDataManager> mMediaDataManagerLazy; private int mBackgroundColor; // Uid for the media app. protected int mUid = Process.INVALID_UID; private int mSmartspaceMediaItemsCount; Loading Loading @@ -343,8 +342,7 @@ public class MediaControlPanel { AnimatorSet exit = loadAnimator(R.anim.media_metadata_exit, Interpolators.EMPHASIZED_ACCELERATE, titleText, artistText); mColorSchemeTransition = new ColorSchemeTransition( mContext, mBackgroundColor, mMediaViewHolder); mColorSchemeTransition = new ColorSchemeTransition(mContext, mMediaViewHolder); mMetadataAnimationHandler = new MetadataAnimationHandler(exit, enter); } Loading Loading @@ -409,7 +407,6 @@ public class MediaControlPanel { } mInstanceId = data.getInstanceId(); mBackgroundColor = data.getBackgroundColor(); if (mToken == null || !mToken.equals(token)) { mToken = token; } Loading Loading @@ -485,7 +482,7 @@ public class MediaControlPanel { Drawable icon = device.getIcon(); if (icon instanceof AdaptiveIcon) { AdaptiveIcon aIcon = (AdaptiveIcon) icon; aIcon.setBackgroundColor(mBackgroundColor); aIcon.setBackgroundColor(mColorSchemeTransition.getBgColor()); iconView.setImageDrawable(aIcon); } else { iconView.setImageDrawable(icon); Loading Loading @@ -956,11 +953,11 @@ public class MediaControlPanel { } mSmartspaceId = SmallHash.hash(data.getTargetId()); mBackgroundColor = data.getBackgroundColor(); int backgroundColor = data.getBackgroundColor(); mPackageName = data.getPackageName(); mInstanceId = data.getInstanceId(); TransitionLayout recommendationCard = mRecommendationViewHolder.getRecommendations(); recommendationCard.setBackgroundTintList(ColorStateList.valueOf(mBackgroundColor)); recommendationCard.setBackgroundTintList(ColorStateList.valueOf(backgroundColor)); List<SmartspaceAction> mediaRecommendationList = data.getRecommendations(); if (mediaRecommendationList == null || mediaRecommendationList.isEmpty()) { Loading
packages/SystemUI/src/com/android/systemui/media/MediaData.kt +0 −1 Original line number Diff line number Diff line Loading @@ -27,7 +27,6 @@ import com.android.systemui.R data class MediaData( val userId: Int, val initialized: Boolean = false, val backgroundColor: Int, /** * App name that will be displayed on the player. */ Loading
packages/SystemUI/src/com/android/systemui/media/MediaDataManager.kt +2 −4 Original line number Diff line number Diff line Loading @@ -85,7 +85,6 @@ private const val EXTRAS_SMARTSPACE_DISMISS_INTENT_KEY = "dismiss_intent" private val LOADING = MediaData( userId = -1, initialized = false, backgroundColor = 0, app = null, appIcon = null, artist = null, Loading Loading @@ -177,7 +176,6 @@ class MediaDataManager( private val themeText = com.android.settingslib.Utils.getColorAttr(context, com.android.internal.R.attr.textColorPrimary).defaultColor private val bgColor = context.getColor(R.color.material_dynamic_secondary95) // Internal listeners are part of the internal pipeline. External listeners (those registered // with [MediaDeviceManager.addListener]) receive events after they have propagated through Loading Loading @@ -591,7 +589,7 @@ class MediaDataManager( val mediaAction = getResumeMediaAction(resumeAction) val lastActive = systemClock.elapsedRealtime() foregroundExecutor.execute { onMediaDataLoaded(packageName, null, MediaData(userId, true, bgColor, appName, onMediaDataLoaded(packageName, null, MediaData(userId, true, appName, null, desc.subtitle, desc.title, artworkIcon, listOf(mediaAction), listOf(0), MediaButton(playOrPause = mediaAction), packageName, token, appIntent, device = null, active = false, Loading Loading @@ -713,7 +711,7 @@ class MediaDataManager( val resumeAction: Runnable? = mediaEntries[key]?.resumeAction val hasCheckedForResume = mediaEntries[key]?.hasCheckedForResume == true val active = mediaEntries[key]?.active ?: true onMediaDataLoaded(key, oldKey, MediaData(sbn.normalizedUserId, true, bgColor, app, onMediaDataLoaded(key, oldKey, MediaData(sbn.normalizedUserId, true, app, smallIcon, artist, song, artWorkIcon, actionIcons, actionsToShowCollapsed, semanticActions, sbn.packageName, token, notif.contentIntent, device, active, resumeAction = resumeAction, playbackLocation = playbackLocation, Loading