<?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.REQUEST_INSTALL_PACKAGES" />
    <uses-permission android:name="android.permission.QUERY_ALL_PACKAGES"
            tools:ignore="QueryAllPackagesPermission" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>


    <application
        android:allowBackup="true"
        android:dataExtractionRules="@xml/data_extraction_rules"
        android:fullBackupContent="@xml/backup_rules"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@style/Theme.GakumasLocalify"
        android:usesCleartextTraffic="true"
        tools:targetApi="31">

        <meta-data
            android:name="xposedmodule"
            android:value="true" />
        <meta-data
            android:name="xposeddescription"
            android:value="IDOLM@STER Gakuen localify" />
        <meta-data
            android:name="xposedminversion"
            android:value="53" />
        <meta-data
            android:name="xposedsharedprefs"
            android:value="true" />

        <meta-data
            android:name="xposedscope"
            android:value="com.bandainamcoent.idolmaster_gakuen" />

        <activity
            android:name=".MainActivity"
            android:exported="true"
            android:theme="@style/Theme.GakumasLocalify">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

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

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

                <data android:scheme="content" />
                <data android:mimeType="application/vnd.android.package-archive" />
            </intent-filter>
        </activity>

        <activity
            android:name=".TranslucentActivity"
            android:exported="true"
            android:theme="@style/Theme.GakumasLocalify.NoDisplay">

        </activity>

        <activity
                android:name=".PatchActivity"
                android:exported="true"
                android:theme="@style/Theme.GakumasLocalify">

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

                <data android:scheme="content" />
                <data android:mimeType="application/vnd.android.package-archive" />
            </intent-filter>

        </activity>

        <provider
            android:name="androidx.core.content.FileProvider"
            android:authorities="${applicationId}.fileprovider"
            android:exported="false"
            android:grantUriPermissions="true">
            <meta-data
                android:name="android.support.FILE_PROVIDER_PATHS"
                android:resource="@xml/file_paths" />
        </provider>

        <provider
                android:name="rikka.shizuku.ShizukuProvider"
                android:authorities="${applicationId}.shizuku"
                android:multiprocess="false"
                android:enabled="true"
                android:exported="true"
                android:permission="android.permission.INTERACT_ACROSS_USERS_FULL" />

    </application>

</manifest>