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

Commit e1a2b67f authored by Brian Isganitis's avatar Brian Isganitis
Browse files

Revert "Completely destroy Launcher's Taskbar."

Revert submission 28102205

Reason for revert: Potential test breakage.

Reverted changes: ag/28102205

Change-Id: If7fa1ff192a240e753e5c245d591d46e594e5a6f
Flag: TEST_ONLY
Bug: 230027385
Test: Presubmit
parent 326ae5e3
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -610,7 +610,8 @@ public class TaskbarManager {
        }
    }

    private void addTaskbarRootViewToWindow() {
    @VisibleForTesting
    public void addTaskbarRootViewToWindow() {
        if (enableTaskbarNoRecreate() && !mAddedWindow && mTaskbarActivityContext != null) {
            mWindowManager.addView(mTaskbarRootLayout,
                    mTaskbarActivityContext.getWindowLayoutParams());
@@ -618,7 +619,8 @@ public class TaskbarManager {
        }
    }

    private void removeTaskbarRootViewFromWindow() {
    @VisibleForTesting
    public void removeTaskbarRootViewFromWindow() {
        if (enableTaskbarNoRecreate() && mAddedWindow) {
            mWindowManager.removeViewImmediate(mTaskbarRootLayout);
            mAddedWindow = false;
+6 −2
Original line number Diff line number Diff line
@@ -119,14 +119,18 @@ class TaskbarUnitTestRule(
                try {
                    // Replace Launcher Taskbar window with test instance.
                    instrumentation.runOnMainSync {
                        launcherTaskbarManager?.destroy()
                        launcherTaskbarManager?.removeTaskbarRootViewFromWindow()
                        taskbarManager.onUserUnlocked() // Required to complete initialization.
                    }

                    injectControllers()
                    base.evaluate()
                } finally {
                    instrumentation.runOnMainSync { taskbarManager.destroy() }
                    // Revert Taskbar window.
                    instrumentation.runOnMainSync {
                        taskbarManager.destroy()
                        launcherTaskbarManager?.addTaskbarRootViewToWindow()
                    }
                }
            }
        }