Move NotificationsInteractor & related repos to shared.
We need a way to access notifications-related secure settings in new sysui recommended architecture code. WallpaperPicker already had code for this (in the form of a NotificationsInteractor, NotificationsRepository and SecureSettingsRepository), so instead of having multiple sources of truth for the same type of data, I moved these to the shared package so both SystemUI and WallpaperPicker can access them. I also renamed NotificationsInteractor and NotificationsRepository to NotificationsSettingsInteractor and NotificationSettingsRepository respectively, to better reflect the kind of data they handle. Added the fake repository to a new CustomizationTestUtils lib. This move also includes a very small behavior change - there was a circular dependency between Notifications[Settings]Interactor and NotificationsSnapshotRestorer, which deals with restoring setting when the "Reset" button is pressed in WallpaperPicker. Since the snapshot restorer only needs to exist in WallpaperPicker code, I split it from the interactor and made it collect the settings flow from the interactor directly (see other CLs in topic). I tested that this works correctly by running WallpaperPickerGoogle and doing the following steps: - open Lock screen customization page - toggle "Show notifications on the lockscreen" - lock the device to verify that the correct setting is applied - unlock the device and press "Reset" - verify that the toggle state is updated - lock the device to verify that the old setting is applied Note: The test associated with NotificationsSettingsRepository is currently in WallpaperPickerTests as opposed to CustomizationTests, and it's complicated to move it so it will stay there for now. See b/315806189. Bug: 293167744 Test: manual (see steps above) + atest NotificationSettingsRepositoryTest Flag: NONE Change-Id: I4d4bacd16ce070823d61de601b03f0d0ec63e822
Loading
Please register or sign in to comment