Skip to content

Commit

Permalink
Don't automatically backup settings in Android demo apps (#5822)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
grisaitis authored and facebook-github-bot committed Oct 16, 2024
1 parent 3e052a8 commit dae765e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

<application
android:allowBackup="true"
android:allowBackup="false"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/ic_launcher"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

<application
android:name=".ETLogging"
android:allowBackup="true"
android:allowBackup="false"
android:dataExtractionRules="@xml/data_extraction_rules"
android:extractNativeLibs="true"
android:fullBackupContent="@xml/backup_rules"
Expand Down

0 comments on commit dae765e

Please sign in to comment.