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

Commit a5ce2c28 authored by Chris Göllner's avatar Chris Göllner
Browse files

LightBarControllerImpl.Factory: call start to keep legacy behavior

Before, LightBarControllerImpl was doing work in the constructor, which
moved to start().
To keep the same behavior as before in the legacy path (NavigationBar),
we need to manually call start().

Test: Manual - Build & Run and make sure LightBarControllerImpl is
      behaving as expected.
Flag: EXEMPT simple fix
Bug: 379344858
Change-Id: I892c61a05c4c8c1547eddfc70bbdc28688d6490f
parent 2369804a
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -527,12 +527,16 @@ public class LightBarControllerImpl implements
        @Override
        public LightBarController create(@NonNull Context context) {
            // TODO: b/380394368 - Make sure correct per display instances are used.
            return mFactory.create(
            LightBarControllerImpl lightBarController = mFactory.create(
                    context.getDisplayId(),
                    mApplicationScope,
                    mDarkIconDispatcherStore.getDefaultDisplay(),
                    mStatusBarModeRepositoryStore.getDefaultDisplay()
            );
            // Calling start() manually to keep the legacy behavior. Before, LightBarControllerImpl
            // was doing work in the constructor, which moved to start().
            lightBarController.start();
            return lightBarController;
        }
    }
}