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

Commit 565ccec6 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Avoid binder call during ContextImple#updateResourceOverlayConstraints" into main

parents 3b35daa8 b3c408f7
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -2944,7 +2944,11 @@ class ContextImpl extends Context {

    private void updateResourceOverlayConstraints() {
        if (mResources != null) {
            mResources.getAssets().setOverlayConstraints(getDisplayId(), getDeviceId());
            // Avoid calling getDisplay() here, as it makes a binder call into
            // DisplayManagerService if the relevant DisplayInfo is not cached in
            // DisplayManagerGlobal.
            int displayId = mDisplay != null ? mDisplay.getDisplayId() : Display.DEFAULT_DISPLAY;
            mResources.getAssets().setOverlayConstraints(displayId, getDeviceId());
        }
    }