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

Commit 06f18c06 authored by Riddle Hsu's avatar Riddle Hsu
Browse files

Remove unused config helper of TaskFragment

The caller was removed in commit affc70fa.

Bug: 159103089
Test: CtsWindowManagerDeviceActivity
Change-Id: I1643cfaa4728df0fac7f4442fdeb9fc42d7cbf5e
parent c9d20f37
Loading
Loading
Loading
Loading
+0 −42
Original line number Original line Diff line number Diff line
@@ -391,41 +391,6 @@ class TaskFragment extends WindowContainer<WindowContainer> {


    private final EnsureActivitiesVisibleHelper mEnsureActivitiesVisibleHelper =
    private final EnsureActivitiesVisibleHelper mEnsureActivitiesVisibleHelper =
            new EnsureActivitiesVisibleHelper(this);
            new EnsureActivitiesVisibleHelper(this);
    private final EnsureVisibleActivitiesConfigHelper mEnsureVisibleActivitiesConfigHelper =
            new EnsureVisibleActivitiesConfigHelper();
    private class EnsureVisibleActivitiesConfigHelper implements Predicate<ActivityRecord> {
        private boolean mUpdateConfig;
        private boolean mPreserveWindow;
        private boolean mBehindFullscreen;

        void reset(boolean preserveWindow) {
            mPreserveWindow = preserveWindow;
            mUpdateConfig = false;
            mBehindFullscreen = false;
        }

        void process(ActivityRecord start, boolean preserveWindow) {
            if (start == null || !start.isVisibleRequested()) {
                return;
            }
            reset(preserveWindow);
            forAllActivities(this, start, true /* includeBoundary */,
                    true /* traverseTopToBottom */);

            if (mUpdateConfig) {
                // Ensure the resumed state of the focus activity if we updated the configuration of
                // any activity.
                mRootWindowContainer.resumeFocusedTasksTopActivities();
            }
        }

        @Override
        public boolean test(ActivityRecord r) {
            mUpdateConfig |= r.ensureActivityConfiguration(0 /*globalChanges*/, mPreserveWindow);
            mBehindFullscreen |= r.occludesParent();
            return mBehindFullscreen;
        }
    }


    /** Creates an embedded task fragment. */
    /** Creates an embedded task fragment. */
    TaskFragment(ActivityTaskManagerService atmService, IBinder fragmentToken,
    TaskFragment(ActivityTaskManagerService atmService, IBinder fragmentToken,
@@ -2163,13 +2128,6 @@ class TaskFragment extends WindowContainer<WindowContainer> {
        return getTask() != null ? getTask().mTaskId : INVALID_TASK_ID;
        return getTask() != null ? getTask().mTaskId : INVALID_TASK_ID;
    }
    }


    /**
     * Ensures all visible activities at or below the input activity have the right configuration.
     */
    void ensureVisibleActivitiesConfiguration(ActivityRecord start, boolean preserveWindow) {
        mEnsureVisibleActivitiesConfigHelper.process(start, preserveWindow);
    }

    void computeConfigResourceOverrides(@NonNull Configuration inOutConfig,
    void computeConfigResourceOverrides(@NonNull Configuration inOutConfig,
            @NonNull Configuration parentConfig) {
            @NonNull Configuration parentConfig) {
        computeConfigResourceOverrides(inOutConfig, parentConfig, null /* overrideDisplayInfo */,
        computeConfigResourceOverrides(inOutConfig, parentConfig, null /* overrideDisplayInfo */,