<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:tools="http://schemas.android.com/tools" xmlns:android="http://schemas.android.com/apk/res/android">
    <uses-feature android:name="android.hardware.camera" android:required="false"/>

    <uses-permission android:name="android.permission.EXPAND_STATUS_BAR" />
    <uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE_DATA_SYNC" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <uses-permission android:name="android.permission.CAMERA"/>
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" tools:ignore="ScopedStorage"/>
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" tools:ignore="ScopedStorage"/>
    <uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" tools:ignore="ScopedStorage"/>

    <application
        android:hardwareAccelerated="true"
        android:largeHeap="true"
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="Grim"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:theme="@style/Theme.Main"
        android:enableOnBackInvokedCallback="false"
        android:extractNativeLibs="true"
        tools:ignore="UnusedAttribute">

        <receiver android:name=".NotificationActionsReceiver"/>

        <provider
            android:name=".FileProvider"
            android:authorities="mw.gri.android.fileprovider"
            android:exported="false"
            android:grantUriPermissions="true">
            <meta-data
                android:name="android.support.FILE_PROVIDER_PATHS"
                android:resource="@xml/paths" />
        </provider>

        <activity
            android:launchMode="singleTask"
            android:name=".MainActivity"
            android:configChanges="orientation|screenSize"
            android:exported="true">

            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>

            <intent-filter android:scheme="http" tools:ignore="AppLinkUrlError">
                <action android:name="android.intent.action.SEND" />
                <action android:name="android.intent.action.VIEW" />

                <category android:name="android.intent.category.DEFAULT" />
                <data android:mimeType="text/*" />
                <data android:mimeType="application/*" />
                <data android:pathPattern=".*\\.slatepack" />
            </intent-filter>

            <meta-data android:name="android.app.lib_name" android:value="grim" />
        </activity>

        <service
            android:name=".BackgroundService"
            android:stopWithTask="true"
            android:foregroundServiceType="dataSync" />
    </application>

</manifest>