Android: Enable backup of external app-specific directory

This commit is contained in:
JosJuice 2021-05-06 22:04:16 +02:00
parent 6119f77626
commit 258832dad4
3 changed files with 26 additions and 2 deletions

View File

@ -1,5 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="org.dolphinemu.dolphinemu"> package="org.dolphinemu.dolphinemu">
<uses-feature <uses-feature
@ -30,13 +29,15 @@
android:name="android.permission.VIBRATE" android:name="android.permission.VIBRATE"
android:required="false"/> android:required="false"/>
<!-- Once compileSdkVersion is 31, add: android:dataExtractionRules="@xml/backup_rules_api_31" -->
<application <application
android:name=".DolphinApplication" android:name=".DolphinApplication"
android:label="@string/app_name" android:label="@string/app_name"
android:icon="@drawable/ic_launcher" android:icon="@drawable/ic_launcher"
android:requestLegacyExternalStorage="true" android:requestLegacyExternalStorage="true"
android:preserveLegacyExternalStorage="true" android:preserveLegacyExternalStorage="true"
android:allowBackup="false" android:allowBackup="true"
android:fullBackupContent="@xml/backup_rules"
android:supportsRtl="true" android:supportsRtl="true"
android:isGame="true" android:isGame="true"
android:banner="@drawable/banner_tv"> android:banner="@drawable/banner_tv">

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<full-backup-content>
<include domain="external" path="."/>
<exclude domain="external" path="./Cache/"/>
</full-backup-content>

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<data-extraction-rules>
<cloud-backup disableIfNoEncryptionCapabilities="false">
<include domain="external" path="."/>
<exclude domain="external" path="./Cache/"/>
<exclude domain="external" path="./Dump/"/>
<exclude domain="external" path="./Load/"/>
<exclude domain="external" path="./ResourcePacks/"/>
</cloud-backup>
<device-transfer>
<include domain="external" path="."/>
<exclude domain="external" path="./Cache/"/>
</device-transfer>
</data-extraction-rules>