From 35a34bcaf236597703208cf0472cb268b42abb1c Mon Sep 17 00:00:00 2001 From: Mark Renouf Date: Thu, 20 Jul 2023 14:06:27 -0400 Subject: Adds Dagger support for ViewModel scope Dependencies may now be bound to ViewModelScope which survives across Activity configuration restarts. ChooserViewModel is available in ChooserActivity. ViewModel components should be provided by ViewModelComponent to wire up the core parts of the app. A @ViewModel CoroutineScope is also available to inject from within ViewModelScope. * Injects [Resolver|Chooser](Wrapper)Activity in tests * Injects Intent args (Bundle) into ViewModel * Injects Referrer (Uri) into ViewModel Adjusts module structure slightly to accomodate the current state. Further restructuring will be done to simplify the test modules & components required. Test: atest IntentResolverUnitTests Change-Id: Ia249cf07796a9993f2cd021930c52faadb046ca8 --- java/tests/AndroidManifest.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'java/tests/AndroidManifest.xml') diff --git a/java/tests/AndroidManifest.xml b/java/tests/AndroidManifest.xml index b397db5f..9f8dd41c 100644 --- a/java/tests/AndroidManifest.xml +++ b/java/tests/AndroidManifest.xml @@ -27,8 +27,9 @@ + android:name="com.android.intentresolver.TestApplication" + tools:replace="android:appComponentFactory" + android:appComponentFactory="com.android.intentresolver.dagger.InjectedAppComponentFactory"> -- cgit v1.2.3-59-g8ed1b