Skip to content

Commit e1cd401

Browse files
committed
Fix allowBackup deprecated (Android 12+) using dataExtractionRules
See <https://stackoverflow.com/a/71226351>.
1 parent f72184e commit e1cd401

3 files changed

Lines changed: 23 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
- Updated stroke input data to [Conway Stroke Data v1.7.0]
77
(adds phrases 較為, 爆煲)
88
- Upgraded Android Gradle Plugin to 7.1.3
9+
- Fixed `allowBackup` deprecated in Android 12+ using `dataExtractionRules`
910

1011

1112
## [v0.9.10] (32) 奇難雜症 (2022-03-26)

app/src/main/AndroidManifest.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
>
1212
<application
1313
android:allowBackup="false"
14+
android:fullBackupContent="false"
15+
android:dataExtractionRules="@xml/data_extraction_rules"
1416
android:icon="@mipmap/icon_launcher"
1517
android:label="@string/app_name"
1618
android:roundIcon="@mipmap/icon_launcher_round"
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
Exclude everything.
4+
-->
5+
<data-extraction-rules>
6+
<cloud-backup>
7+
<exclude domain="root" />
8+
<exclude domain="file" />
9+
<exclude domain="database" />
10+
<exclude domain="sharedpref" />
11+
<exclude domain="external" />
12+
</cloud-backup>
13+
<device-transfer>
14+
<exclude domain="root" />
15+
<exclude domain="file" />
16+
<exclude domain="database" />
17+
<exclude domain="sharedpref" />
18+
<exclude domain="external" />
19+
</device-transfer>
20+
</data-extraction-rules>

0 commit comments

Comments
 (0)