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

Commit 32454d28 authored by Evan Rosky's avatar Evan Rosky Committed by Android (Google) Code Review
Browse files

Merge "Remove very repeated calls to onMergedOverrideConfigurationChanged" into main

parents 619f3200 da49c8bf
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -9262,13 +9262,6 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
            Slog.w(TAG, errorMessage);
        }

        // Configuration's equality doesn't consider seq so if only seq number changes in resolved
        // override configuration. Therefore ConfigurationContainer doesn't change merged override
        // configuration, but it's used to push configuration changes so explicitly update that.
        if (getMergedOverrideConfiguration().seq != getResolvedOverrideConfiguration().seq) {
            onMergedOverrideConfigurationChanged();
        }

        // Before PiP animation is done, th windowing mode of the activity is still the previous
        // mode (see RootWindowContainer#moveActivityToPinnedRootTask). So once the windowing mode
        // of activity is changed, it is the signal of the last step to update the PiP states.
+3 −9
Original line number Diff line number Diff line
@@ -223,9 +223,9 @@ public abstract class ConfigurationContainer<E extends ConfigurationContainer> {
    }

    /**
     * Update merged override configuration based on corresponding parent's config and notify all
     * its children. If there is no parent, merged override configuration will set equal to current
     * override config.
     * Update merged override configuration based on corresponding parent's config. If there is no
     * parent, merged override configuration will set equal to current override config. This
     * doesn't cascade on its own since it's called by {@link #onConfigurationChanged}.
     * @see #mMergedOverrideConfiguration
     */
    void onMergedOverrideConfigurationChanged() {
@@ -240,10 +240,6 @@ public abstract class ConfigurationContainer<E extends ConfigurationContainer> {
        } else {
            mMergedOverrideConfiguration.setTo(mResolvedOverrideConfiguration);
        }
        for (int i = getChildCount() - 1; i >= 0; --i) {
            final ConfigurationContainer child = getChildAt(i);
            child.onMergedOverrideConfigurationChanged();
        }
    }

    /**
@@ -688,8 +684,6 @@ public abstract class ConfigurationContainer<E extends ConfigurationContainer> {
        if (newParent != null) {
            // Update full configuration of this container and all its children.
            onConfigurationChanged(newParent.mFullConfiguration);
            // Update merged override configuration of this container and all its children.
            onMergedOverrideConfigurationChanged();
        }
    }