<manifest xmlns:android="http://schemas.android.com/apk/res/android">
  <uses-permission android:name="android.permission.INTERNET"/>
  <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
  <uses-permission android:name="android.permission.USE_BIOMETRIC"/>
  <uses-permission android:name="android.permission.VIBRATE"/>
  <uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM"/>
  <uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS"/>
  <queries>
    <intent>
      <action android:name="android.intent.action.VIEW"/>
      <category android:name="android.intent.category.BROWSABLE"/>
      <data android:scheme="https"/>
    </intent>
  </queries>
  <application android:name=".MainApplication" android:label="@string/app_name" android:icon="@mipmap/ic_launcher" android:roundIcon="@mipmap/ic_launcher_round" android:allowBackup="false" android:fullBackupContent="false" android:dataExtractionRules="@xml/data_extraction_rules" android:theme="@style/AppTheme" android:supportsRtl="true" android:usesCleartextTraffic="true" android:localeConfig="@xml/locales_config" android:networkSecurityConfig="@xml/network_security_config">
    <meta-data android:name="expo.modules.updates.ENABLED" android:value="false"/>
    <meta-data android:name="expo.modules.updates.EXPO_UPDATES_CHECK_ON_LAUNCH" android:value="ALWAYS"/>
    <meta-data android:name="expo.modules.updates.EXPO_UPDATES_LAUNCH_WAIT_MS" android:value="0"/>
    <service android:name=".autofill.AutofillService" android:permission="android.permission.BIND_AUTOFILL_SERVICE" android:exported="true">
      <intent-filter>
        <action android:name="android.service.autofill.AutofillService"/>
      </intent-filter>
      <meta-data android:name="android.autofill" android:resource="@xml/autofill_service"/>
    </service>

    <!-- Credential Provider Service for Passkeys (Android 14+) -->
    <service
        android:name=".credentialprovider.AliasVaultCredentialProviderService"
        android:enabled="true"
        android:exported="true"
        android:permission="android.permission.BIND_CREDENTIAL_PROVIDER_SERVICE">
      <intent-filter>
        <action android:name="android.service.credentials.CredentialProviderService" />
      </intent-filter>
      <meta-data
          android:name="android.credentials.provider"
          android:resource="@xml/credential_provider_config" />
    </service>

    <!-- Passkey Authentication Activity -->
    <activity
        android:name=".credentialprovider.PasskeyAuthenticationActivity"
        android:exported="false"
        android:theme="@style/Theme.App.Overlay"
        android:configChanges="orientation|screenSize|smallestScreenSize|screenLayout|keyboardHidden|uiMode|fontScale|density" />

    <!-- Passkey Registration Activity -->
    <activity
        android:name=".credentialprovider.PasskeyRegistrationActivity"
        android:exported="false"
        android:theme="@style/Theme.App.Overlay"
        android:windowSoftInputMode="adjustResize"
        android:fitsSystemWindows="true"
        android:configChanges="orientation|screenSize|smallestScreenSize|screenLayout|keyboardHidden|uiMode|fontScale|density" />

    <!-- PIN Unlock Activity -->
    <activity
        android:name=".pinunlock.PinUnlockActivity"
        android:exported="false"
        android:theme="@style/Theme.App.Overlay"
        android:screenOrientation="portrait" />

    <!-- Password Unlock Activity -->
    <activity
        android:name=".passwordunlock.PasswordUnlockActivity"
        android:exported="false"
        android:theme="@style/Theme.App.Overlay"
        android:screenOrientation="portrait"
        android:windowSoftInputMode="adjustPan" />

    <!-- QR Scanner Activity -->
    <activity
        android:name=".qrscanner.QRScannerActivity"
        android:exported="false"
        android:theme="@style/zxing_CaptureTheme"
        android:screenOrientation="portrait" />

    <!-- Autofill Fill Activity (transparent; launched via Dataset.setAuthentication on selection) -->
    <activity
        android:name=".autofill.AutofillFillActivity"
        android:exported="false"
        android:excludeFromRecents="true"
        android:theme="@style/Theme.App.NoDisplay" />

    <!-- Autofill Unlock Activity (launched via FillResponse.setAuthentication when the vault is locked) -->
    <activity
        android:name=".autofill.AutofillUnlockActivity"
        android:exported="false"
        android:excludeFromRecents="true"
        android:theme="@style/Theme.App.Overlay"
        android:screenOrientation="portrait" />

    <activity android:name=".MainActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout|uiMode" android:launchMode="singleTask" android:windowSoftInputMode="adjustResize" android:theme="@style/Theme.App.SplashScreen" android:exported="true" android:screenOrientation="portrait">
      <intent-filter>
        <action android:name="android.intent.action.MAIN"/>
        <category android:name="android.intent.category.LAUNCHER"/>
      </intent-filter>
      <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="aliasvault"/>
        <data android:scheme="net.aliasvault.app"/>
        <data android:scheme="exp+aliasvault"/>
        <data android:scheme="net.aliasvault.app"/>
      </intent-filter>
    </activity>
    <receiver android:name=".nativevaultmanager.ClipboardClearReceiver" android:exported="false" />
  </application>
</manifest>
