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

Commit e749aa2e authored by Yunfan Chen's avatar Yunfan Chen Committed by Android (Google) Code Review
Browse files

Merge "Override on WindowToken if necessary" into main

parents ef800dd6 78bc76ce
Loading
Loading
Loading
Loading
+1 −9
Original line number Diff line number Diff line
@@ -2989,15 +2989,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
        return (mAttrs.flags & FLAG_SHOW_WHEN_LOCKED) != 0;
    }

    @Override
    void resolveOverrideConfiguration(Configuration newParentConfig) {
        super.resolveOverrideConfiguration(newParentConfig);
        if (mActivityRecord != null) {
            // Let the activity decide whether to apply the size override.
            return;
        }
        final Configuration resolvedConfig = getResolvedOverrideConfiguration();
        resolvedConfig.seq = newParentConfig.seq;
    void applySizeOverride(Configuration newParentConfig, Configuration resolvedConfig) {
        applySizeOverrideIfNeeded(
                getDisplayContent(),
                mSession.mProcess.mInfo,
+9 −0
Original line number Diff line number Diff line
@@ -672,6 +672,15 @@ class WindowToken extends WindowContainer<WindowState> {
            getResolvedOverrideConfiguration().updateFrom(
                    mFixedRotationTransformState.mRotatedOverrideConfiguration);
        }
        if (asActivityRecord() == null) {
            // Let ActivityRecord override the config if there is one. Otherwise, override here.
            // Resolve WindowToken's configuration by the latest window.
            final WindowState win = getTopChild();
            if (win != null) {
                final Configuration resolvedConfig = getResolvedOverrideConfiguration();
                win.applySizeOverride(newParentConfig, resolvedConfig);
            }
        }
    }

    @Override