90 lines
4.6 KiB
XML
90 lines
4.6 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- SPDX-License-Identifier: GPL-3.0-or-later -->
|
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
|
xmlns:tools="http://schemas.android.com/tools">
|
|
|
|
<uses-permission android:name="android.permission.INTERNET" />
|
|
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
|
<uses-permission android:name="android.permission.READ_CONTACTS" />
|
|
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
|
|
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
|
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_DATA_SYNC" />
|
|
|
|
<!-- Android Backup is opt-in and OFF by default (issue #21). allowBackup can't be toggled at
|
|
runtime, so LibreMailBackupAgent gates it on the "Include settings in Android Backup"
|
|
preference: with backup disabled the agent ships nothing. When enabled, only the settings
|
|
DataStore is backed up per the allowlist in data_extraction_rules (API 31+) /
|
|
backup_rules (API 29-30) — never credentials, the mail cache, or the Keystore-sealed cache
|
|
passphrase. fullBackupOnly keeps this to Auto Backup (full-data) only. -->
|
|
<application
|
|
android:name=".LibreMailApplication"
|
|
android:allowBackup="true"
|
|
android:backupAgent=".backup.LibreMailBackupAgent"
|
|
android:dataExtractionRules="@xml/data_extraction_rules"
|
|
android:fullBackupContent="@xml/backup_rules"
|
|
android:fullBackupOnly="true"
|
|
android:icon="@mipmap/ic_launcher"
|
|
android:label="@string/app_name"
|
|
android:roundIcon="@mipmap/ic_launcher_round"
|
|
android:supportsRtl="true"
|
|
android:theme="@style/Theme.LibreMail">
|
|
|
|
<activity
|
|
android:name=".MainActivity"
|
|
android:exported="true"
|
|
android:label="@string/app_name"
|
|
android:theme="@style/Theme.LibreMail">
|
|
<intent-filter>
|
|
<action android:name="android.intent.action.MAIN" />
|
|
<category android:name="android.intent.category.LAUNCHER" />
|
|
</intent-filter>
|
|
</activity>
|
|
|
|
<!-- WorkManager is initialized on-demand via Configuration.Provider, so remove the
|
|
default automatic initializer. -->
|
|
<provider
|
|
android:name="androidx.startup.InitializationProvider"
|
|
android:authorities="${applicationId}.androidx-startup"
|
|
android:exported="false"
|
|
tools:node="merge">
|
|
<meta-data
|
|
android:name="androidx.work.WorkManagerInitializer"
|
|
android:value="androidx.startup"
|
|
tools:node="remove" />
|
|
</provider>
|
|
|
|
<!-- Holds a long-lived IMAP IDLE connection for instant push (opt-in via Advanced Settings). -->
|
|
<service
|
|
android:name=".push.IdleService"
|
|
android:exported="false"
|
|
android:foregroundServiceType="dataSync" />
|
|
|
|
<!-- Shares downloaded attachments with viewer apps via a content:// URI. -->
|
|
<provider
|
|
android:name="androidx.core.content.FileProvider"
|
|
android:authorities="${applicationId}.fileprovider"
|
|
android:exported="false"
|
|
android:grantUriPermissions="true">
|
|
<meta-data
|
|
android:name="android.support.FILE_PROVIDER_PATHS"
|
|
android:resource="@xml/file_paths" />
|
|
</provider>
|
|
|
|
<!-- Captures the Microsoft OAuth redirect for Outlook sign-in. AppAuth's bundled manifest
|
|
already declares RedirectUriReceiverActivity with an intent-filter for
|
|
${appAuthRedirectScheme}, which build.gradle.kts sets to the Outlook scheme
|
|
(org.libremail.outlook); the redirect URI org.libremail.outlook://oauth2redirect must
|
|
be registered as a public-client (mobile/desktop) redirect in the Azure app
|
|
registration. We only merge a theme onto that activity here: AppAuth declares no theme
|
|
and RedirectUriReceiverActivity extends AppCompatActivity, so without an AppCompat theme
|
|
it inherits the app's Theme.Material shell and crashes ("You need to use a Theme.AppCompat
|
|
theme") when the redirect launches it. We reuse the translucent theme AppAuth itself
|
|
applies to AuthorizationManagementActivity. -->
|
|
<activity
|
|
android:name="net.openid.appauth.RedirectUriReceiverActivity"
|
|
android:exported="true"
|
|
android:theme="@style/Theme.AppCompat.Translucent.NoTitleBar"
|
|
tools:node="merge" />
|
|
</application>
|
|
</manifest>
|