Skip to content
This repository was archived by the owner on Aug 2, 2023. It is now read-only.

Commit fa77a61

Browse files
committed
Set default version code to 0, so update occurs properly
1 parent ce0ca2d commit fa77a61

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

app/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ android {
77
applicationId "link.infra.sslsocks"
88
minSdkVersion 19
99
targetSdkVersion 27
10-
versionCode 14
11-
versionName "0.0.14-beta"
10+
versionCode 15
11+
versionName "0.0.15-beta"
1212
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
1313
vectorDrawables.useSupportLibrary = true
1414
}

app/src/main/java/link/infra/sslsocks/service/StunnelProcessManager.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public class StunnelProcessManager {
3030

3131
private static boolean hasBeenUpdated(Context context) {
3232
SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context);
33-
int versionCode = sharedPreferences.getInt("VERSION_CODE", BuildConfig.VERSION_CODE);
33+
int versionCode = sharedPreferences.getInt("VERSION_CODE", 0);
3434

3535
if (versionCode != BuildConfig.VERSION_CODE) {
3636
sharedPreferences.edit().putInt("VERSION_CODE", BuildConfig.VERSION_CODE).apply();

0 commit comments

Comments
 (0)