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

Commit fe7d3ac5 authored by Liran Binyamin's avatar Liran Binyamin Committed by Android (Google) Code Review
Browse files

Merge "Move PhysicsAnimator to wm/shell/shared" into main

parents 0bfc633b 4180ef08
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -45,7 +45,6 @@ filegroup {
    name: "wm_shell_util-sources",
    srcs: [
        "src/com/android/wm/shell/animation/Interpolators.java",
        "src/com/android/wm/shell/animation/PhysicsAnimator.kt",
        "src/com/android/wm/shell/common/bubbles/*.kt",
        "src/com/android/wm/shell/common/bubbles/*.java",
        "src/com/android/wm/shell/common/magnetictarget/MagnetizedObject.kt",
@@ -169,7 +168,13 @@ java_library {
java_library {
    name: "WindowManager-Shell-shared",

    srcs: ["shared/**/*.java"],
    srcs: [
        "shared/**/*.java",
        "shared/**/*.kt",
    ],
    static_libs: [
        "androidx.dynamicanimation_dynamicanimation",
    ],
}

android_library {
+1 −1
Original line number Diff line number Diff line
@@ -34,11 +34,11 @@ import com.android.internal.logging.testing.UiEventLoggerFake
import com.android.internal.protolog.common.ProtoLog
import com.android.launcher3.icons.BubbleIconFactory
import com.android.wm.shell.R
import com.android.wm.shell.animation.PhysicsAnimatorTestUtils
import com.android.wm.shell.bubbles.Bubbles.SysuiProxy
import com.android.wm.shell.bubbles.animation.AnimatableScaleMatrix
import com.android.wm.shell.common.FloatingContentCoordinator
import com.android.wm.shell.common.ShellExecutor
import com.android.wm.shell.shared.animation.PhysicsAnimatorTestUtils
import com.android.wm.shell.taskview.TaskView
import com.android.wm.shell.taskview.TaskViewTaskController
import com.google.common.truth.Truth.assertThat
+4 −4
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@
 * limitations under the License.
 */

package com.android.wm.shell.animation
package com.android.wm.shell.shared.animation

import android.util.ArrayMap
import android.util.Log
@@ -25,7 +25,7 @@ import androidx.dynamicanimation.animation.FloatPropertyCompat
import androidx.dynamicanimation.animation.SpringAnimation
import androidx.dynamicanimation.animation.SpringForce

import com.android.wm.shell.animation.PhysicsAnimator.Companion.getInstance
import com.android.wm.shell.shared.animation.PhysicsAnimator.Companion.getInstance
import java.lang.ref.WeakReference
import java.util.WeakHashMap
import kotlin.math.abs
@@ -874,7 +874,7 @@ class PhysicsAnimator<T> private constructor (target: T) {
     *
     * @param <T> The type of the object being animated.
    </T> */
    interface UpdateListener<T> {
    fun interface UpdateListener<T> {

        /**
         * Called on each animation frame with the target object, and a map of FloatPropertyCompat
@@ -904,7 +904,7 @@ class PhysicsAnimator<T> private constructor (target: T) {
     *
     * @param <T> The type of the object being animated.
    </T> */
    interface EndListener<T> {
    fun interface EndListener<T> {

        /**
         * Called with the final animation values as each property animation ends. This can be used
+2 −2
Original line number Diff line number Diff line
@@ -13,13 +13,13 @@
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.android.wm.shell.animation
package com.android.wm.shell.shared.animation

import android.os.Handler
import android.os.Looper
import android.util.ArrayMap
import androidx.dynamicanimation.animation.FloatPropertyCompat
import com.android.wm.shell.animation.PhysicsAnimatorTestUtils.prepareForTest
import com.android.wm.shell.shared.animation.PhysicsAnimatorTestUtils.prepareForTest
import java.util.*
import java.util.concurrent.CountDownLatch
import java.util.concurrent.TimeUnit
+1 −1
Original line number Diff line number Diff line
@@ -82,7 +82,6 @@ import com.android.internal.protolog.common.ProtoLog;
import com.android.internal.util.FrameworkStatsLog;
import com.android.wm.shell.R;
import com.android.wm.shell.animation.Interpolators;
import com.android.wm.shell.animation.PhysicsAnimator;
import com.android.wm.shell.bubbles.BubblesNavBarMotionEventHandler.MotionEventListener;
import com.android.wm.shell.bubbles.animation.AnimatableScaleMatrix;
import com.android.wm.shell.bubbles.animation.ExpandedAnimationController;
@@ -95,6 +94,7 @@ import com.android.wm.shell.common.ShellExecutor;
import com.android.wm.shell.common.bubbles.DismissView;
import com.android.wm.shell.common.bubbles.RelativeTouchListener;
import com.android.wm.shell.common.magnetictarget.MagnetizedObject;
import com.android.wm.shell.shared.animation.PhysicsAnimator;

import java.io.PrintWriter;
import java.math.BigDecimal;
Loading