<?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.REQUEST_DELETE_PACKAGES" />
    <uses-permission
        android:name="android.permission.QUERY_ALL_PACKAGES"
        tools:ignore="QueryAllPackagesPermission" />
    <uses-permission android:name="android.permission.ACCESS_HIDDEN_PROFILES" />
    <uses-permission android:name="android.permission.EXPAND_STATUS_BAR" />
    <uses-permission android:name="android.permission.POST_NOTIFICATIONS" />

    <application
        android:name=".Application"
        android:allowBackup="true"
        android:enableOnBackInvokedCallback="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/launcherBaseTheme"
        tools:ignore="UnusedAttribute">

        <activity
            android:name=".ui.widgets.manage.ManageWidgetPanelsActivity"
            android:exported="false" />
        <activity
            android:name=".ui.widgets.WidgetPanelActivity"
            android:exported="false" />
        <activity
            android:name=".ui.widgets.manage.ManageWidgetsActivity"
            android:configChanges="orientation|screenSize"
            android:exported="false"
            android:theme="@style/launcherHomeTheme" />
        <activity
            android:name=".ui.widgets.manage.SelectWidgetActivity"
            android:exported="false" />
        <activity
            android:name=".ui.PinShortcutActivity"
            android:autoRemoveFromRecents="true"
            android:excludeFromRecents="true"
            android:exported="false">
            <intent-filter>
                <action android:name="android.content.pm.action.CONFIRM_PIN_SHORTCUT" />
                <action android:name="android.content.pm.action.CONFIRM_PIN_APPWIDGET" />
            </intent-filter>
        </activity>
        <activity
            android:name=".ui.HomeActivity"
            android:clearTaskOnLaunch="true"
            android:configChanges="orientation|screenSize"
            android:excludeFromRecents="true"
            android:exported="true"
            android:launchMode="singleTask"
            android:theme="@style/launcherHomeTheme">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.HOME" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name=".ui.tutorial.TutorialActivity"
            android:configChanges="orientation|screenSize" />
        <activity
            android:name=".ui.list.ListActivity"
            android:configChanges="orientation|screenSize"
            android:windowSoftInputMode="adjustResize" />
        <activity
            android:name=".ui.settings.SettingsActivity"
            android:configChanges="orientation|screenSize"
            android:exported="true"
            android:windowSoftInputMode="adjustNothing">
            <intent-filter>
                <action android:name="android.intent.action.APPLICATION_PREFERENCES" />

                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>
        <activity
            android:name=".ui.LegalInfoActivity"
            android:exported="false" />
        <activity
            android:name=".ui.ReportCrashActivity"
            android:exported="false" />

        <receiver
            android:name=".actions.lock.LauncherDeviceAdmin"
            android:description="@string/device_admin_description"
            android:exported="true"
            android:label="@string/app_name"
            android:permission="android.permission.BIND_DEVICE_ADMIN">
            <meta-data
                android:name="android.app.device_admin"
                android:resource="@xml/device_admin_config" />

            <intent-filter>
                <action android:name="android.app.action.DEVICE_ADMIN_ENABLED" />
            </intent-filter>
        </receiver>

        <service
            android:name=".actions.lock.LauncherAccessibilityService"
            android:exported="true"
            android:label="@string/app_name"
            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>
    </application>
</manifest>