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 {
383383 context.packageManager.getPackageInfo(context.packageName, PackageManager .PackageInfoFlags .of(PackageManager .GET_PERMISSIONS .toLong()))
384384 }.requestedPermissions.contains(Manifest .permission.REQUEST_INSTALL_PACKAGES )
385385 ) {
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))
391394 }
392- emitProgress(Progress .Corrupt (update?.fileName))
393395 }
394396 return
395397 }
You can’t perform that action at this time.
0 commit comments