diff options
-rw-r--r-- | AndroidManifest.xml | 2 | ||||
-rw-r--r-- | src/org/thialfihar/android/apg/Apg.java | 14 | ||||
-rw-r--r-- | src/org/thialfihar/android/apg/MainActivity.java | 2 |
3 files changed, 16 insertions, 2 deletions
diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 4bbf1f773..1aa48ed95 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -17,7 +17,7 @@ <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="org.thialfihar.android.apg" - android:versionCode="21" android:versionName="1.0.7"> + android:versionCode="10800" android:versionName="1.0.8 beta 00"> <application android:icon="@drawable/icon" diff --git a/src/org/thialfihar/android/apg/Apg.java b/src/org/thialfihar/android/apg/Apg.java index 06f399e84..1561170c2 100644 --- a/src/org/thialfihar/android/apg/Apg.java +++ b/src/org/thialfihar/android/apg/Apg.java @@ -1959,6 +1959,20 @@ public class Apg { return nlBytes; } + public static boolean isReleaseVersion(Context context) { + try { + PackageInfo pi = context.getPackageManager().getPackageInfo(mApgPackageName, 0); + if (pi.versionCode % 100 == 99) { + return true; + } else { + return false; + } + } catch (NameNotFoundException e) { + // unpossible! + return false; + } + } + public static String getVersion(Context context) { if (VERSION != null) { return VERSION; diff --git a/src/org/thialfihar/android/apg/MainActivity.java b/src/org/thialfihar/android/apg/MainActivity.java index c459ad94a..7b6086d36 100644 --- a/src/org/thialfihar/android/apg/MainActivity.java +++ b/src/org/thialfihar/android/apg/MainActivity.java @@ -126,7 +126,7 @@ public class MainActivity extends BaseActivity { showDialog(Id.dialog.help); } - if (!mPreferences.hasSeenChangeLog(Apg.getVersion(this))) { + if (Apg.isReleaseVersion(this) && !mPreferences.hasSeenChangeLog(Apg.getVersion(this))) { showDialog(Id.dialog.change_log); } } |