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 (see other CLs in topic).
I also renamed NotificationsInteractor and NotificationsRepository to
NotificationsSettingsInteractor and NotificationSettingsRepository
respectively, to better reflect the kind of data they handle.
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.
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
Keeping the test file in this package for now, because moving it is
complicated. See b/315806189.
Bug: 293167744
Test: manual (see steps above) + atest NotificationSettingsRepositoryTest
Flag: NONE
Change-Id: Iea3711af1871bb66ffed6f01c3fb1490d441cf02
diff --git a/tests/Android.bp b/tests/Android.bp
index 74dc6a1..33f1c3f 100644
--- a/tests/Android.bp
+++ b/tests/Android.bp
@@ -47,6 +47,7 @@
"WallpaperPicker2TestLib",
"WallpaperPicker2TestRunner",
"ThemePickerTestLib",
+ "SystemUICustomizationTestUtils",
"androidx.test.espresso.core",
"androidx.test.espresso.contrib",
"androidx.test.espresso.intents",