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

Commit c0a85b7c authored by Jordan Demeulenaere's avatar Jordan Demeulenaere
Browse files

Split ActivityLaunchAnimator (1/2)

This CL splits ActivityLaunchAnimator by extracting common logic into
LaunchAnimator. The goal of this CL is to be able to reuse the
LaunchAnimator logic for dialog launches.

This CL also improves GhostedViewLaunchAnimator such that it also works
with:
 * launch containers that are not located at (0, 0).
 * ghosted views that move.

Test: atest ActivityLaunchAnimatorTest
Bug: 193634619
Change-Id: Ic05603600d4a7d4e27182c79bef54286087d00d0
parent a83e90e0
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -165,6 +165,10 @@ public final class MathUtils {
        return start + (stop - start) * amount;
    }

    public static float lerp(int start, int stop, float amount) {
        return lerp((float) start, (float) stop, amount);
    }

    /**
     * Returns the interpolation scalar (s) that satisfies the equation: {@code value = }{@link
     * #lerp}{@code (a, b, s)}
+79 −306

File changed.

Preview size limit exceeded, changes collapsed.

+16 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2021 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.android.systemui.animation

/**
+76 −18

File changed.

Preview size limit exceeded, changes collapsed.

+355 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading