<?xml version="1.0" encoding="utf-8"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
   - License, v. 2.0. If a copy of the MPL was not distributed with this
   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="org.mozilla.samples.browser">

    <uses-permission android:name="android.permission.CAMERA" />
    <uses-permission android:name="android.permission.RECORD_AUDIO" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"
        tools:ignore="ScopedStorage" />
    <uses-permission android:name="android.permission.BLUETOOTH" />
    <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
    <uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/>
    <application
        android:allowBackup="true"
        android:fullBackupContent="@xml/backup_rules"
        android:icon="@mipmap/ic_launcher"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@style/Theme.AppCompat.Light.NoActionBar"
        android:name=".SampleApplication"
        android:usesCleartextTraffic="true"
        tools:ignore="UnusedAttribute">
        <activity android:name=".BrowserActivity"
            android:launchMode="singleTask"
            android:exported="true"
            android:configChanges="keyboard|keyboardHidden|mcc|mnc|orientation|screenSize|locale|layoutDirection|smallestScreenSize|screenLayout">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

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

        <activity android:name=".ExternalAppBrowserActivity"
            android:configChanges="keyboard|keyboardHidden|mcc|mnc|orientation|screenSize|locale|layoutDirection|smallestScreenSize|screenLayout"
            android:windowSoftInputMode="adjustResize|stateAlwaysHidden"
            android:exported="false"
            android:taskAffinity=""
            android:persistableMode="persistNever"
            android:autoRemoveFromRecents="false"
            android:label="@string/app_name" />

        <activity
                android:theme="@style/Theme.AppCompat.Light"
                android:name=".addons.AddonsActivity"
                android:label="@string/mozac_feature_addons_addons"
                android:parentActivityName=".BrowserActivity" />

        <activity
                android:theme="@style/Theme.AppCompat.Light"
                android:name=".addons.AddonDetailsActivity"
                android:label="@string/mozac_feature_addons_addons" />

        <activity android:name=".addons.InstalledAddonDetailsActivity"
                android:label="@string/mozac_feature_addons_addons"
                android:parentActivityName=".addons.AddonsActivity"
                android:theme="@style/Theme.AppCompat.Light" />

        <activity
                android:name=".addons.PermissionsDetailsActivity"
                android:label="@string/mozac_feature_addons_addons"
                android:theme="@style/Theme.AppCompat.Light" />

        <activity
            android:name=".addons.AddonSettingsActivity"
            android:label="@string/mozac_feature_addons_addons"
            android:theme="@style/Theme.AppCompat.Light" />

        <activity
            android:name=".addons.NotYetSupportedAddonActivity"
            android:label="@string/mozac_feature_addons_addons"
            android:theme="@style/Theme.AppCompat.Light" />

        <activity
            android:name=".addons.WebExtensionActionPopupActivity"
            android:label="@string/mozac_feature_addons_addons"
            android:theme="@style/Theme.AppCompat.Light" />

        <activity
            android:name=".IntentReceiverActivity"
            android:relinquishTaskIdentity="true"
            android:taskAffinity=""
            android:exported="true"
            android:excludeFromRecents="true" >

            <intent-filter>
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
                <category android:name="mozilla.components.pwa.category.SHORTCUT" />

                <data android:scheme="http" />
                <data android:scheme="https" />
            </intent-filter>

            <intent-filter>
                <action android:name="android.intent.action.SEND" />
                <category android:name="android.intent.category.DEFAULT" />
                <data android:mimeType="text/plain" />
            </intent-filter>

            <intent-filter>
                <action android:name="android.nfc.action.NDEF_DISCOVERED"/>
                <category android:name="android.intent.category.DEFAULT" />
                <data android:scheme="http" />
                <data android:scheme="https" />
            </intent-filter>

            <intent-filter>
                <action android:name="mozilla.components.feature.pwa.VIEW_PWA" />
                <category android:name="android.intent.category.DEFAULT" />
                <data android:scheme="https" />
            </intent-filter>
        </activity>

        <activity android:name=".autofill.AutofillUnlockActivity"
            android:exported="false"
            android:theme="@android:style/Theme.Translucent.NoTitleBar" />

        <activity android:name=".autofill.AutofillConfirmActivity"
            android:exported="false"
            android:theme="@style/Theme.AppCompat.Translucent" />

        <activity android:name=".autofill.AutofillSearchActivity"
            android:exported="false" />

        <service
            android:name=".autofill.AutofillService"
            android:label="@string/app_name"
            android:exported="true"
            android:permission="android.permission.BIND_AUTOFILL_SERVICE">
            <intent-filter>
                <action android:name="android.service.autofill.AutofillService"/>
            </intent-filter>
            <meta-data
                android:name="android.autofill"
                android:resource="@xml/service_configuration" />
        </service>

        <service
            android:name=".customtabs.CustomTabsService"
            android:exported="true"
            tools:ignore="ExportedService">
            <intent-filter>
                <action android:name="android.support.customtabs.action.CustomTabsService" />
                <category android:name="androidx.browser.trusted.category.TrustedWebActivities" />
                <category android:name="androidx.browser.trusted.category.NavBarColorCustomization" />
            </intent-filter>
        </service>

        <service android:name=".downloads.DownloadService" />

        <service android:name=".media.MediaSessionService"
            android:exported="false" />

    </application>

</manifest>
