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

Commit 60d2e33c authored by Jordan Demeulenaere's avatar Jordan Demeulenaere Committed by Automerger Merge Worker
Browse files

Merge changes from topic "cherrypicker-L57400000962989790:N15400001403861226"...

Merge changes from topic "cherrypicker-L57400000962989790:N15400001403861226" into udc-qpr-dev am: cd15fed5

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/24733449



Change-Id: I24dbdb549b144d06a792a4f8251e3527d0fabee9
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 460c66a3 cd15fed5
Loading
Loading
Loading
Loading
+26 −14
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ import android.graphics.Matrix
import android.graphics.Path
import android.graphics.Rect
import android.graphics.RectF
import android.os.Build
import android.os.Looper
import android.os.RemoteException
import android.util.Log
@@ -88,6 +89,9 @@ class ActivityLaunchAnimator(
                contentAfterFadeInInterpolator = PathInterpolator(0f, 0f, 0.6f, 1f)
            )

        // TODO(b/288507023): Remove this flag.
        @JvmField val DEBUG_LAUNCH_ANIMATION = Build.IS_DEBUGGABLE

        private val DEFAULT_LAUNCH_ANIMATOR = LaunchAnimator(TIMINGS, INTERPOLATORS)
        private val DEFAULT_DIALOG_TO_APP_ANIMATOR = LaunchAnimator(DIALOG_TIMINGS, INTERPOLATORS)

@@ -244,11 +248,13 @@ class ActivityLaunchAnimator(
                callOnIntentStartedOnMainThread(willAnimate)
            }
        } else {
            // TODO(b/288507023): Remove this log.
            if (DEBUG_LAUNCH_ANIMATION) {
                Log.d(
                    TAG,
                "Calling controller.onIntentStarted(willAnimate=$willAnimate) [controller=$this]"
                    "Calling controller.onIntentStarted(willAnimate=$willAnimate) " +
                            "[controller=$this]"
                )
            }
            this.onIntentStarted(willAnimate)
        }
    }
@@ -549,8 +555,12 @@ class ActivityLaunchAnimator(
                removeTimeout()
                iCallback?.invoke()

                // TODO(b/288507023): Remove this log.
                Log.d(TAG, "Calling controller.onLaunchAnimationCancelled() [no window opening]")
                if (DEBUG_LAUNCH_ANIMATION) {
                    Log.d(
                        TAG,
                        "Calling controller.onLaunchAnimationCancelled() [no window opening]"
                    )
                }
                controller.onLaunchAnimationCancelled()
                return
            }
@@ -769,8 +779,9 @@ class ActivityLaunchAnimator(
            Log.i(TAG, "Remote animation timed out")
            timedOut = true

            // TODO(b/288507023): Remove this log.
            if (DEBUG_LAUNCH_ANIMATION) {
                Log.d(TAG, "Calling controller.onLaunchAnimationCancelled() [animation timed out]")
            }
            controller.onLaunchAnimationCancelled()
        }

@@ -786,11 +797,12 @@ class ActivityLaunchAnimator(

            animation?.cancel()

            // TODO(b/288507023): Remove this log.
            if (DEBUG_LAUNCH_ANIMATION) {
                Log.d(
                    TAG,
                    "Calling controller.onLaunchAnimationCancelled() [remote animation cancelled]",
                )
            }
            controller.onLaunchAnimationCancelled()
        }

+4 −1
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ import com.android.keyguard.KeyguardMessageAreaController;
import com.android.keyguard.LockIconViewController;
import com.android.keyguard.dagger.KeyguardBouncerComponent;
import com.android.systemui.R;
import com.android.systemui.animation.ActivityLaunchAnimator;
import com.android.systemui.back.domain.interactor.BackActionInteractor;
import com.android.systemui.bouncer.domain.interactor.BouncerMessageInteractor;
import com.android.systemui.bouncer.ui.binder.KeyguardBouncerViewBinder;
@@ -546,7 +547,9 @@ public class NotificationShadeWindowViewController {
    void setExpandAnimationRunning(boolean running) {
        if (mExpandAnimationRunning != running) {
            // TODO(b/288507023): Remove this log.
            if (ActivityLaunchAnimator.DEBUG_LAUNCH_ANIMATION) {
                Log.d(TAG, "Setting mExpandAnimationRunning=" + running);
            }
            if (running) {
                mLaunchAnimationTimeout = mClock.uptimeMillis() + 5000;
            }
+9 −6
Original line number Diff line number Diff line
@@ -143,8 +143,9 @@ class NotificationLaunchAnimatorController(
    }

    override fun onIntentStarted(willAnimate: Boolean) {
        // TODO(b/288507023): Remove this log.
        if (ActivityLaunchAnimator.DEBUG_LAUNCH_ANIMATION) {
            Log.d(TAG, "onIntentStarted(willAnimate=$willAnimate)")
        }
        notificationExpansionRepository.setIsExpandAnimationRunning(willAnimate)
        notificationEntry.isExpandAnimationRunning = willAnimate

@@ -175,8 +176,9 @@ class NotificationLaunchAnimatorController(
    }

    override fun onLaunchAnimationCancelled(newKeyguardOccludedState: Boolean?) {
        // TODO(b/288507023): Remove this log.
        if (ActivityLaunchAnimator.DEBUG_LAUNCH_ANIMATION) {
            Log.d(TAG, "onLaunchAnimationCancelled()")
        }

        // TODO(b/184121838): Should we call InteractionJankMonitor.cancel if the animation started
        // here?
@@ -194,8 +196,9 @@ class NotificationLaunchAnimatorController(
    }

    override fun onLaunchAnimationEnd(isExpandingFullyAbove: Boolean) {
        // TODO(b/288507023): Remove this log.
        if (ActivityLaunchAnimator.DEBUG_LAUNCH_ANIMATION) {
            Log.d(TAG, "onLaunchAnimationEnd()")
        }
        jankMonitor.end(InteractionJankMonitor.CUJ_NOTIFICATION_APP_START)

        notification.isExpandAnimationRunning = false
+4 −2
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package com.android.systemui.statusbar.notification.data.repository

import android.util.Log
import com.android.systemui.animation.ActivityLaunchAnimator
import com.android.systemui.dagger.SysUISingleton
import javax.inject.Inject
import kotlinx.coroutines.flow.Flow
@@ -40,8 +41,9 @@ class NotificationExpansionRepository @Inject constructor() {

    /** Sets whether the notification expansion animation is currently running. */
    fun setIsExpandAnimationRunning(running: Boolean) {
        // TODO(b/288507023): Remove this log.
        if (ActivityLaunchAnimator.DEBUG_LAUNCH_ANIMATION) {
            Log.d(TAG, "setIsExpandAnimationRunning(running=$running)")
        }
        _isExpandAnimationRunning.value = running
    }
}