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

Commit e0a7478f authored by Pat Manning's avatar Pat Manning
Browse files

Refresh taskbar apps show on DeviceProfile change.

Fix: 244269456
Test: manual
Change-Id: Ie95813c77b45b03a824542a25d1349675b1825c0
parent 1c8e6303
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -100,6 +100,9 @@ public class TaskbarViewController implements TaskbarControllers.LoggableTaskbar

    private int mThemeIconsColor;

    private final DeviceProfile.OnDeviceProfileChangeListener mDeviceProfileChangeListener =
            dp -> commitRunningAppsToUI();

    public TaskbarViewController(TaskbarActivityContext activity, TaskbarView taskbarView) {
        mActivity = activity;
        mTaskbarView = taskbarView;
@@ -127,10 +130,13 @@ public class TaskbarViewController implements TaskbarControllers.LoggableTaskbar
                controllers.navbarButtonsViewController.getTaskbarNavButtonTranslationY();
        mTaskbarNavButtonTranslationYForInAppDisplay = controllers.navbarButtonsViewController
                .getTaskbarNavButtonTranslationYForInAppDisplay();

        mActivity.addOnDeviceProfileChangeListener(mDeviceProfileChangeListener);
    }

    public void onDestroy() {
        LauncherAppState.getInstance(mActivity).getModel().removeCallbacks(mModelCallbacks);
        mActivity.removeOnDeviceProfileChangeListener(mDeviceProfileChangeListener);
        mModelCallbacks.unregisterListeners();
    }