mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-18 02:08:20 +00:00
Add TaskbarControllers#runAfterInit()
And use it in TaskbarModelCallbacks#commitItemsToUI(), which in rare cases can run during init() before other controllers (namely TaskbarStashController) have been initialized. Test: call commitItemsToUI() in TaskbarModelCallbacks#init(), ensure no crash Fixes: 204847702 Change-Id: Ib9df3ea91d41c76ad1d3392e43b444b8b4a91374 Merged-In: Ib9df3ea91d41c76ad1d3392e43b444b8b4a91374
This commit is contained in:
@@ -184,9 +184,12 @@ public class TaskbarModelCallbacks implements
|
||||
}
|
||||
mContainer.updateHotseatItems(hotseatItemInfos);
|
||||
|
||||
mControllers.taskbarStashController.updateStateForFlag(
|
||||
TaskbarStashController.FLAG_STASHED_IN_APP_EMPTY, isHotseatEmpty);
|
||||
mControllers.taskbarStashController.applyState();
|
||||
final boolean finalIsHotseatEmpty = isHotseatEmpty;
|
||||
mControllers.runAfterInit(() -> {
|
||||
mControllers.taskbarStashController.updateStateForFlag(
|
||||
TaskbarStashController.FLAG_STASHED_IN_APP_EMPTY, finalIsHotseatEmpty);
|
||||
mControllers.taskbarStashController.applyState();
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user