aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/org/thialfihar/android/apg/Apg.java14
-rw-r--r--src/org/thialfihar/android/apg/MainActivity.java2
2 files changed, 15 insertions, 1 deletions
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);
}
}