<?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="im.vector.riotx">

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

    <application
        android:name=".VectorApplication"
        android:allowBackup="false"
        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/AppTheme.Light"
        tools:replace="android:allowBackup">

        <activity
            android:name=".features.MainActivity"
            android:theme="@style/AppTheme.Launcher" />

        <!-- Activity alias for the launcher Activity (must be declared after the Activity it targets) -->
        <activity-alias
            android:name=".features.Alias"
            android:targetActivity=".features.MainActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

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

        <activity android:name=".features.home.HomeActivity" />
        <activity android:name=".features.login.LoginActivity" />
        <activity android:name=".features.media.ImageMediaViewerActivity" />
        <activity
            android:name=".features.rageshake.BugReportActivity"
            android:label="@string/title_activity_bug_report" />
        <activity
            android:name=".features.settings.VectorSettingsActivity"
            android:label="@string/title_activity_settings"
            android:windowSoftInputMode="adjustResize" />
        <activity android:name=".features.media.VideoMediaViewerActivity" />
        <activity
            android:name=".features.crypto.verification.SASVerificationActivity"
            android:label="@string/title_activity_verify_device" />
        <activity
            android:name=".features.crypto.keysbackup.restore.KeysBackupRestoreActivity"
            android:label="@string/title_activity_keys_backup_setup" />
        <activity
            android:name=".features.crypto.keysbackup.setup.KeysBackupSetupActivity"
            android:label="@string/title_activity_keys_backup_restore" />
        <activity
            android:name=".features.crypto.keysbackup.settings.KeysBackupManageActivity"
            android:label="@string/encryption_message_recovery" />

        <activity
            android:name=".features.reactions.EmojiReactionPickerActivity"
            android:label="@string/title_activity_emoji_reaction_picker" />
        <activity android:name=".features.roomdirectory.createroom.CreateRoomActivity" />
        <activity android:name=".features.roomdirectory.RoomDirectoryActivity" />
        <activity android:name=".features.roomdirectory.roompreview.RoomPreviewActivity" />
        <activity android:name=".features.home.room.filtered.FilteredRoomsActivity" />
        <activity android:name=".features.home.room.detail.RoomDetailActivity" />
        <activity android:name=".features.debug.DebugMenuActivity" />
        <activity android:name=".features.home.createdirect.CreateDirectRoomActivity" />
        <activity android:name=".features.webview.VectorWebViewActivity" />
        <activity android:name=".features.link.LinkHandlerActivity">
            <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:scheme="https" />
                <data android:host="riot.im" />
                <data android:pathPrefix="/config/" />
            </intent-filter>
        </activity>

        <!-- Services -->

        <service
            android:name=".core.services.CallService"
            android:exported="false" />

        <!-- Receivers -->

        <!-- Exported false, should only be accessible from this app!! -->
        <receiver
            android:name=".features.notifications.NotificationBroadcastReceiver"
            android:enabled="true"
            android:exported="false" />

        <!-- Providers -->

        <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/riotx_provider_paths" />
        </provider>
    </application>

</manifest>