File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
ui/src/main/java/com/wireguard/android/updater Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -383,13 +383,15 @@ object Updater {
383
383
context.packageManager.getPackageInfo(context.packageName, PackageManager .PackageInfoFlags .of(PackageManager .GET_PERMISSIONS .toLong()))
384
384
}.requestedPermissions.contains(Manifest .permission.REQUEST_INSTALL_PACKAGES )
385
385
) {
386
- updaterScope.launch {
387
- val update = try {
388
- checkForUpdates()
389
- } catch (_: Throwable ) {
390
- null
386
+ if (installer(context).isNotEmpty()) {
387
+ updaterScope.launch {
388
+ val update = try {
389
+ checkForUpdates()
390
+ } catch (_: Throwable ) {
391
+ null
392
+ }
393
+ emitProgress(Progress .Corrupt (update?.fileName))
391
394
}
392
- emitProgress(Progress .Corrupt (update?.fileName))
393
395
}
394
396
return
395
397
}
You can’t perform that action at this time.
0 commit comments