nextcloud-android/app/src/debug/AndroidManifest.xml
Álvaro Brey 7ea6283af4
Add testing utilities to override injections in classes injected with AndroidInjection
This includes Activities, Fragments, Services, etc. Other classes should use constructor injection,
and as such shouldn't need this.

This works by overriding the androidInjector method in the Application class (new TestMainApp added)
and allowing to use custom injectors there.

A InjectionOverrideRule is included for ease of use, but for more complicated cases, injection can be
controlled by accessing TestMainApp directly.

A sample is included in InjectionTestActivityTest.

Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
2023-01-12 12:58:31 +01:00

19 lines
846 B
XML

<manifest xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Allows unlocking your device and activating its screen so UI tests can succeed -->
<uses-permission android:name="android.permission.DISABLE_KEYGUARD"/>
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<!-- Allows changing locales -->
<uses-permission android:name="android.permission.CHANGE_CONFIGURATION"
tools:ignore="ProtectedPermissions" />
<application
android:testOnly="false"
tools:ignore="GoogleAppIndexingWarning">
<activity
android:name="com.nextcloud.test.InjectionTestActivity"
android:exported="false" />
<activity android:name="com.nextcloud.test.TestActivity" />
</application>
</manifest>