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

    <uses-feature android:name="android.hardware.usb.host" />
    <uses-permission android:name="android.permission.USB_PERMISSION" />
    <!--重启包-->
    <uses-permission android:name="android.permission.RESTART_PACKAGES" />
    <!--接收启动完成-->
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
    <uses-permission android:name="android.permission.BLUETOOTH" />
    <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
    <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />

    <application
        android:name=".ManageApplication"
        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:networkSecurityConfig="@xml/network_security_config"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/MyStyle"
        tools:targetApi="31">
        <meta-data
            android:name="design_width_in_dp"
            android:value="853" />
        <meta-data
            android:name="design_height_in_dp"
            android:value="667" /> <!-- 全局内容提供者 -->
        <activity
            android:name=".ui.MainActivity"
            android:exported="true"
            android:launchMode="singleTask"
            android:screenOrientation="landscape">
            <intent-filter>
                <category android:name="android.intent.category.HOME" />
                <category android:name="android.intent.category.DEFAULT" />

                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name="com.xhly.manageapp.ui.ManageActivity"
            android:screenOrientation="landscape" />
        <activity
            android:name=".ui.login.activity.LoginActivity"
            android:launchMode="singleTask"
            android:screenOrientation="landscape"
            android:windowSoftInputMode="adjustResize" />

        <receiver
            android:name=".broadcastreceiver.XhlyBroadCastReceiver"
            android:enabled="true"
            android:exported="true">
            <intent-filter>
                <!-- <action android:name="com.linspirer.edu.loginapkfinish" /-->
                <action android:name="test" />
            </intent-filter>
        </receiver>
        <receiver
            android:name=".broadcastreceiver.USBReceiver"
            android:enabled="true"
            android:exported="true">
            <intent-filter android:priority="1000">
                <action android:name="android.hardware.usb.action.USB_STATE" />
            </intent-filter>
        </receiver>
        <receiver
            android:name=".broadcastreceiver.BLEStateReceiver"
            android:enabled="true"
            android:exported="true">
            <intent-filter android:priority="1000">
                <action android:name="android.bluetooth.adapter.action.STATE_CHANGED" />
                <action android:name="android.bluetooth.BluetoothAdapter.STATE_OFF" />
                <action android:name="android.bluetooth.BluetoothAdapter.STATE_ON" />
            </intent-filter>
        </receiver>
        <receiver
            android:name="com.xhly.manageapp.broadcastreceiver.SimStateReceive"
            android:enabled="true"
            android:exported="true">
            <intent-filter android:priority="1000">
                <action android:name="android.intent.action.SIM_STATE_CHANGED" />
            </intent-filter>
        </receiver>
        <receiver
            android:name="com.xhly.manageapp.broadcastreceiver.SDReceiver"
            android:enabled="true"
            android:exported="true">
            <intent-filter android:priority="1000">
                <action android:name="android.intent.action.MEDIA_CHECKING" />
                <action android:name="android.intent.action.MEDIA_MOUNTED" />
                <action android:name="android.intent.action.MEDIA_EJECT" />
                <action android:name="android.intent.action.MEDIA_UNMOUNTED" />
            </intent-filter>
        </receiver>
        <!--     &lt;!&ndash;覆盖安装清理数据广播——————————————————————————————————————————————————————————&ndash;&gt;
             <receiver
                 android:name=".broadcastreceiver.AppInstallReceiver"
                 android:enabled="true"
                 android:exported="true">
                 <intent-filter android:priority="1000">
                     &lt;!&ndash; 一个新应用包已经安装在设备上，数据包括包名（监听所在的app，新安装时，不能接收到这个广播） &ndash;&gt;
                     <action android:name="android.intent.action.PACKAGE_ADDED" />
                     &lt;!&ndash; 一个新版本的应用安装到设备，替换之前已经存在的版本  替换时会先收到卸载的再收到替换的， 替换自身也能收到&ndash;&gt;
                     <action android:name="android.intent.action.PACKAGE_REPLACED" />
                     &lt;!&ndash; 一个已存在的应用程序包已经从设备上移除，包括包名（卸载监听所在的app，则无法接收到） &ndash;&gt;
                     <action android:name="android.intent.action.PACKAGE_REMOVED" />
                     <data android:scheme="package" />
                 </intent-filter>
             </receiver>-->

        <service
            android:name=".service.ManageAccessibilityService"
            android:exported="true"
            android:permission="android.permission.BIND_ACCESSIBILITY_SERVICE">
            <intent-filter>
                <action android:name="android.accessibilityservice.AccessibilityService" />
            </intent-filter>
            <meta-data
                android:name="android.accessibilityservice"
                android:resource="@xml/accessibility_service_config" />
        </service>
        <service
            android:name="com.xhly.manageapp.service.websocket.AppSocketService"
            android:foregroundServiceType="dataSync" />

        <provider
            android:name="androidx.core.content.FileProvider"
            android:authorities="com.xhly.manageapp.fileprovider"
            android:exported="false"
            android:grantUriPermissions="true">
            <!-- 元数据 -->
            <meta-data
                android:name="android.support.FILE_PROVIDER_PATHS"
                android:resource="@xml/file_paths" />
        </provider>
    </application>

</manifest>