Specify foregroundServiceType for DownloadService

This commit is contained in:
残页 2023-04-02 17:20:49 +08:00 committed by GitHub
parent 732a8260c2
commit b696dae808
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -62,7 +62,8 @@
<service <service
android:name=".core.download.DownloadService" android:name=".core.download.DownloadService"
android:exported="false" /> android:exported="false"
android:foregroundServiceType="dataSync" />
<service <service
android:name=".core.JobService" android:name=".core.JobService"

View File

@ -157,7 +157,8 @@ abstract class ManifestUpdater: DefaultTask() {
cmpList.add(""" cmpList.add("""
|<service |<service
| android:name="x.COMPONENT_PLACEHOLDER_4" | android:name="x.COMPONENT_PLACEHOLDER_4"
| android:exported="false" />""".ind(2) | android:exported="false"
| android:foregroundServiceType="dataSync" />""".ind(2)
) )
cmpList.add(""" cmpList.add("""