diff --git a/services/core/java/com/android/server/am/ActivityStackSupervisor.java b/services/core/java/com/android/server/am/ActivityStackSupervisor.java index 0a47e4068d4dc..8e0fcc187af68 100644 --- a/services/core/java/com/android/server/am/ActivityStackSupervisor.java +++ b/services/core/java/com/android/server/am/ActivityStackSupervisor.java @@ -2464,7 +2464,7 @@ public final class ActivityStackSupervisor implements DisplayListener { // entrance of the new window to be properly animated. // Note here we always set the replacing window first, as the flags might be needed // during the relaunch. If we end up not doing any relaunch, we clear the flags later. - mWindowManager.setReplacingWindow(topActivity.appToken, animate); + mWindowManager.setWillReplaceWindow(topActivity.appToken, animate); } mWindowManager.deferSurfaceLayout(); @@ -2506,7 +2506,7 @@ public final class ActivityStackSupervisor implements DisplayListener { // If we didn't actual do a relaunch (indicated by kept==true meaning we kept the old // window), we need to clear the replace window settings. Otherwise, we schedule a // timeout to remove the old window if the replacing window is not coming in time. - mWindowManager.scheduleClearReplacingWindowIfNeeded(topActivity.appToken, !kept); + mWindowManager.scheduleClearWillReplaceWindows(topActivity.appToken, !kept); } if (!deferResume) { diff --git a/services/core/java/com/android/server/wm/AppWindowToken.java b/services/core/java/com/android/server/wm/AppWindowToken.java index df212bcacc1a6..66fa976433ba4 100644 --- a/services/core/java/com/android/server/wm/AppWindowToken.java +++ b/services/core/java/com/android/server/wm/AppWindowToken.java @@ -20,15 +20,11 @@ import static android.app.ActivityManager.StackId; import static android.view.Display.DEFAULT_DISPLAY; import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_STARTING; import static android.view.WindowManager.LayoutParams.TYPE_BASE_APPLICATION; -import static android.view.WindowManagerPolicy.TRANSIT_ENTER; -import static android.view.WindowManagerPolicy.TRANSIT_EXIT; import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_ANIM; import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_APP_TRANSITIONS; import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_ADD_REMOVE; -import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_LAYERS; import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_LAYOUT_REPEATS; import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_ORIENTATION; -import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_RESIZE; import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_STARTING_WINDOW; import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_VISIBILITY; import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_WINDOW_MOVEMENT; @@ -37,7 +33,6 @@ import static com.android.server.wm.WindowManagerDebugConfig.TAG_WM; import static com.android.server.wm.WindowManagerService.H.NOTIFY_ACTIVITY_DRAWN; import static com.android.server.wm.WindowStateAnimator.STACK_CLIP_NONE; import static com.android.server.wm.WindowManagerService.UPDATE_FOCUS_WILL_PLACE_SURFACES; -import static com.android.server.wm.WindowManagerService.WINDOWS_FREEZING_SCREENS_TIMEOUT; import static com.android.server.wm.WindowManagerService.logWithStack; import com.android.server.input.InputApplicationHandle; @@ -50,7 +45,6 @@ import android.graphics.Rect; import android.os.Binder; import android.os.IBinder; import android.os.Message; -import android.os.RemoteException; import android.os.SystemClock; import android.util.Slog; import android.view.IApplicationToken; @@ -132,6 +126,8 @@ class AppWindowToken extends WindowToken { boolean startingDisplayed; boolean startingMoved; boolean firstWindowDrawn; + private final WindowState.UpdateReportedVisibilityResults mReportedVisibilityResults = + new WindowState.UpdateReportedVisibilityResults(); // Input application handle used by the input dispatcher. final InputApplicationHandle mInputApplicationHandle; @@ -162,19 +158,10 @@ class AppWindowToken extends WindowToken { } void sendAppVisibilityToClients() { - final int N = windows.size(); - for (int i=0; i