@@ -279,6 +279,10 @@
|
|||||||
<service
|
<service
|
||||||
android:name="org.koitharu.kotatsu.local.ui.LocalIndexUpdateService"
|
android:name="org.koitharu.kotatsu.local.ui.LocalIndexUpdateService"
|
||||||
android:label="@string/local_manga_processing" />
|
android:label="@string/local_manga_processing" />
|
||||||
|
<service
|
||||||
|
android:name="org.koitharu.kotatsu.local.ui.ImportService"
|
||||||
|
android:foregroundServiceType="dataSync"
|
||||||
|
android:label="@string/importing_manga" />
|
||||||
<service
|
<service
|
||||||
android:name="org.koitharu.kotatsu.widget.shelf.ShelfWidgetService"
|
android:name="org.koitharu.kotatsu.widget.shelf.ShelfWidgetService"
|
||||||
android:label="@string/manga_shelf"
|
android:label="@string/manga_shelf"
|
||||||
|
|||||||
@@ -152,7 +152,8 @@ class ImportService : CoroutineIntentService() {
|
|||||||
private const val CHANNEL_ID = "importing"
|
private const val CHANNEL_ID = "importing"
|
||||||
private const val FOREGROUND_NOTIFICATION_ID = 37
|
private const val FOREGROUND_NOTIFICATION_ID = 37
|
||||||
|
|
||||||
fun start(context: Context, uris: Iterable<Uri>): Boolean = try {
|
fun start(context: Context, uris: Collection<Uri>): Boolean = try {
|
||||||
|
require(uris.isNotEmpty())
|
||||||
for (uri in uris) {
|
for (uri in uris) {
|
||||||
val intent = Intent(context, ImportService::class.java)
|
val intent = Intent(context, ImportService::class.java)
|
||||||
intent.putExtra(DATA_URI, uri.toString())
|
intent.putExtra(DATA_URI, uri.toString())
|
||||||
|
|||||||
Reference in New Issue
Block a user