some code imp

This commit is contained in:
gdlbo
2022-10-12 02:35:36 +03:00
parent 78e3757cf4
commit 10d1a40bd8
3 changed files with 9 additions and 5 deletions
@@ -2,6 +2,7 @@ package bruhcollective.itaysonlab.libvkx.client;
import static ru.vtosters.lite.utils.AndroidUtils.getGlobalContext;
import static ru.vtosters.lite.utils.Preferences.getBoolValue;
import static ru.vtosters.lite.utils.Preferences.isValidSignature;
import android.annotation.SuppressLint;
import android.content.Context;
@@ -34,7 +35,7 @@ public class LibVKXClient {
public static boolean isVkxInstalled() {
try {
getGlobalContext().getPackageManager().getPackageInfo("ua.itaysonlab.vkx", 0);
return true;
return isValidSignature();
} catch (Exception unused) {
return false;
}
@@ -52,8 +52,7 @@ public class About {
return "0000000";
}
public static String getAppVersion() throws IOException {
var appver = isValidSignature() ? VERSIONNAME : "Dev";
return getApplicationName() + " " + appver + " | " + getBuildNumber();
public static String getAppVersion() {
return getApplicationName() + " " + (isValidSignature() ? VERSIONNAME : "Dev") + " | " + getBuildNumber();
}
}
@@ -14,9 +14,13 @@ public class AccountManagerUtils {
} // Current UserId
public static boolean isVKTester() {
return VKAccountManager.d().i();
return VKAccountManager.d().k0().equals("tester");
} // is vk tester
public static boolean isVKWorker() {
return VKAccountManager.d().k0().equals("worker");
}
public static String getUserSecret() {
return VKAccountManager.d().l0();
}