Cotton code
59 lines · 3.0 KB · HTMLRaw
<?xml version="1.0" encoding="utf-8"?><!-- What every app shares; each app's own manifest (src/<app>/AndroidManifest.xml) names its Application and its activity. --><manifest xmlns:android="http://schemas.android.com/apk/res/android">    <uses-permission android:name="android.permission.INTERNET" />    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />    <!-- The shell posts from code every app carries (a reminder, a transfer's progress, a chat); declared once here, it         is asked at runtime only where an app posts (AppSurface), so declaring it prompts nobody. -->    <uses-permission android:name="android.permission.POST_NOTIFICATIONS" />    <!-- No Cotton app declares a permission another Cotton app uses: each Play app has its own signing key, and a         second app declaring a permission another key owns is refused at install (INSTALL_FAILED_DUPLICATE_PERMISSION,         "Can't install" in Play). Which apps are Cotton's is the shell's CottonSigners, by the registry's certificates. -->    <!-- The microphone, asked only when the person taps the mic in a text field (the shell's VoiceControl). -->    <uses-permission android:name="android.permission.RECORD_AUDIO" />    <!-- The other Cotton apps on this phone, asked for a database's data key (SiblingKeys); Cotton Voice's binder; the         platform recogniser, the fallback where Cotton Voice is absent. -->    <queries>        <intent>            <action android:name="com.cottondb.action.SEALED_KEYS" />        </intent>        <intent>            <action android:name="com.cottondb.action.VOICE" />        </intent>        <intent>            <action android:name="android.speech.RecognitionService" />        </intent>    </queries>    <application        android:allowBackup="false"        android:networkSecurityConfig="@xml/player_door"        android:icon="@mipmap/ic_launcher"        android:roundIcon="@mipmap/ic_launcher_round"        android:label="@string/launcher_name"        android:supportsRtl="true"        android:theme="@style/Theme.Cotton.Launch">        <!-- Export library's zip, handed to the share sheet (LibraryExport). -->        <provider            android:name="androidx.core.content.FileProvider"            android:authorities="${applicationId}.files"            android:exported="false"            android:grantUriPermissions="true">            <meta-data                android:name="android.support.FILE_PROVIDER_PATHS"                android:resource="@xml/shared_files" />        </provider>        <!-- A database's data key, handed only to a Cotton app signed by the same key (SiblingKeys checks the caller). -->        <provider            android:name="com.cottondb.shell.core.SiblingKeys"            android:authorities="${applicationId}.sealedkeys"            android:exported="true">            <intent-filter>                <action android:name="com.cottondb.action.SEALED_KEYS" />            </intent-filter>        </provider>    </application></manifest>