File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
ui/src/main/java/com/wireguard/android/updater Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -50,11 +50,9 @@ object Updater {
50
50
private const val UPDATE_URL_FMT = " https://download.wireguard.com/android-client/%s"
51
51
private const val APK_NAME_PREFIX = BuildConfig .APPLICATION_ID + " -"
52
52
private const val APK_NAME_SUFFIX = " .apk"
53
- private val CURRENT_VERSION = Version (BuildConfig .VERSION_NAME .removeSuffix(" -debug" ))
54
- private val LATEST_FILE = if (BuildConfig .DEBUG ) " latest-debug.sig" else " latest.sig"
55
- private val RELEASE_PUBLIC_KEY_BASE64 =
56
- if (BuildConfig .DEBUG ) " RWTKFCNaLimMkuolGwAw12XT6sx+nnS7KE1wmhJ7YHXvAPedtPR/rofU"
57
- else " RWTAzwGRYr3EC9px0Ia3fbttz8WcVN6wrOwWp2delz4el6SI8XmkKSMp"
53
+ private const val LATEST_FILE = " latest.sig"
54
+ private const val RELEASE_PUBLIC_KEY_BASE64 = " RWTAzwGRYr3EC9px0Ia3fbttz8WcVN6wrOwWp2delz4el6SI8XmkKSMp"
55
+ private val CURRENT_VERSION by lazy { Version (BuildConfig .VERSION_NAME ) }
58
56
59
57
private val updaterScope = CoroutineScope (Job () + Dispatchers .IO )
60
58
@@ -365,6 +363,9 @@ object Updater {
365
363
}
366
364
367
365
fun monitorForUpdates () {
366
+ if (BuildConfig .DEBUG )
367
+ return
368
+
368
369
val context = Application .get()
369
370
370
371
if (installerIsGooglePlay(context))
@@ -440,4 +441,4 @@ object Updater {
440
441
context.startActivity(start)
441
442
}
442
443
}
443
- }
444
+ }
You can’t perform that action at this time.
0 commit comments