<?xml version="1.0" encoding="utf-8"?>
<manifest package="com.topjohnwu.magisk"
          xmlns:android="http://schemas.android.com/apk/res/android"

          xmlns:tools="http://schemas.android.com/tools">

    <uses-sdk tools:overrideLibrary="com.kcoppock.broadcasttilesupport" />

    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
    <uses-permission
        android:name="android.permission.PACKAGE_USAGE_STATS"
        tools:ignore="ProtectedPermissions" />

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@style/AppTheme"
        tools:ignore="AllowBackup,GoogleAppIndexingWarning">
        <activity
            android:name=".MainActivity"
            android:configChanges="orientation|screenSize"
            android:exported="true"/>

        <activity
            android:name=".SplashActivity"
            android:configChanges="orientation|screenSize"
            android:exported="true"
            android:theme="@style/SplashTheme">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name="com.ipaulpro.afilechooser.FileChooserActivity"
            android:enabled="true"
            android:exported="true"
            android:icon="@drawable/ic_chooser"
            android:label="@string/choose_file">
            <intent-filter>
                <action android:name="android.intent.action.GET_CONTENT" />

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

                <data android:mimeType="*/*" />
            </intent-filter>
        </activity>

        <provider
            android:name="com.ianhanniballake.localstorage.LocalStorageProvider"
            android:authorities="com.topjohnwu.magisk.documents"
            android:enabled="@bool/use_provider"
            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>

        <activity
            android:name=".AboutActivity"
            android:theme="@style/AppTheme.Transparent"/>
        <activity
            android:name=".SettingsActivity"
            android:theme="@style/AppTheme.Transparent" />

        <provider
            android:name="android.support.v4.content.FileProvider"
            android:authorities="com.topjohnwu.magisk.provider"
            android:exported="false"
            android:grantUriPermissions="true">
            <meta-data
                android:name="android.support.FILE_PROVIDER_PATHS"
                android:resource="@xml/file_paths" />
        </provider>

    </application>

</manifest>
