Skip to content

Commit dcd23e7

Browse files
committed
refactor: Update backup and data extraction rules for clarity and consistency
1 parent 28cb603 commit dcd23e7

2 files changed

Lines changed: 18 additions & 14 deletions

File tree

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
<?xml version="1.0" encoding="utf-8"?><!--
2-
Sample backup rules file; uncomment and customize as necessary.
2+
Backup rules for Network Switch app
33
See https://developer.android.com/guide/topics/data/autobackup
44
for details.
55
Note: This file is ignored for devices older than API 31
66
See https://developer.android.com/about/versions/12/backup-restore
77
-->
88
<full-backup-content>
9-
<!--
10-
<include domain="sharedpref" path="."/>
11-
<exclude domain="sharedpref" path="device.xml"/>
12-
-->
9+
<!-- Include datastore preferences for user settings -->
10+
<include domain="file" path="datastore/" />
11+
12+
<!-- Exclude any sensitive or device-specific data -->
13+
<exclude domain="file" path="datastore/device_specific.preferences_pb" />
1314
</full-backup-content>
Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
11
<?xml version="1.0" encoding="utf-8"?><!--
2-
Sample data extraction rules file; uncomment and customize as necessary.
2+
Data extraction rules for Network Switch app (Android 12+)
33
See https://developer.android.com/about/versions/12/backup-restore#xml-changes
44
for details.
55
-->
66
<data-extraction-rules>
77
<cloud-backup>
8-
<!-- TODO: Use <include> and <exclude> to control what is backed up.
9-
<include .../>
10-
<exclude .../>
11-
-->
8+
<!-- Include user preferences for cloud backup -->
9+
<include domain="file" path="datastore/" />
10+
11+
<!-- Exclude any sensitive or device-specific data -->
12+
<exclude domain="file" path="datastore/device_specific.preferences_pb" />
1213
</cloud-backup>
13-
<!--
14+
1415
<device-transfer>
15-
<include .../>
16-
<exclude .../>
16+
<!-- Allow user settings to be transferred to new device -->
17+
<include domain="file" path="datastore/" />
18+
19+
<!-- Exclude device-specific data from transfer -->
20+
<exclude domain="file" path="datastore/device_specific.preferences_pb" />
1721
</device-transfer>
18-
-->
1922
</data-extraction-rules>

0 commit comments

Comments
 (0)