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

Commit ff56885d authored by Craig Mautner's avatar Craig Mautner Committed by Android (Google) Code Review
Browse files

Merge "Relax requirements on Activity.requestVisibleBehind" into lmp-dev

parents 19d62382 aea5cede
Loading
Loading
Loading
Loading
+8 −6
Original line number Diff line number Diff line
@@ -2783,9 +2783,8 @@ public final class ActivityStackSupervisor implements DisplayListener {
        }

        // A non-top activity is reporting a visibility change.
        if ((visible && (top.fullscreen || top.state != ActivityState.RESUMED)) ||
                top.app == null || top.app.thread == null) {
            // Can't carry out this request.
        if (visible && top.fullscreen) {
            // Let the caller know that it can't be seen.
            if (DEBUG_VISIBLE_BEHIND) Slog.d(TAG, "requestVisibleBehind: returning top.fullscreen="
                    + top.fullscreen + " top.state=" + top.state + " top.app=" + top.app +
                    " top.app.thread=" + top.app.thread);
@@ -2807,10 +2806,13 @@ public final class ActivityStackSupervisor implements DisplayListener {
                mService.convertFromTranslucent(next.appToken);
            }
        }
        if (top.app != null && top.app.thread != null) {
            // Notify the top app of the change.
            try {
                top.app.thread.scheduleBackgroundVisibleBehindChanged(top.appToken, visible);
            } catch (RemoteException e) {
            }
        }
        return true;
    }