Cotton code
53 lines · 2.7 KB · HTMLRaw
<?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-permission android:name="android.permission.FOREGROUND_SERVICE" />    <!-- Model downloads stand in the foreground while they run, past the calling app's end (ModelFetch). -->    <uses-permission android:name="android.permission.FOREGROUND_SERVICE_DATA_SYNC" />    <application android:name="com.cottondb.voice.VoiceApplication">        <activity            android:name="com.cottondb.voice.MainActivity"            android:exported="true"            android:launchMode="singleTask"            android:configChanges="orientation|screenSize|screenLayout|smallestScreenSize|keyboardHidden|uiMode|density|fontScale"            android:windowSoftInputMode="adjustResize">            <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="${urlScheme}" />            </intent-filter>        </activity>        <!-- The binder every other Cotton app dictates through (ICottonVoice). No permission guards it: each Play app             has its own key, so a signature permission would let no sibling in; VoiceService checks each caller             against the registry's certificates instead (CottonSigners). -->        <service            android:name="com.cottondb.voice.VoiceService"            android:exported="true">            <intent-filter>                <action android:name="com.cottondb.action.VOICE" />            </intent-filter>        </service>        <!-- The phone's voice input for apps that are not Cotton's (VoiceRecognition): the same engines and models. -->        <service            android:name="com.cottondb.voice.VoiceRecognition"            android:exported="true">            <intent-filter>                <action android:name="android.speech.RecognitionService" />                <category android:name="android.intent.category.DEFAULT" />            </intent-filter>            <meta-data                android:name="android.speech"                android:resource="@xml/recognition_service" />        </service>        <service            android:name="androidx.work.impl.foreground.SystemForegroundService"            android:foregroundServiceType="dataSync"            tools:node="merge" />    </application></manifest>