verifications
This commit is contained in:
@@ -4,6 +4,7 @@ import static ru.vtosters.lite.utils.Preferences.getBoolValue;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.net.Uri;
|
||||
import android.util.Base64;
|
||||
import android.util.Log;
|
||||
import android.widget.Toast;
|
||||
@@ -19,6 +20,7 @@ import java.nio.charset.StandardCharsets;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import okhttp3.CacheControl;
|
||||
import okhttp3.Call;
|
||||
import okhttp3.Callback;
|
||||
import okhttp3.MediaType;
|
||||
@@ -26,6 +28,7 @@ import okhttp3.OkHttpClient;
|
||||
import okhttp3.Request;
|
||||
import okhttp3.RequestBody;
|
||||
import okhttp3.Response;
|
||||
import ru.vtosters.lite.utils.Globals;
|
||||
|
||||
public class VTVerifications {
|
||||
public static final HashMap<Integer, Boolean> sServiceAccountsMap = new HashMap<>();
|
||||
@@ -54,9 +57,9 @@ public class VTVerifications {
|
||||
}
|
||||
|
||||
Request request = new Request.a()
|
||||
.a("https://vtosters.app/vktoaster/getGalo4kiBatch")
|
||||
.b("https://vtosters.app/vktoaster/getGalo4kiBatch")
|
||||
.a(RequestBody.a(MediaType.b("application/json; charset=UTF-8"), "{\"types\":[0,228,404,1337]}"))
|
||||
.b().a();
|
||||
.a();
|
||||
|
||||
client.a(request).a(new Callback() {
|
||||
@Override
|
||||
@@ -65,7 +68,7 @@ public class VTVerifications {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void a(Call call, Response response) throws IOException {
|
||||
public void a(Call call, Response response){
|
||||
try {
|
||||
getVerifications(response.a().g());
|
||||
} catch (Exception e) {
|
||||
@@ -86,7 +89,7 @@ public class VTVerifications {
|
||||
private static void processArray(JSONArray jSONArray, Map<Integer, Boolean> map, String str) {
|
||||
if (jSONArray != null) {
|
||||
for (int i = 0; i < jSONArray.length(); i++) {
|
||||
map.put(Integer.valueOf(jSONArray.optInt(i)), true);
|
||||
map.put(jSONArray.optInt(i), true);
|
||||
}
|
||||
if (str != null) {
|
||||
setLoaded(str, jSONArray.toString());
|
||||
|
||||
@@ -57,7 +57,7 @@ public class Preferences {
|
||||
if(dev()){
|
||||
LoadLibrary("vkopustest");
|
||||
}
|
||||
systemThemeChanger();
|
||||
// systemThemeChanger();
|
||||
getInstance().autoCleaningCache();
|
||||
} // VK Init
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
VERSION_BUILD=6187eec
|
||||
VERSION_BUILD=8a7763c
|
||||
VERSION_BRANCH=vtl-remaster
|
||||
VERSION_BASE=
|
||||
VERSION_BRANCHID=vtl-remaster
|
||||
VERSION_BRANCHTYPE=vtl-remaster
|
||||
VERSION_COMMIT=6187eecac5a727c7325e4b30d0b6a1b08dd5dc7f
|
||||
VERSION_COMMIT=8a7763c356be1153c0bde11673714e7a671e9e14
|
||||
VERSION_GRADLE=
|
||||
VERSION_DISPLAY=vtl-remaster-6187eec-dirty
|
||||
VERSION_FULL=vtl-remaster-6187eec-dirty
|
||||
VERSION_DISPLAY=vtl-remaster-8a7763c-dirty
|
||||
VERSION_FULL=vtl-remaster-8a7763c-dirty
|
||||
VERSION_SCM=git
|
||||
VERSION_TAG=
|
||||
VERSION_LAST_TAG=v0.2.9-beta2
|
||||
|
||||
@@ -125,6 +125,12 @@
|
||||
.method public final a(Lorg/json/JSONObject;)Lcom/vk/dto/common/VerifyInfo;
|
||||
.locals 4
|
||||
|
||||
invoke-static {p1}, Lru/vtosters/lite/f0x1d/VTVerifications;->VerifyInfo(Lorg/json/JSONObject;)Lcom/vk/dto/common/VerifyInfo;
|
||||
|
||||
move-result-object p1
|
||||
|
||||
return-object p1
|
||||
|
||||
const/4 v0, 0x0
|
||||
|
||||
const-string v1, "verified"
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
|
||||
.field private b:Z
|
||||
|
||||
.field private d:Z
|
||||
|
||||
# direct methods
|
||||
.method static constructor <clinit>()V
|
||||
@@ -177,6 +178,26 @@
|
||||
.method public final b(Lorg/json/JSONObject;)Lcom/vk/dto/common/VerifyInfo;
|
||||
.locals 3
|
||||
|
||||
invoke-static {p1}, Lru/vtosters/lite/f0x1d/VTVerifications;->isVerified(Lorg/json/JSONObject;)Z
|
||||
|
||||
move-result v1
|
||||
|
||||
iput-boolean v1, p0, Lcom/vk/dto/common/VerifyInfo;->a:Z
|
||||
|
||||
invoke-static {p1}, Lru/vtosters/lite/f0x1d/VTVerifications;->hasPrometheus(Lorg/json/JSONObject;)Z
|
||||
|
||||
move-result v0
|
||||
|
||||
iput-boolean v0, p0, Lcom/vk/dto/common/VerifyInfo;->b:Z
|
||||
|
||||
invoke-static {p1}, Lru/vtosters/lite/f0x1d/VTVerifications;->hasDeveloper(Lorg/json/JSONObject;)Z
|
||||
|
||||
move-result v0
|
||||
|
||||
iput-boolean v0, p0, Lcom/vk/dto/common/VerifyInfo;->d:Z
|
||||
|
||||
return-object p0
|
||||
|
||||
const/4 v0, 0x0
|
||||
|
||||
const-string v1, "verified"
|
||||
@@ -268,6 +289,15 @@
|
||||
return v0
|
||||
.end method
|
||||
|
||||
.method public final dev()Z
|
||||
.locals 1
|
||||
|
||||
.line 1
|
||||
iget-boolean v0, p0, Lcom/vk/dto/common/VerifyInfo;->d:Z
|
||||
|
||||
return v0
|
||||
.end method
|
||||
|
||||
.method public final v1()Z
|
||||
.locals 3
|
||||
|
||||
|
||||
@@ -1465,10 +1465,69 @@
|
||||
|
||||
if-eqz p1, :cond_1
|
||||
|
||||
invoke-interface {p1}, Lcom/vk/im/engine/models/Profile;->U()Z
|
||||
invoke-interface {p1}, Lcom/vk/im/engine/models/Profile;->f0()I
|
||||
|
||||
move-result p2
|
||||
|
||||
invoke-static {p2}, Lru/vtosters/lite/f0x1d/VTVerifications;->isVerified(I)Z
|
||||
|
||||
move-result p2
|
||||
|
||||
if-eqz p2, :cond_45
|
||||
|
||||
.line 181
|
||||
invoke-static {}, Lru/vtosters/lite/f0x1d/VTVerifications;->vtverif()Z
|
||||
|
||||
move-result p2
|
||||
|
||||
if-eqz p2, :cond_45
|
||||
|
||||
invoke-interface {p1}, Lcom/vk/im/engine/models/Profile;->f0()I
|
||||
|
||||
move-result p2
|
||||
|
||||
invoke-static {p2}, Lru/vtosters/lite/f0x1d/VTVerifications;->isVerified(I)Z
|
||||
|
||||
move-result v0
|
||||
|
||||
goto :goto_51
|
||||
|
||||
:cond_45
|
||||
|
||||
invoke-interface {p1}, Lcom/vk/im/engine/models/Profile;->L()I
|
||||
|
||||
move-result p2
|
||||
|
||||
invoke-static {p2}, Lru/vtosters/lite/f0x1d/VTVerifications;->isVerified(I)Z
|
||||
|
||||
move-result p2
|
||||
|
||||
if-eqz p2, :cond_4d
|
||||
|
||||
.line 181
|
||||
invoke-static {}, Lru/vtosters/lite/f0x1d/VTVerifications;->vtverif()Z
|
||||
|
||||
move-result p2
|
||||
|
||||
if-eqz p2, :cond_4d
|
||||
|
||||
invoke-interface {p1}, Lcom/vk/im/engine/models/Profile;->L()I
|
||||
|
||||
move-result p2
|
||||
|
||||
invoke-static {p2}, Lru/vtosters/lite/f0x1d/VTVerifications;->isVerified(I)Z
|
||||
|
||||
move-result v0
|
||||
|
||||
goto :goto_51
|
||||
|
||||
:cond_4d
|
||||
|
||||
|
||||
.line 177
|
||||
:cond_51
|
||||
:goto_51
|
||||
|
||||
.line 5
|
||||
:cond_1
|
||||
iget-object p1, p0, Lcom/vk/im/ui/components/dialogs_list/vc_impl/VhDialog;->a:Lcom/vk/im/ui/views/dialogs/DialogItemView;
|
||||
|
||||
+57
@@ -125,6 +125,63 @@
|
||||
|
||||
if-eqz p1, :cond_1
|
||||
|
||||
invoke-interface {p1}, Lcom/vk/im/engine/models/Profile;->L()I
|
||||
|
||||
move-result p2
|
||||
|
||||
invoke-static {p2}, Lru/vtosters/lite/f0x1d/VTVerifications;->isVerified(I)Z
|
||||
|
||||
move-result p2
|
||||
|
||||
if-eqz p2, :cond_45
|
||||
|
||||
.line 181
|
||||
invoke-static {}, Lru/vtosters/lite/f0x1d/VTVerifications;->vtverif()Z
|
||||
|
||||
move-result p2
|
||||
|
||||
if-eqz p2, :cond_45
|
||||
|
||||
invoke-interface {p1}, Lcom/vk/im/engine/models/Profile;->L()I
|
||||
|
||||
move-result p2
|
||||
|
||||
invoke-static {p2}, Lru/vtosters/lite/f0x1d/VTVerifications;->isVerified(I)Z
|
||||
|
||||
move-result v0
|
||||
|
||||
goto :goto_0
|
||||
|
||||
:cond_45
|
||||
|
||||
invoke-interface {p1}, Lcom/vk/im/engine/models/Profile;->f0()I
|
||||
|
||||
move-result p2
|
||||
|
||||
invoke-static {p2}, Lru/vtosters/lite/f0x1d/VTVerifications;->isVerified(I)Z
|
||||
|
||||
move-result p2
|
||||
|
||||
if-eqz p2, :cond_4d
|
||||
|
||||
.line 181
|
||||
invoke-static {}, Lru/vtosters/lite/f0x1d/VTVerifications;->vtverif()Z
|
||||
|
||||
move-result p2
|
||||
|
||||
if-eqz p2, :cond_4d
|
||||
|
||||
invoke-interface {p1}, Lcom/vk/im/engine/models/Profile;->f0()I
|
||||
|
||||
move-result p2
|
||||
|
||||
invoke-static {p2}, Lru/vtosters/lite/f0x1d/VTVerifications;->isVerified(I)Z
|
||||
|
||||
move-result v0
|
||||
|
||||
goto :goto_0
|
||||
|
||||
:cond_4d
|
||||
invoke-interface {p1}, Lcom/vk/im/engine/models/Profile;->U()Z
|
||||
|
||||
move-result v0
|
||||
|
||||
@@ -358,6 +358,10 @@
|
||||
.line 1
|
||||
invoke-super {p0, p1}, Lcom/vk/navigation/NavigationDelegateActivity;->onCreate(Landroid/os/Bundle;)V
|
||||
|
||||
invoke-static {p0}, Lru/vtosters/lite/f0x1d/Crashreporter;->init(Landroid/app/Activity;)V
|
||||
|
||||
invoke-static {p0}, Lru/vtosters/lite/f0x1d/VTVerifications;->load(Landroid/content/Context;)V
|
||||
|
||||
.line 2
|
||||
invoke-virtual {p0}, Landroid/app/Activity;->isTaskRoot()Z
|
||||
|
||||
@@ -413,6 +417,8 @@
|
||||
|
||||
.line 7
|
||||
:cond_0
|
||||
invoke-static {p0}, Lru/vtosters/lite/utils/Globals;->MainActivityInit(Landroid/app/Activity;)V
|
||||
|
||||
invoke-virtual {p0}, Landroid/app/Activity;->getWindow()Landroid/view/Window;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
Reference in New Issue
Block a user