<?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.touchscreen"
        android:required="false" />
    <uses-feature
        android:name="android.hardware.telephony"
        android:required="false" />

    <permission-group
        android:name="org.adaway.permission-group.API"
        android:description="@string/permission_group_api_description"
        android:label="@string/permission_group_api_label" />

    <permission
        android:name="org.adaway.permission.SEND_COMMAND"
        android:description="@string/permission_send_command_description"
        android:label="@string/permission_send_command_label"
        android:permissionGroup="org.adaway.permission-group.API"
        android:protectionLevel="dangerous" />

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

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
    <uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
    <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
    <uses-permission
        android:name="android.permission.QUERY_ALL_PACKAGES"
        tools:ignore="QueryAllPackagesPermission" />

    <application
        android:name=".AdAwayApplication"
        android:allowBackup="true"
        android:backupAgent=".model.backup.AppBackupAgent"
        android:fullBackupOnly="false"
        android:icon="@mipmap/icon"
        android:label="@string/app_name"
        android:networkSecurityConfig="@xml/network_security_config"
        android:supportsRtl="true"
        android:theme="@style/Theme.AdAway"
        tools:ignore="GoogleAppIndexingWarning">
        <activity
            android:name=".ui.home.HomeActivity"
            android:exported="true"
            android:launchMode="singleTop"
            android:theme="@style/Theme.AdAway.NoActionBar">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
            <meta-data
                android:name="android.app.shortcuts"
                android:resource="@xml/shortcuts" />
        </activity>
        <activity
            android:name=".ui.welcome.WelcomeActivity"
            android:exported="false"
            android:label="@string/welcome_title"
            android:parentActivityName=".ui.home.HomeActivity"
            android:theme="@style/Theme.AdAway.NoActionBar.Red" />
        <activity
            android:name=".ui.hosts.HostsSourcesActivity"
            android:exported="false"
            android:label="@string/hosts_title"
            android:parentActivityName=".ui.home.HomeActivity" />
        <activity
            android:name=".ui.source.SourceEditActivity"
            android:exported="false"
            android:label="@string/source_edit_title"
            android:parentActivityName=".ui.hosts.HostsSourcesActivity" />
        <activity
            android:name=".ui.log.LogActivity"
            android:label="@string/shortcut_dns_requests"
            android:parentActivityName=".ui.home.HomeActivity" />
        <activity
            android:name=".ui.lists.ListsActivity"
            android:exported="false"
            android:label="@string/lists_title"
            android:launchMode="singleTop"
            android:parentActivityName=".ui.home.HomeActivity">
            <meta-data
                android:name="android.app.searchable"
                android:resource="@xml/list_searchable" />
            <intent-filter>
                <action android:name="android.intent.action.SEARCH" />
            </intent-filter>
        </activity>
        <activity
            android:name=".ui.help.HelpActivity"
            android:exported="false"
            android:label="@string/menu_help"
            android:parentActivityName=".ui.home.HomeActivity" />
        <activity
            android:name=".ui.support.SupportActivity"
            android:exported="false"
            android:label="@string/support_title"
            android:parentActivityName=".ui.home.HomeActivity"
            android:theme="@style/Theme.AdAway.NoActionBar.Red" />
        <activity
            android:name=".ui.prefs.PrefsActivity"
            android:exported="false"
            android:label="@string/preferences_drawer_item"
            android:parentActivityName=".ui.home.HomeActivity" />
        <activity
            android:name=".ui.prefs.exclusion.PrefsVpnExcludedAppsActivity"
            android:exported="false"
            android:label="@string/pref_vpn_exclude_user_apps_activity" />
        <activity
            android:name=".ui.update.UpdateActivity"
            android:exported="false"
            android:label="@string/update_title"
            android:parentActivityName=".ui.home.HomeActivity"
            android:theme="@style/Theme.AdAway.NoActionBar.Red" />

        <service
            android:name=".vpn.VpnService"
            android:exported="true"
            android:permission="android.permission.BIND_VPN_SERVICE">
            <intent-filter>
                <action android:name="android.net.VpnService" />
            </intent-filter>
        </service>

        <service
            android:name=".tile.AdBlockingTileService"
            android:exported="true"
            android:icon="@drawable/logo"
            android:label="@string/app_name"
            android:permission="android.permission.BIND_QUICK_SETTINGS_TILE">
            <intent-filter>
                <action android:name="android.service.quicksettings.action.QS_TILE" />
            </intent-filter>
        </service>

        <receiver
            android:name=".broadcast.BootReceiver"
            android:exported="true">
            <intent-filter>
                <action android:name="android.intent.action.BOOT_COMPLETED" />
            </intent-filter>
        </receiver>
        <receiver
            android:name=".broadcast.CommandReceiver"
            android:exported="true"
            android:permission="org.adaway.permission.SEND_COMMAND">
            <intent-filter>
                <action android:name="org.adaway.action.SEND_COMMAND" />
            </intent-filter>
        </receiver>
        <receiver
            android:name=".broadcast.UpdateReceiver"
            android:exported="true">
            <intent-filter>
                <action android:name="android.intent.action.MY_PACKAGE_REPLACED" />
            </intent-filter>
        </receiver>

        <meta-data
            android:name="io.sentry.auto-init"
            android:value="false" />
        <meta-data
            android:name="io.sentry.dsn"
            android:value="https://8dac17b798fb45e492278a678c5ab028@o209266.ingest.us.sentry.io/1331667" />
        <meta-data android:name="io.sentry.traces.user-interaction.enable" android:value="true" />
    </application>

</manifest>
