Update preference migration implementation

Only try to read preference through content provider when the app
is fresh install and a previous package ID is set. Also catch all
Exceptions to prevent crashing the app.

This prevents malicious settings injection and crashes when multiple
manager is installed.

Fix #3542
This commit is contained in:
topjohnwu
2020-12-09 02:07:58 -08:00
parent 039d4936cb
commit 1232113772
5 changed files with 11 additions and 10 deletions
+1 -1
View File
@@ -12,7 +12,7 @@
<application
android:icon="@drawable/ic_launcher"
android:name="a.e"
android:allowBackup="true"
android:allowBackup="false"
tools:ignore="UnusedAttribute,GoogleAppIndexingWarning">
<!-- Splash -->