AppVerHook
This commit is contained in:
@@ -1,13 +1,15 @@
|
||||
package ru.vtosters.lite.hooks;
|
||||
|
||||
import static ru.vtosters.lite.utils.Preferences.getBoolValue;
|
||||
|
||||
import b.h.g.g.BuildInfo;
|
||||
|
||||
public class AppVerHook {
|
||||
public static String appBuild() {
|
||||
return String.valueOf(BuildInfo.i.e());
|
||||
public static int appBuild() {
|
||||
return getBoolValue("useOldAppVer", false) ? 6561 : BuildInfo.i.e();
|
||||
}
|
||||
|
||||
public static String appVer() {
|
||||
return BuildInfo.i.d(); // 7.26
|
||||
return getBoolValue("useOldAppVer", false) ? "6.18.1" : BuildInfo.i.d();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -251,7 +251,7 @@ public class VTSettings extends MaterialPreferenceToolbarFragment {
|
||||
return true;
|
||||
});
|
||||
|
||||
if (dev()) {
|
||||
if (dev() && isValidSignature()) {
|
||||
addMaterialSwitchPreference(this, "autoupdates", requireContext().getString(R.string.checkupdates), "", R.drawable.ic_camera_switch_outline_24, true, (preference, o) -> {
|
||||
boolean value = (boolean) o;
|
||||
edit().putBoolean("autoupdates", value).commit();
|
||||
|
||||
@@ -22,6 +22,10 @@
|
||||
android:key="calls"
|
||||
android:summary="@string/messages_interface_calls_summary"
|
||||
android:title="@string/vtlcalls" />
|
||||
<com.vtosters.lite.ui.MaterialSwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="useOldAppVer"
|
||||
android:title="useOldAppVer" />
|
||||
<com.vtosters.lite.ui.MaterialSwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="podcastcatalog"
|
||||
|
||||
@@ -119,13 +119,13 @@
|
||||
|
||||
if-nez v0, :cond_0
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/hooks/AppVerHook;->appBuild()Ljava/lang/String;
|
||||
invoke-static {}, Lru/vtosters/lite/hooks/AppVerHook;->appVer()Ljava/lang/String;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/hooks/AppVerHook;->appVer()Ljava/lang/String;
|
||||
invoke-static {}, Lru/vtosters/lite/hooks/AppVerHook;->appBuild()I
|
||||
|
||||
move-result-object v1
|
||||
move-result v1
|
||||
|
||||
.line 4
|
||||
sget-object v2, Lcom/vk/core/util/AppContextHolder;->a:Landroid/content/Context;
|
||||
@@ -147,6 +147,10 @@
|
||||
|
||||
const/4 v0, 0x1
|
||||
|
||||
invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
||||
|
||||
move-result-object v1
|
||||
|
||||
aput-object v1, v4, v0
|
||||
|
||||
const/4 v0, 0x2
|
||||
|
||||
Reference in New Issue
Block a user