Fix listenForPackageChanges for upgrades again
This commit is contained in:
@@ -179,8 +179,7 @@ class App : Application() {
|
||||
filter.addAction(Intent.ACTION_PACKAGE_REMOVED)
|
||||
filter.addDataScheme("package")
|
||||
val result = broadcastReceiver { _, intent ->
|
||||
if (intent.action == Intent.ACTION_PACKAGE_REMOVED ||
|
||||
!intent.getBooleanExtra(Intent.EXTRA_REPLACING, false)) callback()
|
||||
if (!intent.getBooleanExtra(Intent.EXTRA_REPLACING, false)) callback()
|
||||
}
|
||||
app.registerReceiver(result, filter)
|
||||
return result
|
||||
|
||||
Reference in New Issue
Block a user