<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.failure.vanta.voice">

    <uses-permission android:name="android.permission.RECORD_AUDIO" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="com.failure.vanta.permission.CONFIG" />

    <queries>
        <package android:name="com.failure.vanta.hub" />
        <provider android:authorities="com.failure.vanta.config" />
        <intent>
            <action android:name="android.speech.RecognitionService" />
        </intent>
        <intent>
            <action android:name="android.intent.action.TTS_SERVICE" />
        </intent>
    </queries>

    <application
        android:label="@string/app_name"
        android:icon="@drawable/ic_voice"
        android:theme="@style/Vanta.Voice">

        <service
            android:name=".VantaVoiceService"
            android:exported="true"
            android:permission="android.permission.BIND_VOICE_INTERACTION">
            <meta-data
                android:name="android.voice_interaction"
                android:resource="@xml/interaction_service" />
            <intent-filter>
                <action android:name="android.service.voice.VoiceInteractionService" />
            </intent-filter>
        </service>

        <service
            android:name=".VantaSessionService"
            android:exported="true"
            android:permission="android.permission.BIND_VOICE_INTERACTION" />

        <service
            android:name=".VantaRecognitionService"
            android:exported="true">
            <meta-data
                android:name="android.speech"
                android:resource="@xml/recognition_service" />
            <intent-filter>
                <action android:name="android.speech.RecognitionService" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </service>

        <activity
            android:name=".VoiceActivity"
            android:exported="true"
            android:excludeFromRecents="true"
            android:launchMode="singleTask"
            android:taskAffinity=""
            android:theme="@style/Vanta.Voice.Translucent">
            <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.ASSIST" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>

        <!-- The framework resolves settingsActivity inside this package, so a
             direct cross-package name would never open; this forwards to VantaHub. -->
        <activity
            android:name=".HubTrampoline"
            android:exported="true"
            android:excludeFromRecents="true"
            android:noHistory="true"
            android:theme="@style/Vanta.Voice.Translucent" />
    </application>
</manifest>
