<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="de.marmaro.krt.ffupdater"
    android:installLocation="auto">
    <!-- Touchscreen is enabled by default but not always needed -->
    <uses-feature
        android:name="android.hardware.touchscreen"
        android:required="false" />

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />

    <!-- DownloadManager is a different process and need this permission https://stackoverflow.com/a/30487568 -->
    <!-- Only necessary for older devices https://notabug.org/Tobiwan/ffupdater/issues/45 -->
    <uses-permission
        android:name="android.permission.WRITE_EXTERNAL_STORAGE"
        tools:ignore="ScopedStorage" />

    <!-- If FFUpdater wants to check if an app is installed, this app must be listed here -->
    <!-- https://developer.android.com/about/versions/11/privacy/package-visibility -->
    <queries>
        <package android:name="org.mozilla.firefox" />
        <package android:name="org.mozilla.firefox_beta" />
        <package android:name="org.mozilla.fenix" />
        <package android:name="org.mozilla.focus" />
        <package android:name="org.mozilla.klar" />
        <package android:name="org.mozilla.rocket" />
        <package android:name="mozilla.lockbox" />
        <package android:name="com.brave.browser" />
        <package android:name="io.github.forkmaintainers.iceraven" />
    </queries>

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:supportsRtl="true"
        tools:ignore="AllowBackup,GoogleAppIndexingWarning">
        <activity
            android:name=".SettingsActivity"
            android:label="@string/settings_activity_label"
            android:theme="@style/Theme.AppCompat.DayNight.DarkActionBar" />
        <activity
            android:name=".InstallActivity"
            android:label="@string/install_activity_label"
            android:launchMode="singleTop"
            android:theme="@style/Theme.AppCompat.DayNight.DarkActionBar" />
        <activity
            android:name=".MainActivity"
            android:label="@string/app_name"
            android:theme="@style/MainActivityTheme">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

        <receiver
            android:name=".notification.Autostart"
            android:enabled="true">
            <intent-filter>
                <action android:name="android.intent.action.BOOT_COMPLETED" />
            </intent-filter>
        </receiver>
    </application>

</manifest>