diff options
| author | 2018-04-04 13:16:37 +0000 | |
|---|---|---|
| committer | 2018-04-04 13:16:37 +0000 | |
| commit | 0859b46d9d889a327d7c0d76cbe5b571ebb85ec0 (patch) | |
| tree | 3057006eff141a80787b695643cd4090f35c60ad | |
| parent | 269fc17510b7ba30a9a6a43c138882bb8d98ed24 (diff) | |
| parent | ac96052733c4c07f68f81c203fa05a05940c0f31 (diff) | |
Merge "Add launch hint for RecentsAnimation" into pi-dev
| -rw-r--r-- | services/core/java/com/android/server/am/RecentsAnimation.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/am/RecentsAnimation.java b/services/core/java/com/android/server/am/RecentsAnimation.java index 99337b83d001..ad25099814d2 100644 --- a/services/core/java/com/android/server/am/RecentsAnimation.java +++ b/services/core/java/com/android/server/am/RecentsAnimation.java @@ -23,6 +23,7 @@ import static android.content.Intent.FLAG_ACTIVITY_NO_ANIMATION; import static android.os.Trace.TRACE_TAG_ACTIVITY_MANAGER; import static android.view.WindowManager.TRANSIT_NONE; import static com.android.server.am.ActivityStackSupervisor.PRESERVE_WINDOWS; +import static com.android.server.wm.RecentsAnimationController.REORDER_KEEP_HOME_IN_PLACE; import static com.android.server.wm.RecentsAnimationController.REORDER_MOVE_HOME_TO_ORIGINAL_POSITION; import static com.android.server.wm.RecentsAnimationController.REORDER_MOVE_HOME_TO_TOP; @@ -87,6 +88,13 @@ class RecentsAnimation implements RecentsAnimationCallbacks { } } + // Send launch hint if we are actually launching home. If it's already visible (shouldn't + // happen in general) we don't need to send it. + if (homeActivity == null || !homeActivity.visible) { + mStackSupervisor.sendPowerHintForLaunchStartIfNeeded(true /* forceSend */, + homeActivity); + } + mStackSupervisor.getActivityMetricsLogger().notifyActivityLaunching(); mService.setRunningRemoteAnimation(mCallingPid, true); @@ -147,6 +155,12 @@ class RecentsAnimation implements RecentsAnimationCallbacks { synchronized (mService) { if (mWindowManager.getRecentsAnimationController() == null) return; + // Just to be sure end the launch hint in case home was never launched. However, if + // we're keeping home and making it visible, we can leave it on. + if (reorderMode != REORDER_KEEP_HOME_IN_PLACE) { + mStackSupervisor.sendPowerHintForLaunchEndIfNeeded(); + } + mService.setRunningRemoteAnimation(mCallingPid, false); mWindowManager.inSurfaceTransaction(() -> { |