Loading services/core/java/com/android/server/wm/AppTransition.java +5 −5 Original line number Diff line number Diff line Loading @@ -870,10 +870,10 @@ public class AppTransition implements Dump { } private Animation createAspectScaledThumbnailEnterNonFullscreenAnimationLocked( Rect containingFrame, @Nullable Rect surfaceInsets, int taskId) { Rect frame, @Nullable Rect surfaceInsets, int taskId) { getNextAppTransitionStartRect(taskId, mTmpStartRect); float width = containingFrame.width(); float height = containingFrame.height(); float width = frame.width(); float height = frame.height(); float scaleWidth = mTmpStartRect.width() / width; float scaleHeight = mTmpStartRect.height() / height; AnimationSet set = new AnimationSet(true); Loading @@ -886,9 +886,9 @@ public class AppTransition implements Dump { ScaleAnimation scale = new ScaleAnimation(scaleWidth, 1, scaleHeight, 1, (width + surfaceInsetsHorizontal) / 2, (height + surfaceInsetsVertical) / 2); int fromX = mTmpStartRect.left + mTmpStartRect.width() / 2 - (containingFrame.left + containingFrame.width() / 2); - (frame.left + frame.width() / 2); int fromY = mTmpStartRect.top + mTmpStartRect.height() / 2 - (containingFrame.top + containingFrame.height() / 2); - (frame.top + frame.height() / 2); TranslateAnimation translation = new TranslateAnimation(fromX, 0, fromY, 0); set.addAnimation(scale); set.addAnimation(translation); Loading services/core/java/com/android/server/wm/WindowManagerService.java +11 −8 Original line number Diff line number Diff line Loading @@ -2806,12 +2806,17 @@ public class WindowManagerService extends IWindowManager.Stub Rect appFrame = new Rect(0, 0, width, height); Rect surfaceInsets = null; final boolean fullscreen = win != null && win.isFullscreen(width, height); // Dialog activities have windows with containing frame being very large, but not // exactly fullscreen and much smaller mFrame. We use this distinction to identify // dialog activities. final boolean dialogWindow = win != null && !win.mContainingFrame.equals(win.mFrame); final boolean freeform = win != null && win.inFreeformWorkspace(); if (win != null) { // Containing frame will usually cover the whole screen, including dialog windows. // For freeform workspace windows it will not cover the whole screen and it also // won't exactly match the final freeform window frame (e.g. when overlapping with // the status bar). In that case we need to use the final frame. if (freeform) { containingFrame.set(win.mFrame); } else { containingFrame.set(win.mContainingFrame); } surfaceInsets = win.getAttrs().surfaceInsets; if (fullscreen) { // For fullscreen windows use the window frames and insets to set the thumbnail Loading @@ -2830,11 +2835,9 @@ public class WindowManagerService extends IWindowManager.Stub // screen gets the enter animation. Both appear in the mOpeningApps set. enter = false; } final boolean resizedWindow = !fullscreen && !dialogWindow; Animation a = mAppTransition.loadAnimation(lp, transit, enter, containingWidth, containingHeight, mCurConfiguration.orientation, containingFrame, contentInsets, surfaceInsets, appFrame, isVoiceInteraction, resizedWindow, atoken.mTask.mTaskId); surfaceInsets, appFrame, isVoiceInteraction, freeform, atoken.mTask.mTaskId); if (a != null) { if (DEBUG_ANIM) { RuntimeException e = null; Loading services/core/java/com/android/server/wm/WindowState.java +1 −1 Original line number Diff line number Diff line Loading @@ -1629,7 +1629,7 @@ final class WindowState implements WindowManagerPolicy.WindowState { } } private boolean inFreeformWorkspace() { boolean inFreeformWorkspace() { final Task task = getTask(); return task != null && task.mStack != null && task.mStack.mStackId == FREEFORM_WORKSPACE_STACK_ID; Loading Loading
services/core/java/com/android/server/wm/AppTransition.java +5 −5 Original line number Diff line number Diff line Loading @@ -870,10 +870,10 @@ public class AppTransition implements Dump { } private Animation createAspectScaledThumbnailEnterNonFullscreenAnimationLocked( Rect containingFrame, @Nullable Rect surfaceInsets, int taskId) { Rect frame, @Nullable Rect surfaceInsets, int taskId) { getNextAppTransitionStartRect(taskId, mTmpStartRect); float width = containingFrame.width(); float height = containingFrame.height(); float width = frame.width(); float height = frame.height(); float scaleWidth = mTmpStartRect.width() / width; float scaleHeight = mTmpStartRect.height() / height; AnimationSet set = new AnimationSet(true); Loading @@ -886,9 +886,9 @@ public class AppTransition implements Dump { ScaleAnimation scale = new ScaleAnimation(scaleWidth, 1, scaleHeight, 1, (width + surfaceInsetsHorizontal) / 2, (height + surfaceInsetsVertical) / 2); int fromX = mTmpStartRect.left + mTmpStartRect.width() / 2 - (containingFrame.left + containingFrame.width() / 2); - (frame.left + frame.width() / 2); int fromY = mTmpStartRect.top + mTmpStartRect.height() / 2 - (containingFrame.top + containingFrame.height() / 2); - (frame.top + frame.height() / 2); TranslateAnimation translation = new TranslateAnimation(fromX, 0, fromY, 0); set.addAnimation(scale); set.addAnimation(translation); Loading
services/core/java/com/android/server/wm/WindowManagerService.java +11 −8 Original line number Diff line number Diff line Loading @@ -2806,12 +2806,17 @@ public class WindowManagerService extends IWindowManager.Stub Rect appFrame = new Rect(0, 0, width, height); Rect surfaceInsets = null; final boolean fullscreen = win != null && win.isFullscreen(width, height); // Dialog activities have windows with containing frame being very large, but not // exactly fullscreen and much smaller mFrame. We use this distinction to identify // dialog activities. final boolean dialogWindow = win != null && !win.mContainingFrame.equals(win.mFrame); final boolean freeform = win != null && win.inFreeformWorkspace(); if (win != null) { // Containing frame will usually cover the whole screen, including dialog windows. // For freeform workspace windows it will not cover the whole screen and it also // won't exactly match the final freeform window frame (e.g. when overlapping with // the status bar). In that case we need to use the final frame. if (freeform) { containingFrame.set(win.mFrame); } else { containingFrame.set(win.mContainingFrame); } surfaceInsets = win.getAttrs().surfaceInsets; if (fullscreen) { // For fullscreen windows use the window frames and insets to set the thumbnail Loading @@ -2830,11 +2835,9 @@ public class WindowManagerService extends IWindowManager.Stub // screen gets the enter animation. Both appear in the mOpeningApps set. enter = false; } final boolean resizedWindow = !fullscreen && !dialogWindow; Animation a = mAppTransition.loadAnimation(lp, transit, enter, containingWidth, containingHeight, mCurConfiguration.orientation, containingFrame, contentInsets, surfaceInsets, appFrame, isVoiceInteraction, resizedWindow, atoken.mTask.mTaskId); surfaceInsets, appFrame, isVoiceInteraction, freeform, atoken.mTask.mTaskId); if (a != null) { if (DEBUG_ANIM) { RuntimeException e = null; Loading
services/core/java/com/android/server/wm/WindowState.java +1 −1 Original line number Diff line number Diff line Loading @@ -1629,7 +1629,7 @@ final class WindowState implements WindowManagerPolicy.WindowState { } } private boolean inFreeformWorkspace() { boolean inFreeformWorkspace() { final Task task = getTask(); return task != null && task.mStack != null && task.mStack.mStackId == FREEFORM_WORKSPACE_STACK_ID; Loading