Make AmbientState injectable
1) Mark AmbientState as SysuiSingleton to allow access from - PanelBar - NotificationStackScrollLayout 2) Mark AmbientState constructor with @Inject for Dagger use when needed 3) Ensure that AmbientState params are injectable - Context --- AmbientState is now global, and has access to application context; we can leave this unchanged (otherwise we mark it with @Named(VIEW_CONTEXT) to ask for the subcomponent view context) - SectionProvider --- bind to NotificationSectionsManager in NotificationsModule, the closest module to AmbientState 4) Add AmbientState to constructors for NSSL and NPVC - Have PanelBar update AmbientState directly (via PVC) instead of piping changes through layers of classes Fixes: 177921542 Test: log to verify that shade open state updates correctly Test: build sysui-studio with sysuiTestDebug variant and SystemUITests config, then run: adb shell am instrument -w -e class com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayoutTest com.android.systemui.tests Change-Id: I0a50d603b49c9f55f1af41084974aee59e9ce95b
Loading
Please register or sign in to comment