Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c2bf0cc7 authored by wilsonshih's avatar wilsonshih
Browse files

Remove ActivityRecord mDeferHidingClient since shell transition enabled

To prevent the client visibility change during/before transition
animation.

Flag: com.android.window.flags.remove_defer_hiding_client
Bug: 382485959
Test: Verify the surface view won't be release during animation while
closing pip-able app.

Change-Id: I5ff020d73d09352713a029d5f95d2b27e8b32148
parent d17175f6
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -454,6 +454,17 @@ 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"
+11 −3
Original line number Diff line number Diff line
@@ -5408,10 +5408,16 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
    }

    void setDeferHidingClient() {
        if (Flags.removeDeferHidingClient()) {
            return;
        }
        mDeferHidingClient = true;
    }

    void clearDeferHidingClient() {
        if (Flags.removeDeferHidingClient()) {
            return;
        }
        if (!mDeferHidingClient) return;
        mDeferHidingClient = false;
        if (!mVisibleRequested) {
@@ -7141,9 +7147,11 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A

    @Override
    void setClientVisible(boolean clientVisible) {
        // TODO(shell-transitions): Remove mDeferHidingClient once everything is shell-transitions.
        //                          pip activities should just remain in 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);
    }