diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/Utils.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/Utils.java index 6fd3d0afd..02824fdbf 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/Utils.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/Utils.java @@ -403,17 +403,24 @@ public class Utils { return dict_url; } - private static void setFirstBootStatics( Context context ) + public static int getAppVersion( Context context ) { - int thisVersion = 0; - int prevVersion = 0; + int version; try { - thisVersion = context.getPackageManager() + version = context.getPackageManager() .getPackageInfo(context.getPackageName(), 0) .versionCode; } catch ( Exception e ) { + version = 0; } + return version; + } + + private static void setFirstBootStatics( Context context ) + { + int thisVersion = getAppVersion( context ); + int prevVersion = 0; SharedPreferences prefs = null; if ( 0 < thisVersion ) {