Unverified Commit 7461d3bf authored by Mygod's avatar Mygod Committed by GitHub

Fix listenForPackageChanges for upgrades again

parent 4483765b
...@@ -179,8 +179,7 @@ class App : Application() { ...@@ -179,8 +179,7 @@ class App : Application() {
filter.addAction(Intent.ACTION_PACKAGE_REMOVED) filter.addAction(Intent.ACTION_PACKAGE_REMOVED)
filter.addDataScheme("package") filter.addDataScheme("package")
val result = broadcastReceiver { _, intent -> val result = broadcastReceiver { _, intent ->
if (intent.action == Intent.ACTION_PACKAGE_REMOVED || if (!intent.getBooleanExtra(Intent.EXTRA_REPLACING, false)) callback()
!intent.getBooleanExtra(Intent.EXTRA_REPLACING, false)) callback()
} }
app.registerReceiver(result, filter) app.registerReceiver(result, filter)
return result return result
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment