<?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.WRITE_EXTERNAL_STORAGE" />
	<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />

	<application
		android:name="org.koitharu.kotatsu.KotatsuApp"
		android:allowBackup="true"
		android:fullBackupContent="@xml/backup_descriptor"
		android:icon="@mipmap/ic_launcher"
		android:label="@string/app_name"
		android:roundIcon="@mipmap/ic_launcher_round"
		android:supportsRtl="true"
		android:theme="@style/Theme.Kotatsu"
		android:networkSecurityConfig="@xml/network_security_config"
		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.settings.SettingsActivity"
			android:label="@string/settings" />
		<activity
			android:name="org.koitharu.kotatsu.reader.ui.SimpleSettingsActivity"
			android:exported="true"
			android:label="@string/settings">
			<intent-filter>
				<action android:name="android.intent.action.MANAGE_NETWORK_USAGE" />
				<category android:name="android.intent.category.DEFAULT" />
			</intent-filter>
		</activity>
		<activity
			android:name="org.koitharu.kotatsu.browser.BrowserActivity"
			android:windowSoftInputMode="adjustResize" />
		<activity
			android:name="org.koitharu.kotatsu.settings.sources.auth.SourceAuthActivity"
			android:windowSoftInputMode="adjustResize" />
		<activity
			android:name="org.koitharu.kotatsu.core.ui.CrashActivity"
			android:label="@string/error_occurred"
			android:theme="@android:style/Theme.DeviceDefault"
			android:windowSoftInputMode="stateAlwaysHidden" />
		<activity
			android:name="org.koitharu.kotatsu.favourites.ui.categories.CategoriesActivity"
			android:label="@string/favourites_categories"
			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.global.GlobalSearchActivity"
			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" />
		<activity android:name="org.koitharu.kotatsu.image.ui.ImageActivity"/>

		<service
			android:name="org.koitharu.kotatsu.download.ui.service.DownloadService"
			android:foregroundServiceType="dataSync" />
		<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" />

		<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>

		<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" />

	</application>

</manifest>