diff options
| author | 2018-08-31 19:58:16 +0000 | |
|---|---|---|
| committer | 2018-08-31 19:58:16 +0000 | |
| commit | 805ba6fb77aeee806d34b5bb5c314b3726cebb4c (patch) | |
| tree | de2eb53ebf23bd722b462aa2ec535bbdf4898bca | |
| parent | 6e494e9457499c6124fe223916a5896c88e82af7 (diff) | |
| parent | 257f86b2ec0f04150538c7d4afb8844bb5a71586 (diff) | |
Merge "Not passing contentInsets to onAnimationStart"
| -rw-r--r-- | services/core/java/com/android/server/wm/RecentsAnimationController.java | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/services/core/java/com/android/server/wm/RecentsAnimationController.java b/services/core/java/com/android/server/wm/RecentsAnimationController.java index 03c61f0a05b4..4dbd858ec45b 100644 --- a/services/core/java/com/android/server/wm/RecentsAnimationController.java +++ b/services/core/java/com/android/server/wm/RecentsAnimationController.java @@ -21,6 +21,7 @@ import static android.app.WindowConfiguration.WINDOWING_MODE_SPLIT_SCREEN_PRIMAR import static android.app.WindowConfiguration.WINDOWING_MODE_UNDEFINED; import static android.view.RemoteAnimationTarget.MODE_CLOSING; import static android.view.WindowManager.INPUT_CONSUMER_RECENTS_ANIMATION; + import static com.android.server.policy.WindowManagerPolicy.FINISH_LAYOUT_REDO_WALLPAPER; import static com.android.server.wm.ActivityTaskManagerInternal.APP_TRANSITION_RECENTS_ANIM; import static com.android.server.wm.AnimationAdapterProto.REMOTE; @@ -48,8 +49,6 @@ import android.view.RemoteAnimationTarget; import android.view.SurfaceControl; import android.view.SurfaceControl.Transaction; -import com.google.android.collect.Sets; - import com.android.internal.annotations.VisibleForTesting; import com.android.server.LocalServices; import com.android.server.input.InputWindowHandle; @@ -57,6 +56,8 @@ import com.android.server.inputmethod.InputMethodManagerInternal; import com.android.server.wm.SurfaceAnimator.OnAnimationFinishedCallback; import com.android.server.wm.utils.InsetUtils; +import com.google.android.collect.Sets; + import java.io.PrintWriter; import java.util.ArrayList; @@ -370,10 +371,14 @@ public class RecentsAnimationController implements DeathRecipient { && mTargetAppToken.inSplitScreenSecondaryWindowingMode() ? mMinimizedHomeBounds : null; - final Rect contentInsets = mTargetAppToken != null - && mTargetAppToken.findMainWindow() != null - ? mTargetAppToken.findMainWindow().mContentInsets - : null; + final Rect contentInsets; + if (mTargetAppToken != null && mTargetAppToken.findMainWindow() != null) { + contentInsets = mTargetAppToken.findMainWindow().mContentInsets; + } else { + // If the window for the activity had not yet been created, use the display insets. + mService.getStableInsets(mDisplayId, mTmpRect); + contentInsets = mTmpRect; + } mRunner.onAnimationStart(mController, appTargets, contentInsets, minimizedHomeBounds); if (DEBUG_RECENTS_ANIMATIONS) { Slog.d(TAG, "startAnimation(): Notify animation start:"); |