<?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="cc.winboll.studio.powerbell">

    <!-- 运行前台服务 -->
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>

    <!-- 开机启动 -->
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>

    <!-- 显示通知 -->
    <uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>

    <!-- PACKAGE_USAGE_STATS -->
    <uses-permission android:name="android.permission.PACKAGE_USAGE_STATS"/>

    <!-- BATTERY_STATS -->
    <uses-permission android:name="android.permission.BATTERY_STATS"/>

    <uses-feature android:name="android.hardware.camera"/>

    <uses-feature android:name="android.hardware.camera.autofocus"/>

    <uses-permission android:name="android.permission.GET_PACKAGE_SIZE"/>

    <uses-permission
        android:name="android.permission.QUERY_ALL_PACKAGES"
        tools:ignore="QueryAllPackagesPermission"/>

    <uses-permission
        android:name="android.permission.ACCESS_PACKAGE_USAGE_STATS"
        tools:ignore="ProtectedPermissions"/>

    <application
        android:name=".App"
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme_Default"
        android:persistent="true"
        android:resizeableActivity="true"
        android:requestLegacyExternalStorage="true"
        android:usesCleartextTraffic="true"
        tools:ignore="GoogleAppIndexingWarning">

        <activity
            android:name=".MainActivity"
            android:label="@string/app_name"
            android:exported="true"
            android:launchMode="singleTask">

        </activity>

        <activity android:name=".activities.CrashActivity"/>

        <activity-alias
            android:name=".MainActivityEN1"
            android:targetActivity=".MainActivity"
            android:exported="true"
            android:label="@string/app_name"
            android:icon="@drawable/ic_launcher"
            android:enabled="true">

            <intent-filter>

                <action android:name="android.intent.action.MAIN"/>

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

            </intent-filter>

            <meta-data
                android:name="android.app.shortcuts"
                android:resource="@xml/shortcutsmainen1"/>

        </activity-alias>

        <activity-alias
            android:name=".MainActivityCN1"
            android:targetActivity=".MainActivity"
            android:exported="true"
            android:label="@string/app_name_cn1"
            android:icon="@drawable/ic_launcher"
            android:enabled="false">

            <intent-filter>

                <action android:name="android.intent.action.MAIN"/>

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

            </intent-filter>

            <meta-data
                android:name="android.app.shortcuts"
                android:resource="@xml/shortcutsmaincn1"/>

        </activity-alias>

        <activity-alias
            android:name=".MainActivityCN2"
            android:targetActivity=".MainActivity"
            android:exported="true"
            android:label="@string/app_name_cn2"
            android:icon="@drawable/ic_launcher"
            android:enabled="false">

            <intent-filter>

                <action android:name="android.intent.action.MAIN"/>

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

            </intent-filter>

            <meta-data
                android:name="android.app.shortcuts"
                android:resource="@xml/shortcutsmaincn2"/>

        </activity-alias>

        <activity
            android:name=".activities.ClearRecordActivity"
            android:parentActivityName="cc.winboll.studio.powerbell.MainActivity"
            android:launchMode="singleTask">

        </activity>

        <activity
            android:name=".activities.BackgroundSettingsActivity"
            android:parentActivityName="cc.winboll.studio.powerbell.MainActivity"
            android:exported="true"
            android:launchMode="singleTask">

            <intent-filter>

                <action android:name="android.intent.action.SEND"/>

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

                <data android:mimeType="image/jpeg"/>

                <data android:mimeType="image/jpg"/>

                <data android:mimeType="image/png"/>

                <data android:mimeType="image/webp"/>

                <data android:mimeType="image/*"/>

            </intent-filter>

        </activity>

        <receiver
            android:name=".receivers.MainReceiver"
            android:enabled="true"
            android:exported="false"
            android:directBootAware="true">

            <intent-filter>

                <action android:name="android.intent.action.BOOT_COMPLETED"/>

            </intent-filter>

        </receiver>

        <service
            android:name=".services.ControlCenterService"
            android:priority="1000"
            android:enabled="true"
            android:exported="false"
            android:process=".controlcenterservice"/>

        <service
            android:name=".services.AssistantService"
            android:enabled="true"
            android:exported="false"
            android:process=".assistantservice"/>

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

        <activity android:name=".activities.BatteryReporterActivity"/>

        <activity android:name=".activities.PixelPickerActivity"/>

        <activity android:name=".activities.BatteryReportActivity"/>

        <activity android:name=".unittest.MainUnitTestActivity"/>

        <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_provider"/>

        </provider>

        <activity android:name=".activities.ShortcutActionActivity"/>

        <activity android:name=".activities.SettingsActivity"/>

        <activity
            android:name="com.yalantis.ucrop.UCropActivity"
            android:theme="@style/Theme.AppCompat.Light.NoActionBar"
            android:exported="true">

        </activity>

    </application>

</manifest>