mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-30 12:32:17 -05:00
starting new versioning for beta builds, only show changelog on release builds
This commit is contained in:
parent
4f25edbe97
commit
18de5178f8
@ -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"
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user