Loading packages/SystemUI/src/com/android/systemui/media/controls/ui/controller/MediaCarouselController.kt +7 −5 Original line number Diff line number Diff line Loading @@ -216,7 +216,7 @@ constructor( private var carouselLocale: Locale? = null private val animationScaleObserver: ContentObserver = object : ContentObserver(null) { object : ContentObserver(executor, 0) { override fun onChange(selfChange: Boolean) { if (!mediaFlags.isSceneContainerEnabled()) { MediaPlayerData.players().forEach { it.updateAnimatorDurationScale() } Loading Loading @@ -396,11 +396,13 @@ constructor( } // Notifies all active players about animation scale changes. bgExecutor.execute { globalSettings.registerContentObserverSync( Settings.Global.getUriFor(Settings.Global.ANIMATOR_DURATION_SCALE), animationScaleObserver ) } } private fun setUpListeners() { val visualStabilityCallback = OnReorderingAllowedListener { Loading packages/SystemUI/tests/src/com/android/systemui/media/controls/ui/controller/MediaCarouselControllerTest.kt +5 −4 Original line number Diff line number Diff line Loading @@ -193,6 +193,7 @@ class MediaCarouselControllerTest : SysuiTestCase() { whenever(panel.mediaViewController).thenReturn(mediaViewController) whenever(mediaFlags.isPersistentSsCardEnabled()).thenReturn(false) MediaPlayerData.clear() FakeExecutor.exhaustExecutors(bgExecutor) verify(globalSettings) .registerContentObserverSync( eq(Settings.Global.getUriFor(Settings.Global.ANIMATOR_DURATION_SCALE)), Loading Loading
packages/SystemUI/src/com/android/systemui/media/controls/ui/controller/MediaCarouselController.kt +7 −5 Original line number Diff line number Diff line Loading @@ -216,7 +216,7 @@ constructor( private var carouselLocale: Locale? = null private val animationScaleObserver: ContentObserver = object : ContentObserver(null) { object : ContentObserver(executor, 0) { override fun onChange(selfChange: Boolean) { if (!mediaFlags.isSceneContainerEnabled()) { MediaPlayerData.players().forEach { it.updateAnimatorDurationScale() } Loading Loading @@ -396,11 +396,13 @@ constructor( } // Notifies all active players about animation scale changes. bgExecutor.execute { globalSettings.registerContentObserverSync( Settings.Global.getUriFor(Settings.Global.ANIMATOR_DURATION_SCALE), animationScaleObserver ) } } private fun setUpListeners() { val visualStabilityCallback = OnReorderingAllowedListener { Loading
packages/SystemUI/tests/src/com/android/systemui/media/controls/ui/controller/MediaCarouselControllerTest.kt +5 −4 Original line number Diff line number Diff line Loading @@ -193,6 +193,7 @@ class MediaCarouselControllerTest : SysuiTestCase() { whenever(panel.mediaViewController).thenReturn(mediaViewController) whenever(mediaFlags.isPersistentSsCardEnabled()).thenReturn(false) MediaPlayerData.clear() FakeExecutor.exhaustExecutors(bgExecutor) verify(globalSettings) .registerContentObserverSync( eq(Settings.Global.getUriFor(Settings.Global.ANIMATOR_DURATION_SCALE)), Loading