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

Commit 3a60cee5 authored by Ats Jenk's avatar Ats Jenk
Browse files

Update spring stiffness for bubble bar drag animation

Use MEDIUM_LOW spring stiffness for bubble bar translation spring.

Bug: 330585397
Flag: ACONFIG com.android.wm.shell.enable_bubble_bar DEVELOPMENT
Test: manual, drag and release bubble bar
Change-Id: Id27a5c5a7a77ae1fee988816271adb810635d84b
parent 03c55c55
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -18,7 +18,6 @@ package com.android.launcher3.taskbar.bubbles;

import static androidx.dynamicanimation.animation.SpringForce.DAMPING_RATIO_LOW_BOUNCY;
import static androidx.dynamicanimation.animation.SpringForce.STIFFNESS_LOW;
import static androidx.dynamicanimation.animation.SpringForce.STIFFNESS_MEDIUM;

import android.content.res.Resources;
import android.graphics.PointF;
@@ -42,11 +41,14 @@ public class BubbleDragAnimator {
    private static final float SCALE_BUBBLE_FOCUSED = 1.2f;
    private static final float SCALE_BUBBLE_CAPTURED = 0.9f;
    private static final float SCALE_BUBBLE_BAR_FOCUSED = 1.1f;
    // 400f matches to MEDIUM_LOW spring stiffness
    private static final float TRANSLATION_SPRING_STIFFNESS = 400f;

    private final PhysicsAnimator.SpringConfig mDefaultConfig =
            new PhysicsAnimator.SpringConfig(STIFFNESS_LOW, DAMPING_RATIO_LOW_BOUNCY);
    private final PhysicsAnimator.SpringConfig mTranslationConfig =
            new PhysicsAnimator.SpringConfig(STIFFNESS_MEDIUM, DAMPING_RATIO_LOW_BOUNCY);
            new PhysicsAnimator.SpringConfig(TRANSLATION_SPRING_STIFFNESS,
                    DAMPING_RATIO_LOW_BOUNCY);
    @NonNull
    private final View mView;
    @NonNull