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

Commit 47a251a2 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "WindowContainer Overlays: Emit initial configuration change"

parents 1800cfbe a204d76b
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -3604,6 +3604,16 @@ class WindowContainer<E extends WindowContainer> extends ConfigurationContainer<
            mOverlayHost = new OverlayHost(mWmService);
        }
        mOverlayHost.addOverlay(overlay, mSurfaceControl);

        // Emit an initial onConfigurationChanged to ensure the overlay
        // can receive any changes between their creation time and
        // attach time.
        try {
            overlay.getRemoteInterface().onConfigurationChanged(getConfiguration());
        } catch (Exception e) {
            Slog.e(TAG, "Error sending initial configuration change to WindowContainer overlay");
            removeOverlay(overlay);
        }
    }

    void removeOverlay(SurfaceControlViewHost.SurfacePackage overlay) {