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

Commit c044540a authored by mpodolian's avatar mpodolian Committed by Mykola Podolian
Browse files

Fix invalid resource for shared library for atest run.

Replaced the dimen resource with the constant.

Bug: 388910897
Flag: EXEMPT test
Test: TaplTestTaskBarIconDrag
Change-Id: If5d6bf4a064e5694167e681302fe362c060f5dce
parent b51d1897
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -38,7 +38,6 @@
    <dimen name="drag_zone_v_split_from_expanded_view_height_fold_short">100dp</dimen>

    <!-- Bubble drop target dimensions -->
    <dimen name="drop_target_elevation">2dp</dimen>
    <dimen name="drop_target_radius">28dp</dimen>
    <dimen name="drop_target_stroke">2dp</dimen>
    <dimen name="drop_target_full_screen_padding">20dp</dimen>
+7 −2
Original line number Diff line number Diff line
@@ -18,12 +18,12 @@ package com.android.wm.shell.shared.bubbles

import android.content.Context
import android.graphics.RectF
import android.util.TypedValue
import android.view.ViewGroup.LayoutParams.MATCH_PARENT
import android.widget.FrameLayout
import androidx.core.animation.Animator
import androidx.core.animation.AnimatorListenerAdapter
import androidx.core.animation.ValueAnimator
import com.android.wm.shell.shared.R
import com.android.wm.shell.shared.bubbles.DragZone.DropTargetRect

/**
@@ -46,6 +46,7 @@ class DropTargetManager(
        const val MORPH_ANIM_DURATION = 250L
        const val DROP_TARGET_ALPHA_IN_DURATION = 150L
        const val DROP_TARGET_ALPHA_OUT_DURATION = 100L
        const val DROP_TARGET_ELEVATION_DP = 2f
    }

    /** Must be called when a drag gesture is starting. */
@@ -61,7 +62,11 @@ class DropTargetManager(
        if (dropTargetView.parent != null) container.removeView(dropTargetView)
        container.addView(dropTargetView, 0)
        dropTargetView.alpha = 0f
        dropTargetView.elevation = context.resources.getDimension(R.dimen.drop_target_elevation)

        dropTargetView.elevation = TypedValue.applyDimension(
            TypedValue.COMPLEX_UNIT_DIP,
            DROP_TARGET_ELEVATION_DP, context.resources.displayMetrics
        )
        // Match parent and the target is drawn within the view
        dropTargetView.layoutParams = FrameLayout.LayoutParams(MATCH_PARENT, MATCH_PARENT)
    }