VKID Protection alert
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
package ru.vtosters.lite.ui.dialogs;
|
||||
|
||||
import static ru.vtosters.lite.utils.Globals.edit;
|
||||
import static ru.vtosters.lite.utils.Globals.getString;
|
||||
import static ru.vtosters.lite.utils.Preferences.getBoolValue;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.content.Intent;
|
||||
|
||||
import com.vk.navigation.Navigator;
|
||||
import com.vk.webapp.VKConnect;
|
||||
|
||||
public class VKIDProtection {
|
||||
public static void alert(final Activity activity) {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(activity);
|
||||
builder.setTitle(getString("debug_warning"));
|
||||
builder.setMessage(getString("vkidsumm"));
|
||||
builder.setCancelable(false);
|
||||
// android.content.DialogInterface.OnClickListener
|
||||
builder.setPositiveButton(getString("startbtn2"), (dialogInterface, i) -> edit().putBoolean("showAlertVkId", false).apply());
|
||||
// android.content.DialogInterface.OnClickListener
|
||||
builder.setNeutralButton(getString("vkiddisable"), (dialogInterface, i) -> {
|
||||
edit().putBoolean("showAlertVkId", false).apply();
|
||||
Intent a2 = new Navigator(VKConnect.class).a(activity);
|
||||
activity.startActivity(a2);
|
||||
});
|
||||
if (getBoolValue("showAlertVkId", true)) {
|
||||
builder.show();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -47,7 +47,6 @@ import java.io.InputStream;
|
||||
import java.lang.reflect.Method;
|
||||
import java.net.URL;
|
||||
import java.net.URLConnection;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
@@ -57,6 +56,7 @@ import ru.vtosters.lite.ui.dialogs.DisableBattery;
|
||||
import ru.vtosters.lite.ui.dialogs.InstallGMS;
|
||||
import ru.vtosters.lite.ui.dialogs.OTADialog;
|
||||
import ru.vtosters.lite.ui.dialogs.Start;
|
||||
import ru.vtosters.lite.ui.dialogs.VKIDProtection;
|
||||
|
||||
public class Globals {
|
||||
private static final List<Activity> activities = new ArrayList<>();
|
||||
@@ -66,12 +66,13 @@ public class Globals {
|
||||
return preferences;
|
||||
}
|
||||
|
||||
public static void MainActivityInit(Activity activity) throws PackageManager.NameNotFoundException, NoSuchAlgorithmException{
|
||||
public static void MainActivityInit(Activity activity){
|
||||
if(checkupdates())
|
||||
OTADialog.checkUpdates(activity);
|
||||
Start.alert(activity);
|
||||
InstallGMS.alert(activity);
|
||||
DisableBattery.alert(activity);
|
||||
VKIDProtection.alert(activity);
|
||||
}
|
||||
|
||||
public static void componentSwitcher(String component, Boolean enabled) {
|
||||
|
||||
@@ -4439,6 +4439,9 @@
|
||||
<string name="startbtn1">Новости</string>
|
||||
<string name="startbtn2">Продолжить</string>
|
||||
|
||||
<string name="vkiddisable">Отключить защиту</string>
|
||||
<string name="vkidsumm">ВКонтакте начали блокировать использование сторонних приложений, поэтому для стабильной работы всех разделов приложения необходимо отключить Защиту от подозрительных приложений \n\n VK ID -> Безопасность и вход -> Защита от подозрительных приложений</string>
|
||||
|
||||
<string name="videodownloaderr">Данное видео невозможно скачать</string>
|
||||
|
||||
<string name="roundedmsgs">Круглые сообщения</string>
|
||||
|
||||
@@ -4620,6 +4620,8 @@ May look like a fake leaving the online"</string>
|
||||
<string name="downloaderr">Download error</string>
|
||||
<string name="onlineNull">Online is hidden</string>
|
||||
|
||||
<string name="vkiddisable">Disable protection</string>
|
||||
<string name="vkidsumm">VK has started blocking the use of third-party applications, so for the stable operation of all parts of the application, it is necessary to disable Protection from suspicious applications \n\n VK ID -> Security and Login -> Protection from suspicious applications</string>
|
||||
|
||||
<item type="string" name="APKTOOL_DUMMY_10be" />
|
||||
<item type="string" name="APKTOOL_DUMMY_10bf" />
|
||||
|
||||
@@ -96,6 +96,13 @@
|
||||
|
||||
move-result p2
|
||||
|
||||
.line 180
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Themes;->getTextAttr()I
|
||||
|
||||
move-result v1
|
||||
|
||||
invoke-virtual {p1, v1}, Landroid/widget/TextView;->setTextColor(I)V
|
||||
|
||||
invoke-virtual {p1, p2}, Landroid/widget/TextView;->setText(I)V
|
||||
|
||||
return-void
|
||||
|
||||
Reference in New Issue
Block a user