mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-28 10:47:46 +00:00
24 lines
607 B
Java
24 lines
607 B
Java
package org.thoughtcrime.securesms.util;
|
|
|
|
import android.content.Context;
|
|
import android.content.pm.PackageManager;
|
|
|
|
import java.io.IOException;
|
|
|
|
public class VersionTracker {
|
|
|
|
|
|
public static int getLastSeenVersion(Context context) {
|
|
return TextSecurePreferences.getLastVersionCode(context);
|
|
}
|
|
|
|
public static void updateLastSeenVersion(Context context) {
|
|
try {
|
|
int currentVersionCode = Util.getCurrentApkReleaseVersion(context);
|
|
TextSecurePreferences.setLastVersionCode(context, currentVersionCode);
|
|
} catch (IOException ioe) {
|
|
throw new AssertionError(ioe);
|
|
}
|
|
}
|
|
}
|