Skip to content

Commit dae765e

Browse files
grisaitisfacebook-github-bot
authored andcommitted
Don't automatically backup settings in Android demo apps (#5822)
Summary: When re-installing the android demo apps, the OS caches and re-populates values in the settings pane. I think this might cause some confusion for people trying out the demos but who aren't experienced native app devs (like me 🙂). specifically for me, the settings caching made me think that old files that i had pushed, removed, and then replaced with other files were still on the device somehow. eg, i replaced a `tokenizer.bin` with a `tokenizer.model`, and the settings still said `tokenizer.bin`... this made me think maybe the old tokenizer was still floating around in app storage or something. to change the behavior is 1 loc for each demo app. in `examples/demo-apps/android/*Demo/app/src/main/AndroidManifest.xml`, ``` - android:allowBackup="true" + android:allowBackup="false" ``` i made a PR for personal glory but no worries if you want to do something else. Pull Request resolved: #5822 Reviewed By: cccclai Differential Revision: D64434744 Pulled By: kirklandsign fbshipit-source-id: 3c0a764b6e403eaec9ec0e1fc0ff09f4beb15ac8
1 parent 3e052a8 commit dae765e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

examples/demo-apps/android/ExecuTorchDemo/app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
1111

1212
<application
13-
android:allowBackup="true"
13+
android:allowBackup="false"
1414
android:dataExtractionRules="@xml/data_extraction_rules"
1515
android:fullBackupContent="@xml/backup_rules"
1616
android:icon="@mipmap/ic_launcher"

examples/demo-apps/android/LlamaDemo/app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
<application
1818
android:name=".ETLogging"
19-
android:allowBackup="true"
19+
android:allowBackup="false"
2020
android:dataExtractionRules="@xml/data_extraction_rules"
2121
android:extractNativeLibs="true"
2222
android:fullBackupContent="@xml/backup_rules"

0 commit comments

Comments
 (0)