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

Commit aa220239 authored by Michael Mikhail's avatar Michael Mikhail Committed by Automerger Merge Worker
Browse files

Merge "Modify tablet recommendation card dimensions" into tm-qpr-dev am: bb1f34c1

parents 77dff213 bb1f34c1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -41,7 +41,7 @@
        android:layout_width="@dimen/qs_media_app_icon_size"
        android:layout_height="@dimen/qs_media_app_icon_size"
        android:layout_marginStart="@dimen/qs_media_padding"
        android:layout_marginTop="@dimen/qs_media_padding"
        android:layout_marginTop="@dimen/qs_media_rec_icon_top_margin"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

+5 −0
Original line number Diff line number Diff line
@@ -35,6 +35,11 @@
         not appear immediately after user swipes to the side -->
    <dimen name="qs_tiles_page_horizontal_margin">20dp</dimen>

    <!-- Size of Smartspace media recommendations cards in the QSPanel carousel -->
    <dimen name="qs_media_rec_icon_top_margin">27dp</dimen>
    <dimen name="qs_media_rec_album_size">152dp</dimen>
    <dimen name="qs_media_rec_album_side_margin">16dp</dimen>

    <dimen name="lockscreen_shade_max_over_scroll_amount">42dp</dimen>

    <!-- Roughly the same distance as media on LS to media on QS. We will translate by this value
+1 −0
Original line number Diff line number Diff line
@@ -1051,6 +1051,7 @@
    <dimen name="qs_media_session_collapsed_guideline">144dp</dimen>

    <!-- Size of Smartspace media recommendations cards in the QSPanel carousel -->
    <dimen name="qs_media_rec_icon_top_margin">16dp</dimen>
    <dimen name="qs_media_rec_album_size">88dp</dimen>
    <dimen name="qs_media_rec_album_side_margin">16dp</dimen>
    <dimen name="qs_media_rec_album_bottom_margin">8dp</dimen>
+5 −3
Original line number Diff line number Diff line
@@ -184,6 +184,7 @@ constructor(

    private val configListener =
        object : ConfigurationController.ConfigurationListener {

            override fun onDensityOrFontScaleChanged() {
                // System font changes should only happen when UMO is offscreen or a flicker may
                // occur
@@ -199,6 +200,7 @@ constructor(
            override fun onConfigChanged(newConfig: Configuration?) {
                if (newConfig == null) return
                isRtl = newConfig.layoutDirection == View.LAYOUT_DIRECTION_RTL
                updatePlayers(recreateMedia = true)
            }

            override fun onUiModeChanged() {
@@ -635,7 +637,7 @@ constructor(
            val existingSmartspaceMediaKey = MediaPlayerData.smartspaceMediaKey()
            existingSmartspaceMediaKey?.let {
                val removedPlayer =
                    MediaPlayerData.removeMediaPlayer(existingSmartspaceMediaKey, true)
                    removePlayer(existingSmartspaceMediaKey, dismissMediaData = false)
                removedPlayer?.run {
                    debugLogger.logPotentialMemoryLeak(existingSmartspaceMediaKey)
                }
@@ -685,7 +687,7 @@ constructor(
        key: String,
        dismissMediaData: Boolean = true,
        dismissRecommendation: Boolean = true
    ) {
    ): MediaControlPanel? {
        if (key == MediaPlayerData.smartspaceMediaKey()) {
            MediaPlayerData.smartspaceMediaData?.let {
                logger.logRecommendationRemoved(it.packageName, it.instanceId)
@@ -693,7 +695,7 @@ constructor(
        }
        val removed =
            MediaPlayerData.removeMediaPlayer(key, dismissMediaData || dismissRecommendation)
        removed?.apply {
        return removed?.apply {
            mediaCarouselScrollHandler.onPrePlayerRemoved(removed)
            mediaContent.removeView(removed.mediaViewHolder?.player)
            mediaContent.removeView(removed.recommendationViewHolder?.recommendations)