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

Skip to content
Commit c4037509 authored by Lyn Han's avatar Lyn Han
Browse files

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
parent 8f046c76
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment