<?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-feature android:glEsVersion="0x00020000" />
    <uses-feature
        android:name="android.hardware.type.pc"
        android:required="false" />

    <uses-permission
        android:name="android.permission.WRITE_EXTERNAL_STORAGE"
        android:maxSdkVersion="28" />
    <uses-permission
        android:name="android.permission.READ_EXTERNAL_STORAGE"
        android:maxSdkVersion="28" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.RECORD_AUDIO" />
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />

    <queries>
        <package android:name="net.kdt.pojavlaunch.ffmpeg" />
    </queries>

    <application
        android:name=".PojavApplication"
        android:allowBackup="true"
        android:allowNativeHeapPointerTagging="false"
        android:appCategory="game"
        android:hasFragileUserData="true"
        android:icon="@mipmap/ic_launcher"
        android:isGame="true"
        android:label="@string/app_name"
        android:process=":launcher"
        android:resizeableActivity="true"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:theme="@style/AppTheme">
        <activity
            android:name=".DummyLauncher"
            android:exported="true"
            android:screenOrientation="landscape"
            >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name=".MissingStorageActivity"
            android:exported="false" />

        <meta-data
            android:name="android.max_aspect"
            android:value="ratio_float" />

        <activity
            android:name=".TestStorageActivity"
            android:exported="true"
            android:label="@string/app_short_name"
            android:launchMode="singleTop">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name=".LauncherActivity"
            android:label="@string/app_short_name" />
        <activity
            android:name=".ImportControlActivity"
            android:configChanges="keyboard|keyboardHidden"
            android:exported="true"
            android:launchMode="singleInstance"
            android:windowSoftInputMode="stateVisible">
            <intent-filter
                android:label="@string/import_control_label"
                android:scheme="content"
                tools:ignore="AppLinkUrlError">
                <action android:name="android.intent.action.VIEW" />
                <action android:name="android.intent.action.SEND" />

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

                <data android:mimeType="application/json" />
                <data android:mimeType="text/json" />
                <data android:mimeType="text/plain" />
            </intent-filter>
        </activity>
        <activity
            android:name=".FatalErrorActivity"
            android:configChanges="keyboardHidden|orientation|screenSize|keyboard|navigation"
            android:theme="@style/Theme.AppCompat.DayNight.Dialog" />
        <activity
            android:name=".ExitActivity"
            android:configChanges="keyboardHidden|orientation|screenSize|keyboard|navigation"
            android:theme="@style/Theme.AppCompat.DayNight.Dialog" />
        <activity
            android:name=".JavaGUILauncherActivity"
            android:configChanges="keyboardHidden|orientation|screenSize|smallestScreenSize|screenLayout|keyboard|navigation|uiMode"
            android:screenOrientation="sensorLandscape" />
        <activity
            android:name=".CustomControlsActivity"
            android:configChanges="keyboardHidden|orientation|screenSize|keyboard|navigation"
            android:exported="false"
            android:screenOrientation="sensorLandscape">
            <intent-filter>
                <action android:name=".CustomControlsActivity" />

                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>
        <activity
            android:name=".MainActivity"
            android:configChanges="keyboardHidden|orientation|screenSize|smallestScreenSize|screenLayout|keyboard|navigation|uiMode"
            android:launchMode="standard"
            android:process=":game"
            android:screenOrientation="sensorLandscape" />

        <provider
            android:name=".scoped.FolderProvider"
            android:authorities="@string/storageProviderAuthorities"
            android:exported="true"
            android:grantUriPermissions="true"
            android:permission="android.permission.MANAGE_DOCUMENTS">
            <intent-filter>
                <action android:name="android.content.action.DOCUMENTS_PROVIDER" />
            </intent-filter>
        </provider>

        <service android:name=".services.ProgressService" />
        <service
            android:name=".services.GameService"
            android:process=":game" />
    </application>

</manifest>