Modern-Apps.git
Publicgit clone https://git.maproj.org/Modern-Apps.gitModern-Apps.git / library / downloadservice / src / main / AndroidManifest.xml
AndroidManifest.xml27 lines · 1.4 KiBRaw
| 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | <manifest xmlns:android="http://schemas.android.com/apk/res/android" |
| 3 | xmlns:tools="http://schemas.android.com/tools"> |
| 4 | |
| 5 | <uses-permission android:name="android.permission.INTERNET" /> |
| 6 | <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> |
| 7 | <!-- ModelDownloadWorker promotes itself via setForeground(ForegroundInfo) |
| 8 | with FOREGROUND_SERVICE_TYPE_DATA_SYNC (API 34+ requires both the |
| 9 | typed promotion and these declarations). Like INTERNET above, this |
| 10 | library declares them itself so every consumer inherits them through |
| 11 | manifest merger; consumers also declare them explicitly. --> |
| 12 | <uses-permission android:name="android.permission.FOREGROUND_SERVICE" /> |
| 13 | <uses-permission android:name="android.permission.FOREGROUND_SERVICE_DATA_SYNC" /> |
| 14 | |
| 15 | <application> |
| 16 | <!-- WorkManager's own manifest declares SystemForegroundService |
| 17 | without a foregroundServiceType; override it (merge) with the |
| 18 | dataSync type that ModelDownloadWorker passes to ForegroundInfo. |
| 19 | Without this, lint SpecifyForegroundServiceType fails in every |
| 20 | consumer (and the platform may reject the promotion). --> |
| 21 | <service |
| 22 | android:name="androidx.work.impl.foreground.SystemForegroundService" |
| 23 | android:foregroundServiceType="dataSync" |
| 24 | tools:node="merge" /> |
| 25 | </application> |
| 26 | |
| 27 | </manifest> |