Loading core/java/android/window/flags/windowing_frontend.aconfig +0 −11 Original line number Diff line number Diff line Loading @@ -397,17 +397,6 @@ flag { bug: "376407910" } flag { name: "remove_defer_hiding_client" namespace: "windowing_frontend" description: "Remove mDeferHidingClient since everything is in shell-transition." is_fixed_read_only: true bug: "382485959" metadata { purpose: PURPOSE_BUGFIX } } flag { name: "relative_insets" namespace: "windowing_frontend" Loading services/core/java/com/android/server/wm/ActivityRecord.java +2 −67 Original line number Diff line number Diff line Loading @@ -145,7 +145,6 @@ import static com.android.server.wm.ActivityRecord.State.STOPPING; import static com.android.server.wm.ActivityRecordProto.ALL_DRAWN; import static com.android.server.wm.ActivityRecordProto.APP_STOPPED; import static com.android.server.wm.ActivityRecordProto.CLIENT_VISIBLE; import static com.android.server.wm.ActivityRecordProto.DEFER_HIDING_CLIENT; import static com.android.server.wm.ActivityRecordProto.ENABLE_RECENTS_SCREENSHOT; import static com.android.server.wm.ActivityRecordProto.FILLS_PARENT; import static com.android.server.wm.ActivityRecordProto.FRONT_OF_TASK; Loading Loading @@ -524,11 +523,6 @@ final class ActivityRecord extends WindowToken { // True if the visible state of this token was forced to true due to a transferred starting // window. private boolean mVisibleSetFromTransferredStartingWindow; // TODO: figure out how to consolidate with the same variable in ActivityRecord. private boolean mDeferHidingClient; // If true we told WM to defer reporting to the client // process that it is hidden. private boolean mLastDeferHidingClient; // If true we will defer setting mClientVisible to false // and reporting to the client that it is hidden. boolean nowVisible; // is this activity's window visible? boolean mClientVisibilityDeferred;// was the visibility change message to client deferred? boolean idle; // has the activity gone idle? Loading Loading @@ -1127,7 +1121,6 @@ final class ActivityRecord extends WindowToken { pw.println(ActivityInfo.screenOrientationToString(super.getOverrideOrientation())); pw.println(prefix + "mVisibleRequested=" + mVisibleRequested + " mVisible=" + mVisible + " mClientVisible=" + isClientVisible() + ((mDeferHidingClient) ? " mDeferHidingClient=" + mDeferHidingClient : "") + " reportedDrawn=" + mReportedDrawn + " reportedVisible=" + reportedVisible); if (paused) { pw.print(prefix); pw.print("paused="); pw.println(paused); Loading Loading @@ -1168,9 +1161,6 @@ final class ActivityRecord extends WindowToken { else TimeUtils.formatDuration(lastVisibleTime, now, pw); pw.println(); } if (mDeferHidingClient) { pw.println(prefix + "mDeferHidingClient=" + mDeferHidingClient); } if (mServiceConnectionsHolder != null) { pw.print(prefix); pw.print("connections="); pw.println(mServiceConnectionsHolder); } Loading Loading @@ -5245,30 +5235,6 @@ final class ActivityRecord extends WindowToken { task.lastDescription = description; } void setDeferHidingClient() { if (Flags.removeDeferHidingClient()) { return; } mDeferHidingClient = true; } void clearDeferHidingClient() { if (Flags.removeDeferHidingClient()) { return; } if (!mDeferHidingClient) return; mDeferHidingClient = false; if (!mVisibleRequested) { // Hiding the client is no longer deferred and the app isn't visible still, go ahead and // update the visibility. setVisibility(false); } } boolean getDeferHidingClient() { return mDeferHidingClient; } boolean canAffectSystemUiFlags() { final TaskFragment taskFragment = getTaskFragment(); return taskFragment != null && taskFragment.canAffectSystemUiFlags() Loading Loading @@ -5342,17 +5308,14 @@ final class ActivityRecord extends WindowToken { if (visible == mVisibleRequested && visible == mVisible && visible == isClientVisible()) { return; } if (visible) { mDeferHidingClient = false; } setVisibility(visible, mDeferHidingClient); setVisibilityInner(visible); mAtmService.addWindowLayoutReasons( ActivityTaskManagerService.LAYOUT_REASON_VISIBILITY_CHANGED); mTaskSupervisor.getActivityMetricsLogger().notifyVisibilityChanged(this); mTaskSupervisor.mAppVisibilitiesChangedSinceLastPause = true; } private void setVisibility(boolean visible, boolean deferHidingClient) { private void setVisibilityInner(boolean visible) { // Don't set visibility to false if we were already not visible. This prevents WM from // adding the app to the closing app list which doesn't make sense for something that is // already not visible. However, set visibility to true even if we are already visible. Loading @@ -5361,13 +5324,6 @@ final class ActivityRecord extends WindowToken { // TODO: Probably a good idea to separate the concept of opening/closing apps from the // concept of setting visibility... if (!visible && !mVisibleRequested) { if (!deferHidingClient && mLastDeferHidingClient) { // We previously deferred telling the client to hide itself when visibility was // initially set to false. Now we would like it to hide, so go ahead and set it. mLastDeferHidingClient = deferHidingClient; setClientVisible(false); } return; } Loading Loading @@ -5405,7 +5361,6 @@ final class ActivityRecord extends WindowToken { mAtmService.mBackNavigationController.onAppVisibilityChanged(this, visible); setVisibleRequested(visible); mLastDeferHidingClient = deferHidingClient; if (!visible) { // Because starting window was transferred, this activity may be a trampoline which has Loading Loading @@ -5961,15 +5916,6 @@ final class ActivityRecord extends WindowToken { try { final boolean canEnterPictureInPicture = checkEnterPictureInPictureState( "makeInvisible", true /* beforeStopping */); // Defer telling the client it is hidden if it can enter Pip and isn't current paused, // stopped or stopping. This gives it a chance to enter Pip in onPause(). final boolean deferHidingClient = canEnterPictureInPicture && !isState(STARTED, STOPPING, STOPPED, PAUSED); if (deferHidingClient) { setDeferHidingClient(); } else { clearDeferHidingClient(); } setVisibility(false); switch (mState) { Loading Loading @@ -6614,16 +6560,6 @@ final class ActivityRecord extends WindowToken { return mReportedDrawn; } @Override void setClientVisible(boolean clientVisible) { if (!Flags.removeDeferHidingClient()) { // TODO(shell-transitions): Remove mDeferHidingClient once everything is // shell-transitions. pip activities should just remain in clientVisible. if (!clientVisible && mDeferHidingClient) return; } super.setClientVisible(clientVisible); } /** * Updated this app token tracking states for interesting and drawn windows based on the window. * Loading Loading @@ -9198,7 +9134,6 @@ final class ActivityRecord extends WindowToken { proto.write(VISIBLE, mVisible); proto.write(VISIBLE_REQUESTED, mVisibleRequested); proto.write(CLIENT_VISIBLE, isClientVisible()); proto.write(DEFER_HIDING_CLIENT, mDeferHidingClient); proto.write(REPORTED_DRAWN, mReportedDrawn); proto.write(REPORTED_VISIBLE, reportedVisible); proto.write(NUM_INTERESTING_WINDOWS, mNumInterestingWindows); Loading services/core/java/com/android/server/wm/BackNavigationController.java +0 −6 Original line number Diff line number Diff line Loading @@ -428,12 +428,6 @@ class BackNavigationController { ProtoLog.w(WM_DEBUG_BACK_PREVIEW, "Pending back animation due to another animation is running"); mPendingAnimationBuilder = builder; // Current transition is still running, we have to defer the hiding to the // client process to prevent the unexpected relayout when handling the back // animation. for (int i = prevActivities.size() - 1; i >= 0; --i) { prevActivities.get(i).setDeferHidingClient(); } } else { scheduleAnimation(builder); } Loading services/core/java/com/android/server/wm/TaskFragment.java +0 −2 Original line number Diff line number Diff line Loading @@ -2037,8 +2037,6 @@ class TaskFragment extends WindowContainer<WindowContainer> { // We don't need to schedule another stop, we only need to let it happen. prev.setState(STOPPING, "completePausedLocked"); } else if (!prev.isVisibleRequested() || shouldSleepOrShutDownActivities()) { // Clear out any deferred client hide we might currently have. prev.clearDeferHidingClient(); // If we were visible then resumeTopActivities will release resources before // stopping. prev.addToStopping(true /* scheduleIdle */, false /* idleDelayed */, Loading Loading
core/java/android/window/flags/windowing_frontend.aconfig +0 −11 Original line number Diff line number Diff line Loading @@ -397,17 +397,6 @@ flag { bug: "376407910" } flag { name: "remove_defer_hiding_client" namespace: "windowing_frontend" description: "Remove mDeferHidingClient since everything is in shell-transition." is_fixed_read_only: true bug: "382485959" metadata { purpose: PURPOSE_BUGFIX } } flag { name: "relative_insets" namespace: "windowing_frontend" Loading
services/core/java/com/android/server/wm/ActivityRecord.java +2 −67 Original line number Diff line number Diff line Loading @@ -145,7 +145,6 @@ import static com.android.server.wm.ActivityRecord.State.STOPPING; import static com.android.server.wm.ActivityRecordProto.ALL_DRAWN; import static com.android.server.wm.ActivityRecordProto.APP_STOPPED; import static com.android.server.wm.ActivityRecordProto.CLIENT_VISIBLE; import static com.android.server.wm.ActivityRecordProto.DEFER_HIDING_CLIENT; import static com.android.server.wm.ActivityRecordProto.ENABLE_RECENTS_SCREENSHOT; import static com.android.server.wm.ActivityRecordProto.FILLS_PARENT; import static com.android.server.wm.ActivityRecordProto.FRONT_OF_TASK; Loading Loading @@ -524,11 +523,6 @@ final class ActivityRecord extends WindowToken { // True if the visible state of this token was forced to true due to a transferred starting // window. private boolean mVisibleSetFromTransferredStartingWindow; // TODO: figure out how to consolidate with the same variable in ActivityRecord. private boolean mDeferHidingClient; // If true we told WM to defer reporting to the client // process that it is hidden. private boolean mLastDeferHidingClient; // If true we will defer setting mClientVisible to false // and reporting to the client that it is hidden. boolean nowVisible; // is this activity's window visible? boolean mClientVisibilityDeferred;// was the visibility change message to client deferred? boolean idle; // has the activity gone idle? Loading Loading @@ -1127,7 +1121,6 @@ final class ActivityRecord extends WindowToken { pw.println(ActivityInfo.screenOrientationToString(super.getOverrideOrientation())); pw.println(prefix + "mVisibleRequested=" + mVisibleRequested + " mVisible=" + mVisible + " mClientVisible=" + isClientVisible() + ((mDeferHidingClient) ? " mDeferHidingClient=" + mDeferHidingClient : "") + " reportedDrawn=" + mReportedDrawn + " reportedVisible=" + reportedVisible); if (paused) { pw.print(prefix); pw.print("paused="); pw.println(paused); Loading Loading @@ -1168,9 +1161,6 @@ final class ActivityRecord extends WindowToken { else TimeUtils.formatDuration(lastVisibleTime, now, pw); pw.println(); } if (mDeferHidingClient) { pw.println(prefix + "mDeferHidingClient=" + mDeferHidingClient); } if (mServiceConnectionsHolder != null) { pw.print(prefix); pw.print("connections="); pw.println(mServiceConnectionsHolder); } Loading Loading @@ -5245,30 +5235,6 @@ final class ActivityRecord extends WindowToken { task.lastDescription = description; } void setDeferHidingClient() { if (Flags.removeDeferHidingClient()) { return; } mDeferHidingClient = true; } void clearDeferHidingClient() { if (Flags.removeDeferHidingClient()) { return; } if (!mDeferHidingClient) return; mDeferHidingClient = false; if (!mVisibleRequested) { // Hiding the client is no longer deferred and the app isn't visible still, go ahead and // update the visibility. setVisibility(false); } } boolean getDeferHidingClient() { return mDeferHidingClient; } boolean canAffectSystemUiFlags() { final TaskFragment taskFragment = getTaskFragment(); return taskFragment != null && taskFragment.canAffectSystemUiFlags() Loading Loading @@ -5342,17 +5308,14 @@ final class ActivityRecord extends WindowToken { if (visible == mVisibleRequested && visible == mVisible && visible == isClientVisible()) { return; } if (visible) { mDeferHidingClient = false; } setVisibility(visible, mDeferHidingClient); setVisibilityInner(visible); mAtmService.addWindowLayoutReasons( ActivityTaskManagerService.LAYOUT_REASON_VISIBILITY_CHANGED); mTaskSupervisor.getActivityMetricsLogger().notifyVisibilityChanged(this); mTaskSupervisor.mAppVisibilitiesChangedSinceLastPause = true; } private void setVisibility(boolean visible, boolean deferHidingClient) { private void setVisibilityInner(boolean visible) { // Don't set visibility to false if we were already not visible. This prevents WM from // adding the app to the closing app list which doesn't make sense for something that is // already not visible. However, set visibility to true even if we are already visible. Loading @@ -5361,13 +5324,6 @@ final class ActivityRecord extends WindowToken { // TODO: Probably a good idea to separate the concept of opening/closing apps from the // concept of setting visibility... if (!visible && !mVisibleRequested) { if (!deferHidingClient && mLastDeferHidingClient) { // We previously deferred telling the client to hide itself when visibility was // initially set to false. Now we would like it to hide, so go ahead and set it. mLastDeferHidingClient = deferHidingClient; setClientVisible(false); } return; } Loading Loading @@ -5405,7 +5361,6 @@ final class ActivityRecord extends WindowToken { mAtmService.mBackNavigationController.onAppVisibilityChanged(this, visible); setVisibleRequested(visible); mLastDeferHidingClient = deferHidingClient; if (!visible) { // Because starting window was transferred, this activity may be a trampoline which has Loading Loading @@ -5961,15 +5916,6 @@ final class ActivityRecord extends WindowToken { try { final boolean canEnterPictureInPicture = checkEnterPictureInPictureState( "makeInvisible", true /* beforeStopping */); // Defer telling the client it is hidden if it can enter Pip and isn't current paused, // stopped or stopping. This gives it a chance to enter Pip in onPause(). final boolean deferHidingClient = canEnterPictureInPicture && !isState(STARTED, STOPPING, STOPPED, PAUSED); if (deferHidingClient) { setDeferHidingClient(); } else { clearDeferHidingClient(); } setVisibility(false); switch (mState) { Loading Loading @@ -6614,16 +6560,6 @@ final class ActivityRecord extends WindowToken { return mReportedDrawn; } @Override void setClientVisible(boolean clientVisible) { if (!Flags.removeDeferHidingClient()) { // TODO(shell-transitions): Remove mDeferHidingClient once everything is // shell-transitions. pip activities should just remain in clientVisible. if (!clientVisible && mDeferHidingClient) return; } super.setClientVisible(clientVisible); } /** * Updated this app token tracking states for interesting and drawn windows based on the window. * Loading Loading @@ -9198,7 +9134,6 @@ final class ActivityRecord extends WindowToken { proto.write(VISIBLE, mVisible); proto.write(VISIBLE_REQUESTED, mVisibleRequested); proto.write(CLIENT_VISIBLE, isClientVisible()); proto.write(DEFER_HIDING_CLIENT, mDeferHidingClient); proto.write(REPORTED_DRAWN, mReportedDrawn); proto.write(REPORTED_VISIBLE, reportedVisible); proto.write(NUM_INTERESTING_WINDOWS, mNumInterestingWindows); Loading
services/core/java/com/android/server/wm/BackNavigationController.java +0 −6 Original line number Diff line number Diff line Loading @@ -428,12 +428,6 @@ class BackNavigationController { ProtoLog.w(WM_DEBUG_BACK_PREVIEW, "Pending back animation due to another animation is running"); mPendingAnimationBuilder = builder; // Current transition is still running, we have to defer the hiding to the // client process to prevent the unexpected relayout when handling the back // animation. for (int i = prevActivities.size() - 1; i >= 0; --i) { prevActivities.get(i).setDeferHidingClient(); } } else { scheduleAnimation(builder); } Loading
services/core/java/com/android/server/wm/TaskFragment.java +0 −2 Original line number Diff line number Diff line Loading @@ -2037,8 +2037,6 @@ class TaskFragment extends WindowContainer<WindowContainer> { // We don't need to schedule another stop, we only need to let it happen. prev.setState(STOPPING, "completePausedLocked"); } else if (!prev.isVisibleRequested() || shouldSleepOrShutDownActivities()) { // Clear out any deferred client hide we might currently have. prev.clearDeferHidingClient(); // If we were visible then resumeTopActivities will release resources before // stopping. prev.addToStopping(true /* scheduleIdle */, false /* idleDelayed */, Loading