<?xml version="1.0" encoding="utf-8"?>
<manifest
	xmlns:android="http://schemas.android.com/apk/res/android"
	xmlns:tools="http://schemas.android.com/tools">

	<uses-permission android:name="android.permission.INTERNET" />
	<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
	<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
	<uses-permission android:name="android.permission.WAKE_LOCK" />
	<uses-permission android:name="android.permission.VIBRATE" />
	<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
	<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
	<uses-permission android:name="android.permission.GET_ACCOUNTS" />
	<uses-permission android:name="android.permission.MANAGE_ACCOUNTS" />
	<uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS" />
	<uses-permission android:name="android.permission.USE_CREDENTIALS" />
	<uses-permission android:name="android.permission.READ_SYNC_STATS" />
	<uses-permission android:name="android.permission.READ_SYNC_SETTINGS" />
	<uses-permission android:name="android.permission.WRITE_SYNC_SETTINGS" />
	<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />

	<application
		android:name="org.koitharu.kotatsu.KotatsuApp"
		android:allowBackup="true"
		android:backupAgent="org.koitharu.kotatsu.settings.backup.AppBackupAgent"
		android:dataExtractionRules="@xml/backup_rules"
		android:enableOnBackInvokedCallback="true"
		android:fullBackupContent="@xml/backup_content"
		android:fullBackupOnly="true"
		android:icon="@mipmap/ic_launcher"
		android:label="@string/app_name"
		android:largeHeap="true"
		android:localeConfig="@xml/locales"
		android:networkSecurityConfig="@xml/network_security_config"
		android:roundIcon="@mipmap/ic_launcher_round"
		android:supportsRtl="true"
		android:theme="@style/Theme.Kotatsu"
		tools:ignore="UnusedAttribute">

		<activity
			android:name="org.koitharu.kotatsu.main.ui.MainActivity"
			android:exported="true">
			<intent-filter>
				<action android:name="android.intent.action.MAIN" />
				<category android:name="android.intent.category.LAUNCHER" />
			</intent-filter>
			<meta-data
				android:name="android.app.default_searchable"
				android:value="org.koitharu.kotatsu.ui.search.SearchActivity" />
		</activity>
		<activity
			android:name="org.koitharu.kotatsu.details.ui.DetailsActivity"
			android:exported="true">
			<intent-filter>
				<action android:name="${applicationId}.action.VIEW_MANGA" />
			</intent-filter>
		</activity>
		<activity
			android:name="org.koitharu.kotatsu.reader.ui.ReaderActivity"
			android:exported="true">
			<intent-filter>
				<action android:name="${applicationId}.action.READ_MANGA" />
			</intent-filter>
		</activity>
		<activity
			android:name="org.koitharu.kotatsu.search.ui.SearchActivity"
			android:label="@string/search" />
		<activity
			android:name="org.koitharu.kotatsu.search.ui.MangaListActivity"
			android:label="@string/search_manga" />
		<activity
			android:name="org.koitharu.kotatsu.history.ui.HistoryActivity"
			android:label="@string/history" />
		<activity
			android:name="org.koitharu.kotatsu.tracker.ui.updates.UpdatesActivity"
			android:label="@string/updates" />
		<activity
			android:name="org.koitharu.kotatsu.favourites.ui.FavouritesActivity"
			android:label="@string/favourites" />
		<activity
			android:name="org.koitharu.kotatsu.bookmarks.ui.BookmarksActivity"
			android:label="@string/bookmarks" />
		<activity
			android:name="org.koitharu.kotatsu.suggestions.ui.SuggestionsActivity"
			android:label="@string/suggestions" />
		<activity
			android:name="org.koitharu.kotatsu.settings.SettingsActivity"
			android:exported="true"
			android:label="@string/settings" />
		<activity
			android:name="org.koitharu.kotatsu.browser.BrowserActivity"
			android:configChanges="orientation|screenSize|screenLayout|keyboardHidden"
			android:windowSoftInputMode="adjustResize" />
		<activity
			android:name="org.koitharu.kotatsu.settings.sources.auth.SourceAuthActivity"
			android:configChanges="orientation|screenSize|screenLayout|keyboardHidden"
			android:windowSoftInputMode="adjustResize" />
		<activity
			android:name="org.koitharu.kotatsu.favourites.ui.categories.FavouriteCategoriesActivity"
			android:label="@string/favourites"
			android:windowSoftInputMode="stateAlwaysHidden" />
		<activity
			android:name="org.koitharu.kotatsu.widget.shelf.ShelfConfigActivity"
			android:exported="true"
			android:label="@string/manga_shelf">
			<intent-filter>
				<action android:name="android.appwidget.action.APPWIDGET_CONFIGURE" />
			</intent-filter>
		</activity>
		<activity
			android:name="org.koitharu.kotatsu.search.ui.multi.MultiSearchActivity"
			android:label="@string/search" />
		<activity
			android:name="org.koitharu.kotatsu.main.ui.protect.ProtectActivity"
			android:noHistory="true"
			android:windowSoftInputMode="adjustResize" />
		<activity
			android:name="org.koitharu.kotatsu.settings.protect.ProtectSetupActivity"
			android:windowSoftInputMode="adjustResize" />
		<activity
			android:name="org.koitharu.kotatsu.download.ui.DownloadsActivity"
			android:label="@string/downloads"
			android:launchMode="singleTop" />
		<activity android:name="org.koitharu.kotatsu.image.ui.ImageActivity" />
		<activity android:name="org.koitharu.kotatsu.favourites.ui.categories.edit.FavouritesCategoryEditActivity" />
		<activity
			android:name="org.koitharu.kotatsu.sync.ui.SyncAuthActivity"
			android:label="@string/sync" />
		<activity
			android:name="org.koitharu.kotatsu.reader.ui.colorfilter.ColorFilterConfigActivity"
			android:label="@string/color_correction" />
		<activity
			android:name="org.koitharu.kotatsu.shelf.ui.config.ShelfSettingsActivity"
			android:label="@string/settings" />
		<activity
			android:name="org.koitharu.kotatsu.scrobbling.common.ui.config.ScrobblerConfigActivity"
			android:exported="true"
			android:label="@string/settings"
			android:launchMode="singleTop">

			<intent-filter>
				<action android:name="android.intent.action.VIEW" />

				<category android:name="android.intent.category.DEFAULT" />
				<category android:name="android.intent.category.BROWSABLE" />

				<data android:scheme="kotatsu" />
			</intent-filter>

		</activity>

		<service
			android:name="org.koitharu.kotatsu.download.ui.service.DownloadService"
			android:foregroundServiceType="dataSync"
			android:stopWithTask="false" />
		<service android:name="org.koitharu.kotatsu.local.ui.LocalChaptersRemoveService" />
		<service android:name="org.koitharu.kotatsu.local.ui.ImportService" />
		<service
			android:name="org.koitharu.kotatsu.widget.shelf.ShelfWidgetService"
			android:permission="android.permission.BIND_REMOTEVIEWS" />
		<service
			android:name="org.koitharu.kotatsu.widget.recent.RecentWidgetService"
			android:permission="android.permission.BIND_REMOTEVIEWS" />
		<service
			android:name="org.koitharu.kotatsu.sync.ui.SyncAuthenticatorService"
			android:exported="true"
			tools:ignore="ExportedService">
			<intent-filter>
				<action android:name="android.accounts.AccountAuthenticator" />
			</intent-filter>
			<meta-data
				android:name="android.accounts.AccountAuthenticator"
				android:resource="@xml/authenticator_sync" />
		</service>
		<service
			android:name="org.koitharu.kotatsu.sync.ui.favourites.FavouritesSyncService"
			android:exported="false"
			android:label="@string/favourites"
			android:process=":sync">
			<intent-filter>
				<action android:name="android.content.SyncAdapter" />
			</intent-filter>
			<meta-data
				android:name="android.content.SyncAdapter"
				android:resource="@xml/sync_favourites" />
		</service>
		<service
			android:name="org.koitharu.kotatsu.sync.ui.history.HistorySyncService"
			android:exported="false"
			android:label="@string/history"
			android:process=":sync">
			<intent-filter>
				<action android:name="android.content.SyncAdapter" />
			</intent-filter>
			<meta-data
				android:name="android.content.SyncAdapter"
				android:resource="@xml/sync_history" />
		</service>
		<service
			android:name="org.koitharu.kotatsu.details.service.MangaPrefetchService"
			android:exported="false" />

		<provider
			android:name="org.koitharu.kotatsu.search.ui.MangaSuggestionsProvider"
			android:authorities="${applicationId}.MangaSuggestionsProvider"
			android:exported="false" />
		<provider
			android:name="androidx.core.content.FileProvider"
			android:authorities="${applicationId}.files"
			android:exported="false"
			android:grantUriPermissions="true">
			<meta-data
				android:name="android.support.FILE_PROVIDER_PATHS"
				android:resource="@xml/filepaths" />
		</provider>
		<provider
			android:name="org.koitharu.kotatsu.sync.ui.favourites.FavouritesSyncProvider"
			android:authorities="org.koitharu.kotatsu.favourites"
			android:exported="false"
			android:label="@string/favourites"
			android:syncable="true" />
		<provider
			android:name="org.koitharu.kotatsu.sync.ui.history.HistorySyncProvider"
			android:authorities="org.koitharu.kotatsu.history"
			android:exported="false"
			android:label="@string/history"
			android:syncable="true" />
		<provider
			android:name="androidx.startup.InitializationProvider"
			android:authorities="${applicationId}.androidx-startup"
			tools:node="remove" />

		<receiver
			android:name="org.koitharu.kotatsu.widget.shelf.ShelfWidgetProvider"
			android:exported="true"
			android:label="@string/manga_shelf">
			<intent-filter>
				<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
			</intent-filter>
			<meta-data
				android:name="android.appwidget.provider"
				android:resource="@xml/widget_shelf" />
		</receiver>
		<receiver
			android:name="org.koitharu.kotatsu.widget.recent.RecentWidgetProvider"
			android:exported="true"
			android:label="@string/recent_manga">
			<intent-filter>
				<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
			</intent-filter>
			<meta-data
				android:name="android.appwidget.provider"
				android:resource="@xml/widget_recent" />
		</receiver>

		<meta-data
			android:name="android.webkit.WebView.EnableSafeBrowsing"
			android:value="false" />
		<meta-data
			android:name="android.webkit.WebView.MetricsOptOut"
			android:value="true" />
		<meta-data
			android:name="com.samsung.android.icon_container.has_icon_container"
			android:value="@bool/com_samsung_android_icon_container_has_icon_container" />

	</application>

</manifest>
