<?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:name="android.hardware.camera"
        android:required="false" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <!--    网络-->
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <!--    存储权限-->
    <uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

    <!--    人脸识别-->
    <uses-permission
        android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS"
        tools:ignore="ProtectedPermissions" />
    <uses-permission
        android:name="android.permission.READ_PRIVILEGED_PHONE_STATE"
        tools:ignore="ProtectedPermissions" />
    <uses-permission
        android:name="android.permission.QUERY_ALL_PACKAGES"
        tools:ignore="QueryAllPackagesPermission" />
    <uses-permission android:name="android.permission.CAMERA" />
    <uses-permission android:name="android.hardware.camera.autofocus" />

    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
    <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
    <uses-permission android:name="android.permission.KILL_BACKGROUND_PROCESSES" />

    <uses-permission
        android:name="android.permission.READ_PRIVILEGED_PHONE_STATE"
        tools:ignore="ProtectedPermissions" />
    <uses-permission
        android:name="android.permission.READ_PRECISE_PHONE_STATE"
        tools:ignore="ProtectedPermissions" />
    <uses-permission
        android:name="android.permission.SHUTDOWN"
        tools:ignore="ProtectedPermissions" />
    <uses-permission
        android:name="android.permission.REBOOT"
        tools:ignore="ProtectedPermissions" />
    <uses-permission
        android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS"
        tools:ignore="ProtectedPermissions" />

    <application
        android:name=".MyApp"
        android:allowBackup="false"
        android:icon="@mipmap/logo_blue"
        android:label="@string/app_name"
        android:requestLegacyExternalStorage="true"
        android:roundIcon="@mipmap/logo_blue"
        android:supportsRtl="true"
        android:theme="@style/AppTheme"
        android:usesCleartextTraffic="true">
        <activity
            android:name=".ui.activity.SplashActivity"
            android:exported="true"
            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=".ui.activity.MainActivity"
            android:launchMode="singleTop" >
        </activity>
        <activity android:name=".ui.activity.InfoActivity" />
        <activity
            android:name=".ui.activity.SetActivity"
            android:exported="true" ></activity>
        <activity
            android:name=".ui.activity.DebugActivity"
            android:exported="true" />

        <activity
            android:name=".ui.activity.ComposeActivity"
            android:exported="true" />

        <service
            android:name=".service.MQTTService"
            android:enabled="true"
            android:exported="true" />
        <service
            android:name="org.eclipse.paho.android.service.MqttService"
            android:enabled="true" />

        <receiver
            android:name=".receiver.BootReceiver"
            android:enabled="true"
            android:exported="true">
            <intent-filter>
                <action android:name="android.intent.action.BOOT_COMPLETED" />

                <category android:name="android.intent.category.LAUNCHER" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </receiver>
        <receiver android:name=".receiver.FrpStartReceiver">
            <intent-filter>
                <action android:name="receiver_start_frp" />
                <action android:name="receiver_frp_version" />
                <action android:name="receiver_frp_info" />
            </intent-filter>
        </receiver>
        <receiver
            android:name=".receiver.UvTaskReceiver"
            android:exported="true">
            <intent-filter>
                <action android:name="OPEN_LIGHT" />
                <action android:name="CLOSE_LIGHT" />
            </intent-filter>
        </receiver>
        <receiver
            android:name=".receiver.TimerReceiver"
            android:exported="true">
            <intent-filter>
                <action android:name="DAILY_TIMER" />
            </intent-filter>
        </receiver>
        <receiver
            android:name=".receiver.ThemeReceiver"
            android:exported="true">
            <intent-filter>
                <action android:name="THEME_LIGHT" />
                <action android:name="THEME_NIGHT" />
            </intent-filter>
        </receiver>
        <provider
            android:name="androidx.core.content.FileProvider"
            android:authorities="com.example.iot_controlhost.fileprovider"
            android:exported="false"
            android:grantUriPermissions="true">
            <meta-data
                android:name="android.support.FILE_PROVIDER_PATHS"
                android:resource="@xml/provider_paths" />
        </provider>
        <!--        屏幕适配-->
        <meta-data
            android:name="design_width_in_dp"
            android:value="1280" />
        <meta-data
            android:name="design_height_in_dp"
            android:value="800" />
        <!--        兼容Android 7存储权限问题-->
        <meta-data
            android:name="ScopedStorage"
            android:value="true" />
        <meta-data
            android:name="android.app.use_legacy_external_storage"
            android:value="true" />
    </application>

</manifest>