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

Commit 84f2c89e authored by wilsonshih's avatar wilsonshih
Browse files

Prevents the binder call fail from freeze when send app visibility.

The client visibility state could remains GONE if the binder call
IWindow#dispatchAppVisibility fail. A possible reason is the binder is
still freeze and the buffer is fulled.
Try to unfreeze the process binder call before set visibility change,
so and top resumed.

Bug: 225530340
Test: verifyapps to dispatch app visibility happen after unfreeze.

Change-Id: I9c931dd72d7803c2add0348aa0d094333f94c73e
parent 94d1958d
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1403,6 +1403,9 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
                            + "activityRecord=%s", this);
            return false;
        }
        if (onTop) {
            app.addToPendingTop();
        }
        try {
            ProtoLog.v(WM_DEBUG_STATES, "Sending position change to %s, onTop: %b",
                    this, onTop);
+1 −0
Original line number Diff line number Diff line
@@ -1232,6 +1232,7 @@ class TaskFragment extends WindowContainer<WindowContainer> {

            // This activity is now becoming visible.
            if (!next.mVisibleRequested || next.stopped || lastActivityTranslucent) {
                next.app.addToPendingTop();
                next.setVisibility(true);
            }

+1 −0
Original line number Diff line number Diff line
@@ -3526,6 +3526,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
                    "Setting visibility of " + this + ": " + clientVisible);
            mClient.dispatchAppVisibility(clientVisible);
        } catch (RemoteException e) {
            Slog.w(TAG, "Exception thrown during dispatchAppVisibility " + this, e);
        }
    }