Fix NightDisplayListener in AutoTileManager
Before this change, NightDisplayListener was injected once (on SystemUI start) and it was associated with the user upon creation. This had two problems: * The user didn't change when the actual user changed, meaning that it couldn't track changes in the state for a different user. * If the user associated with it was removed (and its Settings removed), then when the user changed it will try to reregister and fail. To fix this, inject a builder and always create a NightDisplayListener for the proper user. Also, when QS_PIPELINE_NEW_HOST is true and QS_PIPELINE_AUTO_ADD is false, the user changes were not propagated to AutoTileManager. This is fixed in this CL. Test: manual Test: atest AutoTileManager QSTileHost Fixes: 288403490 Change-Id: Iffb0d9b25ad36b599e9e4e4424985197435b4c8f
Loading
Please register or sign in to comment