Skip to content

Commit ec00cc6

Browse files
committed
Move WorkManagerInitializer from core to app-ose AndroidManifest
1 parent 2ce9b83 commit ec00cc6

File tree

2 files changed

+19
-16
lines changed

2 files changed

+19
-16
lines changed

app-ose/src/main/AndroidManifest.xml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,26 @@
44
-->
55

66
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
7+
xmlns:tools="http://schemas.android.com/tools"
78
android:installLocation="internalOnly">
89

9-
<application android:name=".App"/>
10+
<application android:name=".App">
11+
12+
<!-- Required for Hilt/WorkManager integration. See
13+
- https://developer.android.com/develop/background-work/background-tasks/persistent/configuration/custom-configuration#remove-default
14+
- https://developer.android.com/training/dependency-injection/hilt-jetpack#workmanager
15+
However, we must not disable AndroidX startup completely, as it's needed by other libraries like okhttp. -->
16+
<provider
17+
android:name="androidx.startup.InitializationProvider"
18+
android:authorities="${applicationId}.androidx-startup"
19+
android:exported="false"
20+
tools:node="merge">
21+
<meta-data
22+
android:name="androidx.work.WorkManagerInitializer"
23+
android:value="androidx.startup"
24+
tools:node="remove" />
25+
</provider>
26+
27+
</application>
1028

1129
</manifest>

core/src/main/AndroidManifest.xml

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -51,21 +51,6 @@
5151
tools:ignore="UnusedAttribute"
5252
android:supportsRtl="true">
5353

54-
<!-- Required for Hilt/WorkManager integration. See
55-
- https://developer.android.com/develop/background-work/background-tasks/persistent/configuration/custom-configuration#remove-default
56-
- https://developer.android.com/training/dependency-injection/hilt-jetpack#workmanager
57-
However, we must not disable AndroidX startup completely, as it's needed by other libraries like okhttp. -->
58-
<provider
59-
android:name="androidx.startup.InitializationProvider"
60-
android:authorities="${applicationId}.androidx-startup"
61-
android:exported="false"
62-
tools:node="merge">
63-
<meta-data
64-
android:name="androidx.work.WorkManagerInitializer"
65-
android:value="androidx.startup"
66-
tools:node="remove" />
67-
</provider>
68-
6954
<!-- Remove the node added by AppAuth (remove only from net.openid.appauth library, not from our flavor manifest files) -->
7055
<activity android:name="net.openid.appauth.RedirectUriReceiverActivity"
7156
tools:node="remove" tools:selector="net.openid.appauth"/>

0 commit comments

Comments
 (0)