From c1d13ccd8f78601142a33273093e1b3cadaead58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Parm=C3=A9nides=20GV?= Date: Tue, 19 Aug 2014 19:43:46 +0200 Subject: Rebuild vpn profiles if upgraded to versionCode 91 --- .../main/java/se/leap/bitmaskclient/Dashboard.java | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'app/src/main/java/se/leap/bitmaskclient/Dashboard.java') diff --git a/app/src/main/java/se/leap/bitmaskclient/Dashboard.java b/app/src/main/java/se/leap/bitmaskclient/Dashboard.java index 74b6f9af..761afc0a 100644 --- a/app/src/main/java/se/leap/bitmaskclient/Dashboard.java +++ b/app/src/main/java/se/leap/bitmaskclient/Dashboard.java @@ -105,17 +105,17 @@ public class Dashboard extends Activity implements LogInDialog.LogInDialogInterf int versionCode = getPackageManager().getPackageInfo(getPackageName(), 0).versionCode; int lastDetectedVersion = preferences.getInt(APP_VERSION, 0); preferences.edit().putInt(APP_VERSION, versionCode); - if(lastDetectedVersion != 0) { - switch(versionCode) { - case 90: // 0.6.0 - if(!preferences.getString(EIP.KEY, "").isEmpty()) { - Intent removeVpnProfiles = new Intent(getApplicationContext(), EIP.class); - removeVpnProfiles.setAction(EIP.ACTION_REMOVE_PROFILES); - startService(removeVpnProfiles); - } + Log.d("Dashboard", "detected version code: " + versionCode); + Log.d("Dashboard", "last detected version code: " + lastDetectedVersion); + + switch(versionCode) { + case 91: // 0.6.0 without Bug #5999 + if(!preferences.getString(EIP.KEY, "").isEmpty()) { + Intent rebuildVpnProfiles = new Intent(getApplicationContext(), EIP.class); + rebuildVpnProfiles.setAction(EIP.ACTION_REBUILD_PROFILES); + startService(rebuildVpnProfiles); } - - } + } } catch (NameNotFoundException e) { } } -- cgit v1.2.3