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

Commit 801e5c0d authored by Charles Chen's avatar Charles Chen Committed by Android (Google) Code Review
Browse files

Merge "Cache OverContext to prevent deadlock" into tm-dev

parents 087964ad a4c0fc9a
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -76,6 +76,8 @@ final class LocalDisplayAdapter extends DisplayAdapter {

    private final boolean mIsBootDisplayModeSupported;

    private Context mOverlayContext;

    // Called with SyncRoot lock held.
    public LocalDisplayAdapter(DisplayManagerService.SyncRoot syncRoot,
            Context context, Handler handler, Listener listener) {
@@ -1222,7 +1224,10 @@ final class LocalDisplayAdapter extends DisplayAdapter {

    /** Supplies a context whose Resources apply runtime-overlays */
    Context getOverlayContext() {
        return ActivityThread.currentActivityThread().getSystemUiContext();
        if (mOverlayContext == null) {
            mOverlayContext = ActivityThread.currentActivityThread().getSystemUiContext();
        }
        return mOverlayContext;
    }

    /**