Added backup rules to backup user preferences for both A12 & above and A11 and lower

backup-and-restore-a12-changes
Niharika Arora 3 years ago
parent b6cd7a1537
commit 76974c4001

@ -2,4 +2,4 @@
<state>
<option name="USE_PER_PROJECT_SETTINGS" value="true" />
</state>
</component>
</component>

@ -118,4 +118,4 @@ configurations.configureEach {
// Temporary workaround for https://issuetracker.google.com/174733673
force("org.objenesis:objenesis:2.6")
}
}
}

@ -0,0 +1,20 @@
{
"version": 3,
"artifactType": {
"type": "APK",
"kind": "Directory"
},
"applicationId": "com.example.samples.apps.nowinandroid.demo.debug",
"variantName": "demoDebug",
"elements": [
{
"type": "SINGLE",
"filters": [],
"attributes": [],
"versionCode": 1,
"versionName": "0.0.1",
"outputFile": "app-demo-debug.apk"
}
],
"elementType": "File"
}

@ -24,6 +24,8 @@
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:dataExtractionRules="@xml/backup_rules_12"
android:fullBackupContent="@xml/backup_rules"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.Nia.Splash">

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ Copyright 2022 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ https://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<full-backup-content>
<include domain="file" path="datastore/user_preferences.pb"
requireFlags="clientSideEncryption" />
<include domain="file" path="datastore/user_preferences.pb"
requireFlags="deviceToDeviceTransfer" />
</full-backup-content>

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ Copyright 2022 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ https://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<data-extraction-rules>
<cloud-backup disableIfNoEncryptionCapabilities="true">
<include domain="file" path="datastore/user_preferences.pb"/>
</cloud-backup>
<device-transfer>
<include domain="file" path="datastore/user_preferences.pb"/>
</device-transfer>
</data-extraction-rules>
Loading…
Cancel
Save