Define Dropbox and Microsoft callbacks only in flavors with access to it

This commit is contained in:
Julian Raufelder 2022-05-24 16:33:55 +02:00
parent e0f36dbead
commit d84dd297b6
No known key found for this signature in database
GPG Key ID: 17EE71F6634E381D
4 changed files with 118 additions and 34 deletions

View File

@ -5,4 +5,39 @@
<!-- Required to self update Cryptomator in the apkstore variant -->
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
<!-- Keep in sync with apkstore, playstore and fdroid -->
<application>
<activity
android:name="com.dropbox.core.android.AuthActivity"
android:configChanges="orientation|keyboard"
android:exported="true"
android:launchMode="singleTask">
<intent-filter>
<data android:scheme="db-${DROPBOX_API_KEY}" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name="com.microsoft.identity.client.BrowserTabActivity"
android:exported="true">
<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:host="org.cryptomator"
android:path="/${ONEDRIVE_API_KEY_DECODED}"
android:scheme="msauth" />
</intent-filter>
</activity>
</application>
</manifest>

View File

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.cryptomator.presentation">
<!-- Required to self update Cryptomator in the apkstore variant -->
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
<!-- Keep in sync with apkstore, playstore and fdroid -->
<application>
<activity
android:name="com.dropbox.core.android.AuthActivity"
android:configChanges="orientation|keyboard"
android:exported="true"
android:launchMode="singleTask">
<intent-filter>
<data android:scheme="db-${DROPBOX_API_KEY}" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name="com.microsoft.identity.client.BrowserTabActivity"
android:exported="true">
<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:host="org.cryptomator"
android:path="/${ONEDRIVE_API_KEY_DECODED}"
android:scheme="msauth" />
</intent-filter>
</activity>
</application>
</manifest>

View File

@ -87,23 +87,6 @@
android:exported="false"
android:theme="@style/TransparentPopUp" />
<!-- Cloud Services -->
<!-- TODO move out into custom manifest-->
<activity
android:name="com.dropbox.core.android.AuthActivity"
android:configChanges="orientation|keyboard"
android:exported="true"
android:launchMode="singleTask">
<intent-filter>
<data android:scheme="db-${DROPBOX_API_KEY}" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<!-- Settings -->
<activity
android:name=".ui.activity.AutoUploadChooseVaultActivity"
@ -189,23 +172,6 @@
</intent-filter>
</activity>
<!-- TODO move out into custom manifest-->
<activity
android:name="com.microsoft.identity.client.BrowserTabActivity"
android:exported="true">
<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:host="org.cryptomator"
android:path="/${ONEDRIVE_API_KEY_DECODED}"
android:scheme="msauth" />
</intent-filter>
</activity>
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.fileprovider"

View File

@ -0,0 +1,40 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.cryptomator.presentation">
<!-- Keep in sync with apkstore, playstore and fdroid -->
<application>
<activity
android:name="com.dropbox.core.android.AuthActivity"
android:configChanges="orientation|keyboard"
android:exported="true"
android:launchMode="singleTask">
<intent-filter>
<data android:scheme="db-${DROPBOX_API_KEY}" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name="com.microsoft.identity.client.BrowserTabActivity"
android:exported="true">
<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:host="org.cryptomator"
android:path="/${ONEDRIVE_API_KEY_DECODED}"
android:scheme="msauth" />
</intent-filter>
</activity>
</application>
</manifest>