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

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"
        android:maxSdkVersion="32" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"
        android:maxSdkVersion="32" />
    <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
    <uses-permission android:name="android.permission.RECORD_AUDIO" />
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
    <uses-permission android:name="android.permission.POST_NOTIFICATIONS" />

    <supports-screens
        android:anyDensity="true"
        android:largeScreens="true"
        android:normalScreens="true"
        android:smallScreens="true"
        android:xlargeScreens="true" />

    <application
        android:theme="@style/Theme.Main"
        android:resizeableActivity="true"
        >
        <meta-data android:name="com.samsung.android.keepalive.density" android:value="true"/>
        <!-- Activity to create shortcuts -->
        <activity
            android:exported="true"
            android:name=".presentation.ShortcutsActivity"
            android:label="@string/title_create_shortcut"
            android:theme="@style/Theme.Main">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

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

        <!-- It is recommended that you use an activity-alias to provide the "CREATE_SHORTCUT" -->
        <!-- intent-filter.  This gives you a way to set the text (and optionally the -->
        <!-- icon) that will be seen in the launcher's create-shortcut user interface. -->
        <activity-alias
            android:exported="true"
            android:name=".presentation.CreateShortcuts"
            android:label="@string/title_create_shortcut"
            android:targetActivity=".presentation.ShortcutsActivity">

            <!-- This intent-filter allows your shortcuts to be created in the launcher. -->
            <intent-filter>
                <action android:name="android.intent.action.CREATE_SHORTCUT" />

                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity-alias>

        <activity
            android:exported="false"
            android:name=".presentation.BookmarkActivity"
            android:label="@string/title_bookmark_settings"
            android:theme="@style/Theme.Main" />
        <activity
            android:exported="true"
            android:name=".presentation.ApplicationSettingsActivity"
            android:label="@string/title_application_settings"
            android:theme="@style/Theme.Main"
            android:windowSoftInputMode="stateHidden" />
        <activity
            android:exported="true"
            android:name=".presentation.SessionActivity"
            android:theme="@style/Theme.Main"
            android:configChanges="orientation|keyboard|keyboardHidden|screenSize|smallestScreenSize|density|screenLayout|navigation"
            android:windowSoftInputMode="adjustResize"
            android:taskAffinity="com.freerdp.session"
            android:documentLaunchMode="always"
            android:autoRemoveFromRecents="true">
            <!--android:configChanges="orientation|keyboardHidden|screenSize|keyboard"-->
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />

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

                <data
                    android:host="*"
                    android:scheme="freerdp" />
            </intent-filter>
        </activity>
        <activity
            android:exported="true"
            android:name=".presentation.AboutActivity"
            android:label="@string/title_about"
            android:theme="@style/Theme.Main"
            android:configChanges="orientation|keyboardHidden|screenSize" />
        <activity
            android:exported="true"
            android:name=".presentation.HelpActivity"
            android:label="@string/title_help"
            android:theme="@style/Theme.Main"
            android:configChanges="orientation|keyboardHidden|screenSize" />

        <activity
            android:exported="false"
            android:name=".presentation.PrintProxyActivity"
            android:theme="@android:style/Theme.Translucent.NoTitleBar"
            android:excludeFromRecents="true" />

        <provider
            android:name=".utils.ClipboardImageProvider"
            android:authorities="com.freerdp.freerdpcore.clipboard"
            android:exported="false"
            android:grantUriPermissions="true" />

        <service
            android:name=".presentation.KeyboardAccessibilityService"
            android:label="@string/accessibility_keyboard_label"
            android:permission="android.permission.BIND_ACCESSIBILITY_SERVICE"
            android:enabled="true"
            android:exported="false">
            <intent-filter>
                <action android:name="android.accessibilityservice.AccessibilityService" />
            </intent-filter>
            <meta-data
                android:name="android.accessibilityservice"
                android:resource="@xml/keyboard_accessibility_service" />
        </service>

    </application>

</manifest>
