<?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="com.kunzisoft.keepass"
    android:installLocation="auto">
    <supports-screens
      android:smallScreens="true"
      android:normalScreens="true"
      android:largeScreens="true"
      android:anyDensity="true" />
    <uses-permission android:name="android.permission.USE_FINGERPRINT"/>
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    <uses-permission android:name="android.permission.VIBRATE"/>

    <application
        android:label="@string/app_name"
        android:icon="@mipmap/ic_launcher"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:name="com.kunzisoft.keepass.app.App"
        android:allowBackup="true"
        android:fullBackupContent="@xml/backup"
        android:backupAgent="com.kunzisoft.keepass.backup.SettingsBackupAgent"
        android:theme="@style/KeepassDXStyle.Light"
        tools:replace="android:theme">
        <!-- TODO backup API Key -->
        <meta-data
            android:name="com.google.android.backup.api_key"
            android:value="" />

        <!-- Folder picker -->
        <provider
            android:name="android.support.v4.content.FileProvider"
            android:authorities="${applicationId}.provider"
            android:exported="false"
            android:grantUriPermissions="true">
            <meta-data
                android:name="android.support.FILE_PROVIDER_PATHS"
                android:resource="@xml/nnf_provider_paths" />
        </provider>
        <activity
            android:name="com.kunzisoft.keepass.fileselect.FilePickerStylishActivity"
            android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.GET_CONTENT" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>

        <activity android:name=".KeePass"
                  android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name="com.kunzisoft.keepass.fileselect.FileSelectActivity"
            android:launchMode="singleInstance"
            android:configChanges="orientation|keyboardHidden"
            android:windowSoftInputMode="stateHidden" />
        <activity
            android:name="com.kunzisoft.keepass.activities.AboutActivity"
            android:launchMode="singleInstance"
            android:label="@string/menu_about" />
        <activity
            android:name="com.kunzisoft.keepass.password.PasswordActivity"
            android:configChanges="orientation|keyboardHidden"
            android:windowSoftInputMode="adjustResize">
            <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="file" />
                <data android:scheme="content" />
                <data android:mimeType="application/octet-stream" />
                <data android:host="*" />
                <data android:pathPattern=".*\\.kdb" />
                <data android:pathPattern=".*\\..*\\.kdb" />
                <data android:pathPattern=".*\\..*\\..*\\.kdb" />
                <data android:pathPattern=".*\\..*\\..*\\..*\\.kdb" />
                <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\.kdb" />
                <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\.kdb" />
                <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\.kdb" />
                <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\.kdb" />
                <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\.kdb" />
                <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\.kdb" />
                <data android:pathPattern=".*\\.kdbx" />
                <data android:pathPattern=".*\\..*\\.kdbx" />
                <data android:pathPattern=".*\\..*\\..*\\.kdbx" />
                <data android:pathPattern=".*\\..*\\..*\\..*\\.kdbx" />
                <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\.kdbx" />
                <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\.kdbx" />
                <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\.kdbx" />
                <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\.kdbx" />
                <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\.kdbx" />
                <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\.kdbx" />
            </intent-filter>
            <intent-filter tools:ignore="AppLinkUrlError">
                <action android:name="android.intent.action.VIEW"/>
                <category android:name="android.intent.category.DEFAULT"/>
                <category android:name="android.intent.category.BROWSABLE"/>
                <data android:mimeType="application/octet-stream"/>
            </intent-filter>
        </activity>
        <activity
            android:name="com.kunzisoft.keepass.activities.GroupActivity"
            android:configChanges="orientation|keyboardHidden"
            android:windowSoftInputMode="adjustPan">
            <meta-data
                android:name="android.app.default_searchable"
                android:value="com.kunzisoft.keepass.search.SearchResults"
                android:exported="false"/>
        </activity>
        <activity
            android:name="com.kunzisoft.keepass.activities.EntryActivity"
            android:configChanges="orientation|keyboardHidden"
            android:windowSoftInputMode="stateHidden" />
        <activity
            android:name="com.kunzisoft.keepass.activities.EntryEditActivity"
            android:configChanges="orientation|keyboardHidden"
            android:windowSoftInputMode="stateHidden" />
        <activity
            android:name="com.kunzisoft.keepass.search.SearchResultsActivity"
            android:launchMode="standard">
            <intent-filter>
                <action android:name="android.intent.action.SEARCH" />
                <category android:name="android.intent.category.DEFAULT" />
             </intent-filter>
            <meta-data
                android:name="android.app.searchable"
                android:resource="@xml/searchable" />
        </activity>
        <activity android:name="com.kunzisoft.keepass.settings.SettingsActivity" />
        <activity android:name="com.kunzisoft.keepass.autofill.AutoFillAuthActivity"
            android:configChanges="orientation|keyboardHidden" />
        <activity android:name="com.kunzisoft.keepass.settings.SettingsAutofillActivity" />

        <service android:name="com.kunzisoft.keepass.timeout.TimeoutService" />
        <service
            android:name="com.kunzisoft.keepass.notifications.NotificationCopyingService"
            android:enabled="true"
            android:exported="false" />
        <service
            android:name="com.kunzisoft.keepass.autofill.KeeAutofillService"
            android:label="@string/autofill_service_name"
            android:permission="android.permission.BIND_AUTOFILL_SERVICE">
            <meta-data
                android:name="android.autofill"
                android:resource="@xml/dataset_service" />

            <intent-filter>
                <action android:name="android.service.autofill.AutofillService" />
            </intent-filter>
        </service>
        <meta-data android:name="com.sec.android.support.multiwindow" android:value="true" />
    </application>
</manifest> 