summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Louis Chang <louischang@google.com> 2019-10-03 01:36:19 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2019-10-03 01:36:19 +0000
commitfb2086bb291a054538a5c51a1a1cace7864f285e (patch)
tree0ae281f97cbfa2cb937b4b7b842c30f9bb32b5e3
parent76e56e40393ad3b14a33dbbba029e521c3850bb2 (diff)
parent040e3678c956aedd688bd5cbeefc9c636c76ef57 (diff)
Merge "Fix no recents animations after unify"
-rw-r--r--services/core/java/com/android/server/wm/WindowManagerService.java30
1 files changed, 15 insertions, 15 deletions
diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java
index e3d677c2a2bf..38a22389d529 100644
--- a/services/core/java/com/android/server/wm/WindowManagerService.java
+++ b/services/core/java/com/android/server/wm/WindowManagerService.java
@@ -974,6 +974,7 @@ public class WindowManagerService extends IWindowManager.Stub
Trace.traceEnd(TRACE_TAG_WINDOW_MANAGER);
}
}
+
/** Listener to notify activity manager about app transitions. */
final WindowManagerInternal.AppTransitionListener mActivityManagerAppTransitionNotifier
= new WindowManagerInternal.AppTransitionListener() {
@@ -990,7 +991,13 @@ public class WindowManagerService extends IWindowManager.Stub
if (atoken == null) {
return;
}
- if (atoken.mLaunchTaskBehind) {
+
+ // While running a recents animation, this will get called early because we show the
+ // recents animation target activity immediately when the animation starts. Defer the
+ // mLaunchTaskBehind updates until recents animation finishes.
+ final boolean isRecentsAnimationTarget = getRecentsAnimationController() != null
+ && getRecentsAnimationController().isTargetApp(atoken);
+ if (atoken.mLaunchTaskBehind && !isRecentsAnimationTarget) {
try {
mActivityTaskManager.notifyLaunchTaskBehindComplete(atoken.token);
} catch (RemoteException e) {
@@ -998,20 +1005,13 @@ public class WindowManagerService extends IWindowManager.Stub
atoken.mLaunchTaskBehind = false;
} else {
atoken.updateReportedVisibilityLocked();
- if (atoken.mEnteringAnimation) {
- if (getRecentsAnimationController() != null
- && getRecentsAnimationController().isTargetApp(atoken)) {
- // Currently running a recents animation, this will get called early because
- // we show the recents animation target activity immediately when the
- // animation starts. In this case, we should defer sending the finished
- // callback until the animation successfully finishes
- return;
- } else {
- atoken.mEnteringAnimation = false;
- try {
- mActivityTaskManager.notifyEnterAnimationComplete(atoken.token);
- } catch (RemoteException e) {
- }
+ // We should also defer sending the finished callback until the recents animation
+ // successfully finishes.
+ if (atoken.mEnteringAnimation && !isRecentsAnimationTarget) {
+ atoken.mEnteringAnimation = false;
+ try {
+ mActivityTaskManager.notifyEnterAnimationComplete(atoken.token);
+ } catch (RemoteException e) {
}
}
}