Oh sh*t I am sorry (for refactoring)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package bruhcollective.itaysonlab.libvkx.client;
|
||||
|
||||
import static ru.vtosters.lite.utils.Helper.getContext;
|
||||
import static ru.vtosters.lite.utils.Globals.getContext;
|
||||
import static ru.vtosters.lite.utils.Preferences.BooleanFalse;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.RemoteException;
|
||||
@@ -14,7 +15,6 @@ import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import bruhcollective.itaysonlab.libvkx.ILibVkxService;
|
||||
import ru.vtosters.lite.utils.Prefs;
|
||||
|
||||
public class LibVKXClient {
|
||||
private static LibVKXClientImpl impl;
|
||||
@@ -36,7 +36,7 @@ public class LibVKXClient {
|
||||
}
|
||||
|
||||
public static boolean isIntegrationEnabled() {
|
||||
return Prefs.BooleanFalse("libvkx_integration") && isVkxInstalled();
|
||||
return BooleanFalse("libvkx_integration") && isVkxInstalled();
|
||||
}
|
||||
|
||||
public static boolean play(MusicTrack musicTrack, List<MusicTrack> list, PlayerRefer playerRefer) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package bruhcollective.itaysonlab.libvkx.client;
|
||||
|
||||
import static ru.vtosters.lite.utils.Helper.getUserId;
|
||||
import static ru.vtosters.lite.utils.Globals.getUserId;
|
||||
|
||||
import android.content.ComponentName;
|
||||
import android.content.Context;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.aefyr.tsg.g2;
|
||||
|
||||
import static ru.vtosters.lite.utils.Helper.getContext;
|
||||
import static ru.vtosters.lite.utils.Globals.getContext;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package ru.f0x1d.net;
|
||||
|
||||
import static ru.vtosters.lite.utils.Helper.getUserToken;
|
||||
import static ru.vtosters.lite.utils.Globals.getUserToken;
|
||||
|
||||
import android.os.AsyncTask;
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import static ru.vtosters.lite.dnr.DNRModule.hookDNR;
|
||||
import static ru.vtosters.lite.dnr.DNRModule.hookDNT;
|
||||
import static ru.vtosters.lite.dnr.DNRModule.isDnrEnabledFor;
|
||||
import static ru.vtosters.lite.dnr.DNRModule.isDntEnabledFor;
|
||||
import static ru.vtosters.lite.utils.Helper.getIdentifier;
|
||||
import static ru.vtosters.lite.utils.Globals.getIdentifier;
|
||||
|
||||
import com.vk.im.engine.models.dialogs.Dialog;
|
||||
import com.vk.im.ui.components.common.DialogAction;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package ru.vtosters.lite.dnr;
|
||||
|
||||
import static ru.f0x1d.net.F0x1dRequest.makeRequest;
|
||||
import static ru.vtosters.lite.utils.Helper.getUserToken;
|
||||
import static ru.vtosters.lite.utils.Globals.getUserToken;
|
||||
import static ru.vtosters.lite.utils.Proxy.getApiCom;
|
||||
|
||||
import com.vk.core.util.ToastUtils;
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package ru.vtosters.lite.dnr;
|
||||
|
||||
import ru.vtosters.lite.utils.Prefs;
|
||||
import static ru.vtosters.lite.utils.Preferences.BooleanFalse;
|
||||
|
||||
public class DNRPrefs {
|
||||
public static boolean getStoriesRead() {
|
||||
return Prefs.BooleanFalse("read_s");
|
||||
return BooleanFalse("read_s");
|
||||
}
|
||||
|
||||
public static boolean getMarkAsReadWithoutExceptions(int peerId) {
|
||||
@@ -28,27 +28,27 @@ public class DNRPrefs {
|
||||
}
|
||||
|
||||
public static boolean readPM(int peer) {
|
||||
return (peer > 0 && peer < 2000000000) && Prefs.BooleanFalse("read_pm");
|
||||
return (peer > 0 && peer < 2000000000) && BooleanFalse("read_pm");
|
||||
}
|
||||
|
||||
public static boolean readConversations(int peer) {
|
||||
return (peer > 2000000000) && Prefs.BooleanFalse("read_conversations");
|
||||
return (peer > 2000000000) && BooleanFalse("read_conversations");
|
||||
}
|
||||
|
||||
public static boolean readBots(int peer) {
|
||||
return (peer < 0) && Prefs.BooleanFalse("read_bot");
|
||||
return (peer < 0) && BooleanFalse("read_bot");
|
||||
}
|
||||
|
||||
public static boolean writePM(int peer) {
|
||||
return (peer > 0 && peer < 2000000000) && Prefs.BooleanFalse("write_pm");
|
||||
return (peer > 0 && peer < 2000000000) && BooleanFalse("write_pm");
|
||||
}
|
||||
|
||||
public static boolean writeConversations(int peer) {
|
||||
return (peer > 2000000000) && Prefs.BooleanFalse("write_conversations");
|
||||
return (peer > 2000000000) && BooleanFalse("write_conversations");
|
||||
}
|
||||
|
||||
public static boolean writeBots(int peer) {
|
||||
return (peer < 0) && Prefs.BooleanFalse("write_bot");
|
||||
return (peer < 0) && BooleanFalse("write_bot");
|
||||
}
|
||||
|
||||
public static boolean getActivityWithoutExceptions(int peerId) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package ru.vtosters.lite.dnr.helpers;
|
||||
|
||||
import static ru.vtosters.lite.utils.Helper.getContext;
|
||||
import static ru.vtosters.lite.utils.Globals.getContext;
|
||||
|
||||
import android.content.ContentValues;
|
||||
import android.database.Cursor;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package ru.vtosters.lite.dnr.helpers;
|
||||
|
||||
import static ru.vtosters.lite.utils.Helper.getContext;
|
||||
import static ru.vtosters.lite.utils.Globals.getContext;
|
||||
|
||||
import android.content.ContentValues;
|
||||
import android.database.Cursor;
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package ru.vtosters.lite.f0x1d;
|
||||
|
||||
import static ru.vtosters.lite.utils.Helper.getContext;
|
||||
import static ru.vtosters.lite.utils.About.*;
|
||||
import static ru.vtosters.lite.utils.Globals.*;
|
||||
import static ru.vtosters.lite.utils.Preferences.*;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.Notification;
|
||||
@@ -19,7 +21,6 @@ import java.io.PrintWriter;
|
||||
import java.io.StringWriter;
|
||||
|
||||
import ru.vtosters.lite.badmanners.DeviceInfoCollector;
|
||||
import ru.vtosters.lite.utils.Prefs;
|
||||
|
||||
public class Crashreporter {
|
||||
protected static String logString;
|
||||
@@ -36,7 +37,7 @@ public class Crashreporter {
|
||||
}
|
||||
|
||||
static void start(Thread.UncaughtExceptionHandler uncaughtExceptionHandler, Thread thread, Throwable th, Activity activity) {
|
||||
logString = getStackTrace(th) + "\n\n" + new DeviceInfoCollector().collect(getContext()).toDeviceName() + "\n VTL Version: " + Prefs.VERSIONNAME + ", build: " + Prefs.getBuildNumber();
|
||||
logString = getStackTrace(th) + "\n\n" + new DeviceInfoCollector().collect(getContext()).toDeviceName() + "\n VTL Version: " + VERSIONNAME + ", build: " + getBuildNumber();
|
||||
if (Build.VERSION.SDK_INT >= 26) {
|
||||
var notificationChannel = new NotificationChannel("crashes", "crash", NotificationManager.IMPORTANCE_DEFAULT);
|
||||
notificationChannel.enableVibration(true);
|
||||
|
||||
@@ -2,7 +2,7 @@ package ru.vtosters.lite.f0x1d;
|
||||
|
||||
import static android.widget.Toast.LENGTH_SHORT;
|
||||
import static android.widget.Toast.makeText;
|
||||
import static ru.vtosters.lite.utils.Helper.getContext;
|
||||
import static ru.vtosters.lite.utils.Globals.getContext;
|
||||
|
||||
import android.app.NotificationManager;
|
||||
import android.app.Service;
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package ru.vtosters.lite.f0x1d;
|
||||
|
||||
import static ru.vtosters.lite.utils.Preferences.BooleanTrue;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.util.Base64;
|
||||
@@ -24,7 +26,6 @@ import okhttp3.OkHttpClient;
|
||||
import okhttp3.Request;
|
||||
import okhttp3.RequestBody;
|
||||
import okhttp3.Response;
|
||||
import ru.vtosters.lite.utils.Prefs;
|
||||
|
||||
public class VTVerifications {
|
||||
public static final HashMap<Integer, Boolean> sServiceAccountsMap = new HashMap<>();
|
||||
@@ -135,7 +136,7 @@ public class VTVerifications {
|
||||
if (jSONObject.optInt("verified", 0) == 1) {
|
||||
return true;
|
||||
}
|
||||
if (!Prefs.BooleanTrue("VT_Verification")) {
|
||||
if (!BooleanTrue("VT_Verification")) {
|
||||
return false;
|
||||
}
|
||||
return isVerified((jSONObject.optString(NavigatorKeys.j) == null || (!jSONObject.optString(NavigatorKeys.j).equals("group") && !jSONObject.optString(NavigatorKeys.j).equals("page"))) ? jSONObject.optInt("id", 0) : -jSONObject.optInt("id", 0));
|
||||
@@ -145,14 +146,14 @@ public class VTVerifications {
|
||||
if (jSONObject.optInt("trending", 0) == 1) {
|
||||
return true;
|
||||
}
|
||||
if (!Prefs.BooleanTrue("VT_Fire")) {
|
||||
if (!BooleanTrue("VT_Fire")) {
|
||||
return false;
|
||||
}
|
||||
return hasPrometheus((jSONObject.optString(NavigatorKeys.j) == null || (!jSONObject.optString(NavigatorKeys.j).equals("group") && !jSONObject.optString(NavigatorKeys.j).equals("page"))) ? jSONObject.optInt("id", 0) : -jSONObject.optInt("id", 0));
|
||||
}
|
||||
|
||||
public static boolean hasDeveloper(JSONObject jSONObject) {
|
||||
if (!Prefs.BooleanTrue("VT_Dev")) {
|
||||
if (!BooleanTrue("VT_Dev")) {
|
||||
return false;
|
||||
}
|
||||
return isDeveloper((jSONObject.optString(NavigatorKeys.j) == null || (!jSONObject.optString(NavigatorKeys.j).equals("group") && !jSONObject.optString(NavigatorKeys.j).equals("page"))) ? jSONObject.optInt("id", 0) : -jSONObject.optInt("id", 0));
|
||||
|
||||
@@ -2,8 +2,9 @@ package ru.vtosters.lite.foaf;
|
||||
|
||||
import static android.widget.Toast.LENGTH_SHORT;
|
||||
import static android.widget.Toast.makeText;
|
||||
import static ru.vtosters.lite.utils.Helper.getString;
|
||||
import static ru.vtosters.lite.utils.Globals.getString;
|
||||
import static ru.vtosters.lite.utils.Proxy.getApiCom;
|
||||
import static ru.vtosters.lite.utils.Proxy.proxy;
|
||||
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.Context;
|
||||
@@ -26,7 +27,7 @@ import java.util.regex.Pattern;
|
||||
import okhttp3.OkHttpClient;
|
||||
import okhttp3.Request;
|
||||
import ru.f0x1d.net.F0x1dRequest;
|
||||
import ru.vtosters.lite.utils.Prefs;
|
||||
import ru.vtosters.lite.utils.Preferences;
|
||||
|
||||
public class FoafBase {
|
||||
private static final Pattern FOAF_REGEX = Pattern.compile("<ya:created dc:date=\"(.+?)\"\\/>");
|
||||
@@ -49,7 +50,7 @@ public class FoafBase {
|
||||
private static String getLink(int i) {
|
||||
String str;
|
||||
StringBuilder sb;
|
||||
if (Prefs.proxy()) {
|
||||
if (proxy()) {
|
||||
sb = new StringBuilder();
|
||||
str = "https://" + getApiCom() + "/_/vk.com/foaf.php?id=";
|
||||
} else {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package ru.vtosters.lite.tgs;
|
||||
|
||||
import static ru.vtosters.lite.utils.Helper.getContext;
|
||||
import static ru.vtosters.lite.utils.Globals.getContext;
|
||||
|
||||
import android.content.SharedPreferences;
|
||||
import android.preference.PreferenceManager;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package ru.vtosters.lite.tgs;
|
||||
|
||||
import static ru.vtosters.lite.utils.Helper.getContext;
|
||||
import static ru.vtosters.lite.utils.Helper.getString;
|
||||
import static ru.vtosters.lite.utils.Globals.getContext;
|
||||
import static ru.vtosters.lite.utils.Globals.getString;
|
||||
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapFactory;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package ru.vtosters.lite.ui;
|
||||
|
||||
import static ru.vtosters.lite.utils.Helper.convertDpToPixel;
|
||||
import static ru.vtosters.lite.utils.Helper.getContext;
|
||||
import static ru.vtosters.lite.utils.Globals.convertDpToPixel;
|
||||
import static ru.vtosters.lite.utils.Globals.getContext;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.content.Context;
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
package ru.vtosters.lite.ui.dialogs;
|
||||
|
||||
import static ru.vtosters.lite.utils.Helper.edit;
|
||||
import static ru.vtosters.lite.utils.Helper.getContext;
|
||||
import static ru.vtosters.lite.utils.Globals.edit;
|
||||
import static ru.vtosters.lite.utils.Globals.getContext;
|
||||
import static ru.vtosters.lite.utils.Preferences.BooleanTrue;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
@@ -13,11 +14,10 @@ import android.os.Build;
|
||||
import android.os.PowerManager;
|
||||
|
||||
import ru.vtosters.lite.utils.OEMDetector;
|
||||
import ru.vtosters.lite.utils.Prefs;
|
||||
|
||||
public class DisableBattery {
|
||||
public static void alert(Activity activity) {
|
||||
if (OEMDetector.isOEM() && Build.VERSION.SDK_INT >= 23 && Prefs.BooleanTrue("showDoze")) {
|
||||
if (OEMDetector.isOEM() && Build.VERSION.SDK_INT >= 23 && BooleanTrue("showDoze")) {
|
||||
final Context context = getContext();
|
||||
if (!((PowerManager) context.getSystemService(Context.POWER_SERVICE)).isIgnoringBatteryOptimizations(context.getPackageName())) {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(activity);
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
package ru.vtosters.lite.ui.dialogs;
|
||||
|
||||
import static ru.vtosters.lite.utils.Helper.edit;
|
||||
import static ru.vtosters.lite.utils.Helper.getContext;
|
||||
import static ru.vtosters.lite.utils.Helper.isGmsInstalled;
|
||||
import static ru.vtosters.lite.utils.Globals.edit;
|
||||
import static ru.vtosters.lite.utils.Globals.getContext;
|
||||
import static ru.vtosters.lite.utils.Globals.isGmsInstalled;
|
||||
import static ru.vtosters.lite.utils.Preferences.BooleanTrue;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
@@ -13,7 +14,6 @@ import android.content.Intent;
|
||||
import com.vk.navigation.Navigator;
|
||||
|
||||
import ru.vtosters.lite.ui.fragments.InstallGMSFragment;
|
||||
import ru.vtosters.lite.utils.Prefs;
|
||||
|
||||
public class InstallGMS {
|
||||
public static void alert(final Activity activity) {
|
||||
@@ -39,7 +39,7 @@ public class InstallGMS {
|
||||
context.startActivity(a2);
|
||||
}
|
||||
});
|
||||
if (Prefs.BooleanTrue("showAlertGms")) {
|
||||
if (BooleanTrue("showAlertGms")) {
|
||||
builder.show();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package ru.vtosters.lite.ui.dialogs;
|
||||
|
||||
import static ru.vtosters.lite.utils.Helper.edit;
|
||||
import static ru.vtosters.lite.utils.Globals.edit;
|
||||
import static ru.vtosters.lite.utils.Preferences.BooleanTrue;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
@@ -10,7 +11,6 @@ import android.net.Uri;
|
||||
import android.os.Build;
|
||||
|
||||
import ru.vtosters.lite.utils.OEMDetector;
|
||||
import ru.vtosters.lite.utils.Prefs;
|
||||
|
||||
public class Start {
|
||||
public static void alert(final Activity activity) {
|
||||
@@ -36,7 +36,7 @@ public class Start {
|
||||
activity.startActivity(new Intent("android.intent.action.VIEW").setData(Uri.parse("https://t.me/vtosters")));
|
||||
}
|
||||
});
|
||||
if (Prefs.BooleanTrue("showAlert")) {
|
||||
if (BooleanTrue("showAlert")) {
|
||||
builder.show();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package ru.vtosters.lite.ui.fragments;
|
||||
|
||||
import static ru.vtosters.lite.utils.Helper.getString;
|
||||
import static ru.vtosters.lite.utils.Globals.getString;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.preference.Preference;
|
||||
|
||||
@@ -2,10 +2,10 @@ package ru.vtosters.lite.ui.fragments;
|
||||
|
||||
import static android.widget.Toast.LENGTH_SHORT;
|
||||
import static android.widget.Toast.makeText;
|
||||
import static ru.vtosters.lite.utils.Helper.getContext;
|
||||
import static ru.vtosters.lite.utils.Helper.getString;
|
||||
import static ru.vtosters.lite.utils.Helper.getUserToken;
|
||||
import static ru.vtosters.lite.utils.Helper.restartApplication;
|
||||
import static ru.vtosters.lite.utils.Globals.getContext;
|
||||
import static ru.vtosters.lite.utils.Globals.getString;
|
||||
import static ru.vtosters.lite.utils.Globals.getUserToken;
|
||||
import static ru.vtosters.lite.utils.Globals.restartApplication;
|
||||
import static ru.vtosters.lite.utils.SettBackup.backupSettings;
|
||||
import static ru.vtosters.lite.utils.SettBackup.deletePrefs;
|
||||
import static ru.vtosters.lite.utils.SettBackup.restoreBackup;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package ru.vtosters.lite.ui.fragments;
|
||||
|
||||
import static ru.vtosters.lite.utils.Helper.getString;
|
||||
import static ru.vtosters.lite.utils.Globals.getString;
|
||||
import static ru.vtosters.lite.utils.IconHelper.switchToDefault;
|
||||
import static ru.vtosters.lite.utils.IconHelper.switchToVK;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package ru.vtosters.lite.ui.fragments.dockbar;
|
||||
|
||||
import static ru.vtosters.lite.utils.Helper.convertDpToPixel;
|
||||
import static ru.vtosters.lite.utils.Helper.getContext;
|
||||
import static ru.vtosters.lite.utils.Globals.convertDpToPixel;
|
||||
import static ru.vtosters.lite.utils.Globals.getContext;
|
||||
|
||||
import android.content.res.ColorStateList;
|
||||
import android.graphics.Typeface;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package ru.vtosters.lite.ui.fragments.dockbar;
|
||||
|
||||
import static ru.vtosters.lite.utils.Helper.convertDpToPixel;
|
||||
import static ru.vtosters.lite.utils.Helper.restartApplication;
|
||||
import static ru.vtosters.lite.utils.Globals.convertDpToPixel;
|
||||
import static ru.vtosters.lite.utils.Globals.restartApplication;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.widget.LinearLayoutManager;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package ru.vtosters.lite.ui.fragments.dockbar;
|
||||
|
||||
import static ru.vtosters.lite.utils.Helper.getContext;
|
||||
import static ru.vtosters.lite.utils.Globals.getContext;
|
||||
|
||||
import android.content.res.ColorStateList;
|
||||
import android.graphics.drawable.Drawable;
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package ru.vtosters.lite.ui.fragments.dockbar;
|
||||
|
||||
import static ru.vtosters.lite.utils.Helper.getContext;
|
||||
import static ru.vtosters.lite.utils.Globals.getContext;
|
||||
import static ru.vtosters.lite.utils.Preferences.newfeed;
|
||||
import static ru.vtosters.lite.utils.Preferences.olddock;
|
||||
|
||||
import com.vk.apps.AppsFragment;
|
||||
import com.vk.discover.DiscoverFeedFragment;
|
||||
@@ -42,8 +44,6 @@ import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import ru.vtosters.lite.utils.Prefs;
|
||||
|
||||
public class DockBarManager {
|
||||
public static final int MIN_SELECTED_TABS_LIMIT = 3;
|
||||
public static final int MAX_SELECTED_TABS_LIMIT = 9;
|
||||
@@ -79,11 +79,11 @@ public class DockBarManager {
|
||||
File dockbar = new File(getContext().getFilesDir(), "dockbar.json");
|
||||
|
||||
if (!dockbar.exists()) {
|
||||
mSelectedTabs.add(new DockBarTab("tab_news", Prefs.olddock() ? R.drawable.ic_newsfeed_28 : R.drawable.ic_menu_newsfeed_outline_28, R.string.newsfeed, R.id.tab_news, Prefs.isUseAlternativeFragments() ? Feed2049.b.c() : NewsfeedFragment.class));
|
||||
mSelectedTabs.add(new DockBarTab("tab_discover", Prefs.olddock() ? R.drawable.ic_search_28 : R.drawable.ic_menu_search_outline_28, R.string.search, R.id.tab_discover, Prefs.isUseAlternativeFragments() ? DiscoverFragment.class : DiscoverFeedFragment.class));
|
||||
mSelectedTabs.add(new DockBarTab("tab_messages", Prefs.olddock() ? R.drawable.ic_menu_messages_28 : R.drawable.ic_message_28_outline, R.string.messages, R.id.tab_messages, DialogsFragment.class));
|
||||
mSelectedTabs.add(new DockBarTab("tab_feedback", Prefs.olddock() ? R.drawable.ic_menu_notifications_28 : R.drawable.ic_menu_notification_outline_28, R.string.feedback, R.id.tab_feedback, NotificationsContainerFragment.class));
|
||||
mSelectedTabs.add(new DockBarTab("tab_menu", Prefs.olddock() ? R.drawable.ic_menu_more_28 : R.drawable.ic_menu_more_outline_28, R.string.menu, R.id.tab_menu, MenuFragment.class));
|
||||
mSelectedTabs.add(new DockBarTab("tab_news", olddock() ? R.drawable.ic_newsfeed_28 : R.drawable.ic_menu_newsfeed_outline_28, R.string.newsfeed, R.id.tab_news, newfeed() ? Feed2049.b.c() : NewsfeedFragment.class));
|
||||
mSelectedTabs.add(new DockBarTab("tab_discover", olddock() ? R.drawable.ic_search_28 : R.drawable.ic_menu_search_outline_28, R.string.search, R.id.tab_discover, newfeed() ? DiscoverFragment.class : DiscoverFeedFragment.class));
|
||||
mSelectedTabs.add(new DockBarTab("tab_messages", olddock() ? R.drawable.ic_menu_messages_28 : R.drawable.ic_message_28_outline, R.string.messages, R.id.tab_messages, DialogsFragment.class));
|
||||
mSelectedTabs.add(new DockBarTab("tab_feedback", olddock() ? R.drawable.ic_menu_notifications_28 : R.drawable.ic_menu_notification_outline_28, R.string.feedback, R.id.tab_feedback, NotificationsContainerFragment.class));
|
||||
mSelectedTabs.add(new DockBarTab("tab_menu", olddock() ? R.drawable.ic_menu_more_28 : R.drawable.ic_menu_more_outline_28, R.string.menu, R.id.tab_menu, MenuFragment.class));
|
||||
|
||||
mDisabledTabs.add(new DockBarTab("tab_friends", R.drawable.ic_user_24, R.string.friends, R.id.menu_friends, FriendsFragment.class));
|
||||
mDisabledTabs.add(new DockBarTab("tab_groups", R.drawable.ic_users_24, R.string.groups, R.id.menu_groups, GroupsFragment.class));
|
||||
@@ -115,7 +115,7 @@ public class DockBarManager {
|
||||
item.getInt("id"),
|
||||
Class.forName(item.getString("fragmentClass"))
|
||||
);
|
||||
if (Prefs.isUseAlternativeFragments()) {
|
||||
if (newfeed()) {
|
||||
if (tab.fragmentClass == NewsfeedFragment.class) {
|
||||
tab.fragmentClass = Feed2049.b.c();
|
||||
} else if (tab.fragmentClass == DiscoverFeedFragment.class) {
|
||||
@@ -141,7 +141,7 @@ public class DockBarManager {
|
||||
item.getInt("id"),
|
||||
Class.forName(item.getString("fragmentClass"))
|
||||
);
|
||||
if (Prefs.isUseAlternativeFragments()) {
|
||||
if (newfeed()) {
|
||||
if (tab.fragmentClass == NewsfeedFragment.class) {
|
||||
tab.fragmentClass = Feed2049.b.c();
|
||||
} else if (tab.fragmentClass == DiscoverFeedFragment.class) {
|
||||
|
||||
+4
-4
@@ -1,9 +1,9 @@
|
||||
package ru.vtosters.lite.ui.fragments.multiaccount;
|
||||
|
||||
import static ru.vtosters.lite.utils.Helper.convertDpToPixel;
|
||||
import static ru.vtosters.lite.utils.Helper.getResources;
|
||||
import static ru.vtosters.lite.utils.Helper.isNetworkConnected;
|
||||
import static ru.vtosters.lite.utils.Helper.restartApplication;
|
||||
import static ru.vtosters.lite.utils.Globals.convertDpToPixel;
|
||||
import static ru.vtosters.lite.utils.Globals.getResources;
|
||||
import static ru.vtosters.lite.utils.Globals.isNetworkConnected;
|
||||
import static ru.vtosters.lite.utils.Globals.restartApplication;
|
||||
import static ru.vtosters.lite.utils.Themes.getTextAttr;
|
||||
import static ru.vtosters.lite.utils.Themes.recolorDrawable;
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
package ru.vtosters.lite.ui.fragments.multiaccount;
|
||||
|
||||
import static ru.vtosters.lite.utils.Helper.getString;
|
||||
import static ru.vtosters.lite.utils.Globals.getString;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.widget.LinearLayoutManager;
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
package ru.vtosters.lite.ui.fragments.multiaccount;
|
||||
|
||||
import static ru.vtosters.lite.utils.Helper.getContext;
|
||||
import static ru.vtosters.lite.utils.Helper.getPreferences;
|
||||
import static ru.vtosters.lite.utils.Globals.getContext;
|
||||
import static ru.vtosters.lite.utils.Globals.getPreferences;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
|
||||
@@ -2,12 +2,13 @@ package ru.vtosters.lite.ui.fragments.tgstickers;
|
||||
|
||||
import static android.widget.Toast.LENGTH_SHORT;
|
||||
import static android.widget.Toast.makeText;
|
||||
import static ru.vtosters.lite.utils.Helper.convertDpToPixel;
|
||||
import static ru.vtosters.lite.utils.Helper.getContext;
|
||||
import static ru.vtosters.lite.utils.Helper.getIdentifier;
|
||||
import static ru.vtosters.lite.utils.Helper.getResources;
|
||||
import static ru.vtosters.lite.utils.Helper.getString;
|
||||
import static ru.vtosters.lite.utils.Globals.convertDpToPixel;
|
||||
import static ru.vtosters.lite.utils.Globals.getContext;
|
||||
import static ru.vtosters.lite.utils.Globals.getIdentifier;
|
||||
import static ru.vtosters.lite.utils.Globals.getResources;
|
||||
import static ru.vtosters.lite.utils.Globals.getString;
|
||||
import static ru.vtosters.lite.utils.Themes.getAccentColor;
|
||||
import static ru.vtosters.lite.utils.Themes.getNavbarColor;
|
||||
import static ru.vtosters.lite.utils.Themes.getSTextAttr;
|
||||
import static ru.vtosters.lite.utils.Themes.getTextAttr;
|
||||
import static ru.vtosters.lite.utils.Themes.recolorDrawable;
|
||||
@@ -54,7 +55,6 @@ import java.io.File;
|
||||
import me.grishka.appkit.fragments.ToolbarFragment;
|
||||
import ru.vtosters.lite.tgs.TGPref;
|
||||
import ru.vtosters.lite.ui.PreferencesUtil;
|
||||
import ru.vtosters.lite.utils.Prefs;
|
||||
|
||||
public class StickersFragment extends ToolbarFragment {
|
||||
|
||||
@@ -372,7 +372,7 @@ public class StickersFragment extends ToolbarFragment {
|
||||
holder.switchCompat.setOnCheckedChangeListener((buttonView, isChecked) -> stickersService.setPackEnabled(pack, isChecked, false));
|
||||
holder.count.setText(pack.stickersCount + " " + getString("stickerscount"));
|
||||
|
||||
holder.layout.setBackgroundColor(Prefs.getNavbarColor());
|
||||
holder.layout.setBackgroundColor(getNavbarColor());
|
||||
|
||||
// Color костыль
|
||||
int color = getTextAttr();
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
package ru.vtosters.lite.ui.fragments.tgstickers;
|
||||
|
||||
import static ru.vtosters.lite.utils.Helper.getContext;
|
||||
import static ru.vtosters.lite.utils.Helper.getString;
|
||||
import static ru.vtosters.lite.utils.Globals.getContext;
|
||||
import static ru.vtosters.lite.utils.Globals.getString;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
package ru.vtosters.lite.utils;
|
||||
|
||||
import static ru.vtosters.lite.utils.Globals.*;
|
||||
import static ru.vtosters.lite.utils.Preferences.*;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import com.vk.about.Items;
|
||||
import com.vk.about.Items1;
|
||||
import com.vk.about.Items2;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import java.util.Scanner;
|
||||
|
||||
public class About {
|
||||
public static void injectAbout(List<Items2> list) {
|
||||
list.clear();
|
||||
list.add(new Items1());
|
||||
if (!oldabout()) {
|
||||
list.add(new Items(21, com.vtosters.lite.R.string.opencommit));
|
||||
list.add(new Items(8, com.vtosters.lite.R.string.tgchannel));
|
||||
list.add(new Items(9, com.vtosters.lite.R.string.tgchat));
|
||||
list.add(new Items(16, com.vtosters.lite.R.string.vtfaq));
|
||||
list.add(new Items(19, com.vtosters.lite.R.string.vtsite));
|
||||
list.add(new Items(20, com.vtosters.lite.R.string.donate));
|
||||
list.add(new Items(17, com.vtosters.lite.R.string.vkgroup));
|
||||
list.add(new Items(18, com.vtosters.lite.R.string.sett_debug));
|
||||
return;
|
||||
}
|
||||
list.add(new Items(0, com.vtosters.lite.R.string.about_app_feedback));
|
||||
list.add(new Items(1, com.vtosters.lite.R.string.about_app_estimate));
|
||||
list.add(new Items(2, com.vtosters.lite.R.string.about_app_privacy));
|
||||
list.add(new Items(5, com.vtosters.lite.R.string.about_app_cookie));
|
||||
list.add(new Items(3, com.vtosters.lite.R.string.about_app_terms_to_use));
|
||||
list.add(new Items(4, com.vtosters.lite.R.string.about_app_license));
|
||||
list.add(new Items(6, com.vtosters.lite.R.string.about_app_data_protect));
|
||||
list.add(new Items(8, com.vtosters.lite.R.string.sett_debug));
|
||||
}
|
||||
public static String getBuildNumber() {
|
||||
return getBuild(getContext(), "version.properties");
|
||||
}
|
||||
|
||||
public static String getCommitLink() {
|
||||
return "https://github.com/vtosters/lite/commit/" + getBuild(getContext(), "version.properties");
|
||||
}
|
||||
|
||||
public static String getBuild(Context context, String name) {
|
||||
try {
|
||||
Scanner scanner = new Scanner(context.getAssets().open(name));
|
||||
while (scanner.hasNextLine()) {
|
||||
String line = scanner.findInLine("VERSION_BUILD=.+");
|
||||
if (line != null)
|
||||
return line.replace("VERSION_BUILD=", "");
|
||||
return "0000000";
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return "0000000";
|
||||
}
|
||||
|
||||
public static String getAppVersion() throws IOException {
|
||||
return "VTLite | " + VERSIONNAME + " | " + getBuildNumber();
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,8 @@
|
||||
package ru.vtosters.lite.utils;
|
||||
|
||||
import static ru.vtosters.lite.utils.Helper.getContext;
|
||||
import static ru.vtosters.lite.utils.Helper.isEmpty;
|
||||
import static ru.vtosters.lite.utils.Globals.getContext;
|
||||
import static ru.vtosters.lite.utils.Globals.isEmpty;
|
||||
import static ru.vtosters.lite.utils.Preferences.*;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.content.Context;
|
||||
@@ -40,7 +41,7 @@ public class ExternalLinkHandler {
|
||||
}
|
||||
}
|
||||
|
||||
if (!Prefs.isEnableExternalOpening()) return false;
|
||||
if (!isEnableExternalOpening()) return false;
|
||||
|
||||
if (checkVkVideo(file)) {
|
||||
if (qualities.size() == 1) {
|
||||
|
||||
+47
-2
@@ -1,7 +1,9 @@
|
||||
package ru.vtosters.lite.utils;
|
||||
|
||||
import static ru.vtosters.lite.utils.Prefs.getLocale;
|
||||
import static ru.vtosters.lite.utils.Preferences.getLocale;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.Application;
|
||||
import android.app.NotificationChannel;
|
||||
import android.app.NotificationManager;
|
||||
import android.content.Context;
|
||||
@@ -12,20 +14,26 @@ import android.content.res.Resources;
|
||||
import android.net.ConnectivityManager;
|
||||
import android.net.NetworkInfo;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.preference.PreferenceManager;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.vk.core.util.ToastUtils;
|
||||
import com.vtosters.lite.UserProfile;
|
||||
import com.vtosters.lite.VKActivity;
|
||||
import com.vtosters.lite.api.ExtendedUserProfile;
|
||||
import com.vtosters.lite.auth.VKAccountManager;
|
||||
import com.vtosters.lite.im.ImEngineProvider;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
public class Helper {
|
||||
public class Globals {
|
||||
private static final List<Activity> activities = new ArrayList<>();
|
||||
|
||||
// Current UserId
|
||||
public static int getUserId() {
|
||||
return VKAccountManager.b().a();
|
||||
@@ -162,6 +170,43 @@ public class Helper {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static void registerActivities(Application application) {
|
||||
application.registerActivityLifecycleCallbacks(new Application.ActivityLifecycleCallbacks() {
|
||||
@Override // android.app.Application.ActivityLifecycleCallbacks
|
||||
public void onActivityPaused(Activity activity) {
|
||||
}
|
||||
|
||||
@Override // android.app.Application.ActivityLifecycleCallbacks
|
||||
public void onActivityResumed(Activity activity) {
|
||||
}
|
||||
|
||||
@Override // android.app.Application.ActivityLifecycleCallbacks
|
||||
public void onActivitySaveInstanceState(Activity activity, Bundle bundle) {
|
||||
}
|
||||
|
||||
@Override // android.app.Application.ActivityLifecycleCallbacks
|
||||
public void onActivityStarted(Activity activity) {
|
||||
}
|
||||
|
||||
@Override // android.app.Application.ActivityLifecycleCallbacks
|
||||
public void onActivityStopped(Activity activity) {
|
||||
}
|
||||
|
||||
@Override // android.app.Application.ActivityLifecycleCallbacks
|
||||
public void onActivityCreated(Activity activity, Bundle bundle) {
|
||||
if (activity instanceof VKActivity) {
|
||||
activities.add(activity);
|
||||
}
|
||||
}
|
||||
|
||||
@Override // android.app.Application.ActivityLifecycleCallbacks
|
||||
public void onActivityDestroyed(Activity activity) {
|
||||
activities.remove(activity);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Language changer and BaseContext inject
|
||||
public static Context BaseContextLocale(Context context) {
|
||||
Locale locale = new Locale(getLocale());
|
||||
@@ -1,7 +1,7 @@
|
||||
package ru.vtosters.lite.utils;
|
||||
|
||||
import static ru.vtosters.lite.utils.Helper.getContext;
|
||||
import static ru.vtosters.lite.utils.Helper.getPackageName;
|
||||
import static ru.vtosters.lite.utils.Globals.getContext;
|
||||
import static ru.vtosters.lite.utils.Globals.getPackageName;
|
||||
|
||||
import android.content.ComponentName;
|
||||
import android.content.pm.PackageManager;
|
||||
|
||||
@@ -0,0 +1,238 @@
|
||||
package ru.vtosters.lite.utils;
|
||||
|
||||
import static ru.vtosters.lite.ui.fragments.dockbar.DockBarManager.*;
|
||||
import static ru.vtosters.lite.utils.Globals.*;
|
||||
import static ru.vtosters.lite.utils.Preferences.*;
|
||||
|
||||
import com.vk.apps.AppsFragment;
|
||||
import com.vk.fave.fragments.FaveTabFragment;
|
||||
import com.vk.menu.MenuFragment;
|
||||
import com.vk.music.fragment.MusicFragment;
|
||||
import com.vk.navigation.NavigatorKeys;
|
||||
import com.vk.newsfeed.Feed2049;
|
||||
import com.vk.notifications.NotificationsContainerFragment;
|
||||
import com.vtosters.lite.fragments.GamesFragment;
|
||||
import com.vtosters.lite.fragments.PhotosFragment;
|
||||
import com.vtosters.lite.fragments.ProfileFragment;
|
||||
import com.vtosters.lite.fragments.SettingsListFragment;
|
||||
import com.vtosters.lite.fragments.d.DocumentsViewFragment;
|
||||
import com.vtosters.lite.fragments.f.FriendsFragment;
|
||||
import com.vtosters.lite.fragments.g.BirthdaysFragment;
|
||||
import com.vtosters.lite.fragments.h.GroupsFragment;
|
||||
import com.vtosters.lite.fragments.lives.LivesTabsFragment;
|
||||
import com.vtosters.lite.fragments.m.VideosFragment;
|
||||
import com.vtosters.lite.fragments.messages.dialogs.DialogsFragment;
|
||||
import com.vtosters.lite.fragments.money.MoneyTransfersFragment;
|
||||
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
public class Newsfeed {
|
||||
public static List<String> mFilters;
|
||||
|
||||
public static boolean isBlockedByFilter(String str) {
|
||||
for (String str2 : mFilters) {
|
||||
if (str.toLowerCase().contains(str2.toLowerCase())) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static void setupFilters() {
|
||||
mFilters = new ArrayList();
|
||||
|
||||
getFilter("refsfilter", "Referals.txt");
|
||||
getFilter("shortlinkfilter", "LinkShorter.txt");
|
||||
getFilter("default_ad_list", "StandartFilter.txt");
|
||||
getFilter("shitposting", "IDontWantToReadIt.txt");
|
||||
|
||||
String string = getPreferences().getString("spamfilters", "");
|
||||
|
||||
if (!string.isEmpty()) {
|
||||
mFilters.addAll(Arrays.asList(string.split(", ")));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static void getFilter(String boolname, String filename) {
|
||||
if (BooleanTrue(boolname)) {
|
||||
try {
|
||||
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(getContext().getAssets().open(filename)));
|
||||
while (true) {
|
||||
String readLine = bufferedReader.readLine();
|
||||
if (readLine != null) {
|
||||
mFilters.add(readLine);
|
||||
} else {
|
||||
bufferedReader.close();
|
||||
return;
|
||||
}
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean injectFilters(JSONObject jSONObject) {
|
||||
String optString = jSONObject.optString(NavigatorKeys.j, "");
|
||||
if (!ads(optString) && !authors_rec(optString) && !recomm(optString) && !friendrecomm(optString)) {
|
||||
String optString2 = jSONObject.optString("post_type", "");
|
||||
if (!ads(optString2) && !authors_rec(optString2) && !recomm(optString2) && !friendrecomm(optString2)) {
|
||||
String optString3 = jSONObject.optString("filters", "");
|
||||
if (ads(optString3) || authors_rec(optString3) || recomm(optString3) || friendrecomm(optString3) || isBlockedByFilter(jSONObject.optString(NavigatorKeys.x, "")) || checkCopyright(jSONObject) || captions(jSONObject)) {
|
||||
return false;
|
||||
}
|
||||
return !AD(jSONObject);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean authors_rec(String str) {
|
||||
return str.equals("authors_rec") && !authorsrecomm();
|
||||
}
|
||||
|
||||
public static boolean captions(JSONObject jSONObject) {
|
||||
try {
|
||||
JSONObject jSONObject2 = jSONObject.getJSONObject("caption");
|
||||
if (!Preferences.captions()) {
|
||||
return true;
|
||||
}
|
||||
boolean postsrecomm = postsrecomm();
|
||||
return (jSONObject2.getString(NavigatorKeys.j).equals("explorebait") && !postsrecomm) || ((jSONObject2.getString(NavigatorKeys.j).equals("shared") && postsrecomm) || ((jSONObject.getString(NavigatorKeys.j).equals("digest") && postsrecomm) || ((jSONObject2.getString(NavigatorKeys.j).equals("commented") && postsrecomm) || (jSONObject2.getString(NavigatorKeys.j).equals("voted") && postsrecomm))));
|
||||
} catch (JSONException unused) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean ads(String str) {
|
||||
if ((str.equals("ads_easy_promote") || str.equals("promo_button") || str.equals("app_widget") || str.equals("ads")) && Preferences.ads()) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean recomm(String str) {
|
||||
return (str.equals("user_rec") || str.equals("live_recommended") || str.equals("inline_user_rec")) && !postsrecomm();
|
||||
}
|
||||
|
||||
public static boolean friendrecomm(String str) {
|
||||
return str.equals("friends_recommendations") && !friendsrecomm();
|
||||
}
|
||||
|
||||
public static boolean AD(JSONObject jSONObject) {
|
||||
return jSONObject.optInt("marked_as_ads", 0) == 1 && adsgroup();
|
||||
}
|
||||
|
||||
public static boolean checkCopyright(JSONObject jSONObject) {
|
||||
return jSONObject.optInt("copyright", 0) == 1 && copyright_post();
|
||||
}
|
||||
|
||||
public static String friendsads() {
|
||||
return postsrecomm() ? "user_rec" : "null";
|
||||
}
|
||||
|
||||
public static String getFriendRecomm() {
|
||||
return friendsrecomm() ? "friends_recommendations" : "null";
|
||||
}
|
||||
|
||||
public static String authorsads() {
|
||||
return authorsrecomm() ? "authors_rec" : "null";
|
||||
}
|
||||
|
||||
public static String widgetads() {
|
||||
return Preferences.ads() ? "null" : "app_widget";
|
||||
}
|
||||
|
||||
public static String promoads() {
|
||||
return Preferences.ads() ? "null" : "promo_button";
|
||||
}
|
||||
|
||||
public static String storyads() {
|
||||
return adsstories() ? "null" : "ads";
|
||||
}
|
||||
|
||||
public static String getCommentsSort(String def) {
|
||||
String string = getPreferences().getString("commentssort", "");
|
||||
if (string.isEmpty()) {
|
||||
return def;
|
||||
}
|
||||
if (string.equals("new")) {
|
||||
return "desc";
|
||||
}
|
||||
if (string.equals("old")) {
|
||||
return "asc";
|
||||
}
|
||||
return def;
|
||||
}
|
||||
|
||||
public static Class getStartFragment() {
|
||||
String string = getPreferences().getString("start_values", "");
|
||||
if (string.equals("default")) {
|
||||
return getInstance().getSelectedTabs().get(0).fragmentClass;
|
||||
}
|
||||
if (string.equals("newsfeed")) {
|
||||
return Feed2049.b.c();
|
||||
}
|
||||
if (string.equals("messenger")) {
|
||||
return DialogsFragment.class;
|
||||
}
|
||||
if (string.equals("groups")) {
|
||||
return GroupsFragment.class;
|
||||
}
|
||||
if (string.equals("music")) {
|
||||
return MusicFragment.class;
|
||||
}
|
||||
if (string.equals("friends")) {
|
||||
return FriendsFragment.class;
|
||||
}
|
||||
if (string.equals("photos")) {
|
||||
return PhotosFragment.class;
|
||||
}
|
||||
if (string.equals("videos")) {
|
||||
return VideosFragment.class;
|
||||
}
|
||||
if (string.equals("settings")) {
|
||||
return SettingsListFragment.class;
|
||||
}
|
||||
if (string.equals("apps")) {
|
||||
return AppsFragment.class;
|
||||
}
|
||||
if (string.equals("discover")) {
|
||||
return Feed2049.b.e();
|
||||
}
|
||||
if (string.equals("notifications")) {
|
||||
return NotificationsContainerFragment.class;
|
||||
}
|
||||
if (string.equals("money")) {
|
||||
return MoneyTransfersFragment.class;
|
||||
}
|
||||
if (string.equals("games")) {
|
||||
return GamesFragment.class;
|
||||
}
|
||||
if (string.equals("liked")) {
|
||||
return FaveTabFragment.class;
|
||||
}
|
||||
if (string.equals("menu")) {
|
||||
return MenuFragment.class;
|
||||
}
|
||||
if (string.equals("profile")) {
|
||||
return ProfileFragment.class;
|
||||
}
|
||||
if (string.equals("lives")) {
|
||||
return LivesTabsFragment.class;
|
||||
}
|
||||
if (string.equals("docs")) {
|
||||
return DocumentsViewFragment.class;
|
||||
}
|
||||
return string.equals("brtd") ? BirthdaysFragment.class : getInstance().getSelectedTabs().get(0).fragmentClass;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,330 @@
|
||||
package ru.vtosters.lite.utils;
|
||||
|
||||
import static ru.vtosters.lite.ui.fragments.multiaccount.MultiAccountManager.*;
|
||||
import static ru.vtosters.lite.utils.Globals.*;
|
||||
import static ru.vtosters.lite.utils.Newsfeed.*;
|
||||
import static ru.vtosters.lite.utils.Proxy.*;
|
||||
|
||||
import android.app.Application;
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Build;
|
||||
import android.preference.PreferenceManager;
|
||||
|
||||
import com.vk.core.util.Screen;
|
||||
import com.vtosters.lite.data.Users;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
public class Preferences {
|
||||
public static String VERSIONNAME = "2.0 Beta";
|
||||
|
||||
public static boolean BooleanFalse(String key) {
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext());
|
||||
return prefs.getBoolean(key, false);
|
||||
}
|
||||
|
||||
public static boolean BooleanTrue(String key) {
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext());
|
||||
return prefs.getBoolean(key, true);
|
||||
}
|
||||
|
||||
public static String getBackgroundStickers() {
|
||||
if (isBGStickersEnabled()) {
|
||||
return "images_with_background";
|
||||
}
|
||||
return "images";
|
||||
}
|
||||
|
||||
public static boolean authorsrecomm() {
|
||||
return BooleanTrue("authorsrecomm");
|
||||
}
|
||||
|
||||
public static boolean captions() {
|
||||
return BooleanTrue("captions");
|
||||
}
|
||||
|
||||
public static boolean copyright_post() {
|
||||
return BooleanFalse("copyright_post");
|
||||
}
|
||||
|
||||
public static boolean default_ad_list() {
|
||||
return BooleanFalse("default_ad_list");
|
||||
}
|
||||
|
||||
public static boolean shitposting() {
|
||||
return BooleanFalse("shitposting");
|
||||
}
|
||||
|
||||
public static boolean friendsrecomm() {
|
||||
return BooleanTrue("friendsrecomm");
|
||||
}
|
||||
|
||||
public static boolean isBGStickersEnabled() {
|
||||
return BooleanTrue("isBGStickersEnabled");
|
||||
}
|
||||
|
||||
public static boolean ads() {
|
||||
return BooleanFalse("__dbg_no_ads");
|
||||
}
|
||||
|
||||
public static boolean adsgroup() {
|
||||
return BooleanFalse("adsgroup");
|
||||
}
|
||||
|
||||
public static boolean olddock() {
|
||||
return BooleanFalse("olddock");
|
||||
}
|
||||
|
||||
public static boolean adsslider() {
|
||||
return BooleanFalse("__dbg_no_slider_ads");
|
||||
}
|
||||
|
||||
public static boolean adsstories() {
|
||||
return BooleanFalse("adsstories");
|
||||
}
|
||||
|
||||
public static boolean alteremoji(Context context) {
|
||||
return alteremojipref() ? alteremojipref() : Screen.a(context);
|
||||
}
|
||||
|
||||
public static boolean alteremojipref() {
|
||||
return BooleanFalse("alteremoji");
|
||||
}
|
||||
|
||||
public static boolean awayphp() {
|
||||
return BooleanTrue("awayphp");
|
||||
}
|
||||
|
||||
public static boolean VKUI_INJ() {
|
||||
return BooleanTrue("VKUI_INJ");
|
||||
}
|
||||
|
||||
public static boolean benchmark() {
|
||||
return BooleanFalse("benchmark");
|
||||
}
|
||||
|
||||
public static boolean calls() {
|
||||
return BooleanTrue("calls");
|
||||
}
|
||||
|
||||
public static boolean convUsersOnline() {
|
||||
return BooleanFalse("convUsersOnline");
|
||||
}
|
||||
|
||||
public static boolean darkmode() {
|
||||
return BooleanTrue("darkmode");
|
||||
}
|
||||
|
||||
public static boolean dev() {
|
||||
return BooleanFalse("dev");
|
||||
}
|
||||
|
||||
public static boolean devmenu() {
|
||||
return BooleanFalse("devmenu");
|
||||
}
|
||||
|
||||
public static boolean dnr() {
|
||||
return BooleanTrue("dnr");
|
||||
}
|
||||
|
||||
public static boolean dns() {
|
||||
return BooleanTrue("dns");
|
||||
}
|
||||
|
||||
public static boolean libverify() {
|
||||
return BooleanFalse("libverify");
|
||||
}
|
||||
|
||||
public static boolean dnt() {
|
||||
return BooleanTrue("dnt");
|
||||
}
|
||||
|
||||
public static boolean dockcounter() {
|
||||
return BooleanTrue("dockcounter");
|
||||
}
|
||||
|
||||
public static boolean feedautoupdate() {
|
||||
return BooleanTrue("feedautoupdate");
|
||||
}
|
||||
|
||||
public static boolean feedcache() {
|
||||
return BooleanTrue("feedcache");
|
||||
}
|
||||
|
||||
public static void forceOffline() {
|
||||
if (setoffline()) {
|
||||
Users.b();
|
||||
}
|
||||
setupFilters();
|
||||
}
|
||||
|
||||
public static boolean fulltime() {
|
||||
return BooleanTrue("fulltime");
|
||||
}
|
||||
|
||||
public static boolean gcmfix() {
|
||||
return BooleanTrue("gcmfix");
|
||||
}
|
||||
|
||||
public static boolean hasMusicSubscription() {
|
||||
return BooleanTrue("hasMusicSubscription");
|
||||
}
|
||||
|
||||
public static boolean isEnableExternalOpening() {
|
||||
return BooleanFalse("isEnableExternalOpening");
|
||||
}
|
||||
|
||||
public static boolean iconvk() {
|
||||
return BooleanFalse("iconvk");
|
||||
}
|
||||
|
||||
public static boolean iconvkru() {
|
||||
return BooleanFalse("iconvkru");
|
||||
}
|
||||
|
||||
public static boolean isMusicRestricted() {
|
||||
return BooleanTrue("isMusicRestricted");
|
||||
}
|
||||
|
||||
public static boolean msgflat() {
|
||||
return BooleanFalse("msgflat");
|
||||
}
|
||||
|
||||
public static boolean msgtails() {
|
||||
return BooleanTrue("msgtails");
|
||||
}
|
||||
|
||||
public static boolean navbar() {
|
||||
return BooleanTrue("navbar");
|
||||
}
|
||||
|
||||
public static boolean newfeed() {
|
||||
return BooleanTrue("newfeed");
|
||||
}
|
||||
|
||||
public static boolean offline() {
|
||||
return BooleanTrue("offline");
|
||||
}
|
||||
|
||||
public static boolean oldabout() {
|
||||
return BooleanFalse("oldabout");
|
||||
}
|
||||
|
||||
public static boolean postsrecomm() {
|
||||
return BooleanTrue("postsrecomm");
|
||||
}
|
||||
|
||||
public static String readstatus() {
|
||||
return dnr() ? "messages.markAsRead" : "null";
|
||||
}
|
||||
|
||||
public static boolean refsfilter() {
|
||||
return BooleanFalse("refsfilter");
|
||||
}
|
||||
|
||||
public static boolean setoffline() {
|
||||
return BooleanFalse("setoffline");
|
||||
}
|
||||
|
||||
public static boolean shortinfo() {
|
||||
return BooleanTrue("shortinfo");
|
||||
}
|
||||
|
||||
public static boolean shortlinkfilter() {
|
||||
return BooleanFalse("shortlinkfilter");
|
||||
}
|
||||
|
||||
public static boolean shortpost() {
|
||||
return BooleanTrue("shortpost");
|
||||
}
|
||||
|
||||
public static boolean showmenu() {
|
||||
return BooleanFalse("showmenu");
|
||||
}
|
||||
|
||||
public static boolean ssl() {
|
||||
return BooleanTrue("ssl");
|
||||
}
|
||||
|
||||
public static boolean stories() {
|
||||
return BooleanTrue("stories");
|
||||
}
|
||||
|
||||
public static boolean swipe() {
|
||||
return BooleanTrue("swipe");
|
||||
}
|
||||
|
||||
public static boolean systememoji() {
|
||||
return BooleanFalse("systememoji");
|
||||
}
|
||||
|
||||
public static boolean unlockstats() {
|
||||
return BooleanFalse("unlockstats");
|
||||
}
|
||||
|
||||
public static boolean usevkui() {
|
||||
return BooleanTrue("usevkui");
|
||||
}
|
||||
|
||||
public static boolean vksans() {
|
||||
return BooleanFalse("vksans");
|
||||
}
|
||||
|
||||
public static boolean voice() {
|
||||
return BooleanTrue("voice");
|
||||
}
|
||||
|
||||
public static boolean newvideo() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public static int getMsgCount() {
|
||||
String customvalue = getPreferences().getString("msgcount", "");
|
||||
return customvalue.isEmpty() ? 30 : Integer.parseInt(customvalue);
|
||||
}
|
||||
|
||||
public static String MediacontentFix() {
|
||||
return Build.VERSION.SDK_INT >= 29 ? "date_modified DESC" : "datetaken DESC";
|
||||
}
|
||||
|
||||
public static String MediacontentFix2() {
|
||||
return Build.VERSION.SDK_INT >= 29 ? "date_modified" : "datetaken";
|
||||
}
|
||||
|
||||
public static String MediacontentFix3() {
|
||||
return Build.VERSION.SDK_INT >= 29 ? ", date_modified=" : ", dateTaken=";
|
||||
}
|
||||
|
||||
public static boolean color_grishka() {
|
||||
return BooleanTrue("color_grishka");
|
||||
}
|
||||
|
||||
public static boolean vkme_msg() {
|
||||
return BooleanFalse("vkme_msg");
|
||||
}
|
||||
|
||||
public static String VKVersion() {
|
||||
String string = getPreferences().getString("vkversion", "");
|
||||
if (!string.isEmpty()) {
|
||||
return string;
|
||||
}
|
||||
return "5.29";
|
||||
}
|
||||
|
||||
public static String getLocale() {
|
||||
String string = getPreferences().getString("lang_value", "");
|
||||
if (string.equals("system")) {
|
||||
return Locale.getDefault().getLanguage();
|
||||
}
|
||||
return string.isEmpty() ? Locale.getDefault().getLanguage() : string;
|
||||
}
|
||||
|
||||
public static void init(Application application) {
|
||||
setupFilters();
|
||||
fixGapps();
|
||||
setProxy();
|
||||
migrate();
|
||||
registerActivities(application);
|
||||
}
|
||||
}
|
||||
@@ -1,782 +0,0 @@
|
||||
package ru.vtosters.lite.utils;
|
||||
|
||||
import static ru.vtosters.lite.ui.fragments.dockbar.DockBarManager.getInstance;
|
||||
import static ru.vtosters.lite.ui.fragments.multiaccount.MultiAccountManager.migrate;
|
||||
import static ru.vtosters.lite.utils.Helper.fixGapps;
|
||||
import static ru.vtosters.lite.utils.Helper.getContext;
|
||||
import static ru.vtosters.lite.utils.Helper.getPreferences;
|
||||
import static ru.vtosters.lite.utils.Helper.getUserSecret;
|
||||
import static ru.vtosters.lite.utils.Helper.getUserToken;
|
||||
import static ru.vtosters.lite.utils.Proxy.setProxy;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.Application;
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.preference.PreferenceManager;
|
||||
|
||||
import com.vk.about.Items;
|
||||
import com.vk.about.Items1;
|
||||
import com.vk.about.Items2;
|
||||
import com.vk.apps.AppsFragment;
|
||||
import com.vk.core.ui.themes.VKThemeHelper;
|
||||
import com.vk.core.util.Screen;
|
||||
import com.vk.fave.fragments.FaveTabFragment;
|
||||
import com.vk.menu.MenuFragment;
|
||||
import com.vk.music.fragment.MusicFragment;
|
||||
import com.vk.navigation.NavigatorKeys;
|
||||
import com.vk.newsfeed.Feed2049;
|
||||
import com.vk.notifications.NotificationsContainerFragment;
|
||||
import com.vtosters.lite.R;
|
||||
import com.vtosters.lite.VKActivity;
|
||||
import com.vtosters.lite.data.Users;
|
||||
import com.vtosters.lite.fragments.GamesFragment;
|
||||
import com.vtosters.lite.fragments.PhotosFragment;
|
||||
import com.vtosters.lite.fragments.ProfileFragment;
|
||||
import com.vtosters.lite.fragments.SettingsListFragment;
|
||||
import com.vtosters.lite.fragments.d.DocumentsViewFragment;
|
||||
import com.vtosters.lite.fragments.f.FriendsFragment;
|
||||
import com.vtosters.lite.fragments.g.BirthdaysFragment;
|
||||
import com.vtosters.lite.fragments.h.GroupsFragment;
|
||||
import com.vtosters.lite.fragments.lives.LivesTabsFragment;
|
||||
import com.vtosters.lite.fragments.m.VideosFragment;
|
||||
import com.vtosters.lite.fragments.messages.dialogs.DialogsFragment;
|
||||
import com.vtosters.lite.fragments.money.MoneyTransfersFragment;
|
||||
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Scanner;
|
||||
|
||||
public class Prefs {
|
||||
private static final List<Activity> activities = new ArrayList<>();
|
||||
public static String VERSIONNAME = "2.0 Beta";
|
||||
private static List<String> mFilters;
|
||||
|
||||
public static boolean BooleanFalse(String key) {
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext());
|
||||
return prefs.getBoolean(key, false);
|
||||
}
|
||||
|
||||
public static boolean BooleanTrue(String key) {
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext());
|
||||
return prefs.getBoolean(key, true);
|
||||
}
|
||||
|
||||
public static String getBackgroundStickers() {
|
||||
if (isBGStickersEnabled()) {
|
||||
return "images_with_background";
|
||||
}
|
||||
return "images";
|
||||
}
|
||||
|
||||
public static boolean isBGStickersEnabled() {
|
||||
return BooleanTrue("isBGStickersEnabled");
|
||||
}
|
||||
|
||||
public static String getFriendRecomm() {
|
||||
return friendsrecomm() ? "friends_recommendations" : "null";
|
||||
}
|
||||
|
||||
public static boolean ads() {
|
||||
return BooleanFalse("__dbg_no_ads");
|
||||
}
|
||||
|
||||
public static boolean adsgroup() {
|
||||
return BooleanFalse("adsgroup");
|
||||
}
|
||||
|
||||
public static boolean olddock() {
|
||||
return BooleanFalse("olddock");
|
||||
}
|
||||
|
||||
public static boolean adsslider() {
|
||||
return BooleanFalse("__dbg_no_slider_ads");
|
||||
}
|
||||
|
||||
public static boolean adsstories() {
|
||||
return BooleanFalse("adsstories");
|
||||
}
|
||||
|
||||
public static boolean alteremoji(Context context) {
|
||||
return alteremojipref() ? alteremojipref() : Screen.a(context);
|
||||
}
|
||||
|
||||
public static boolean alteremojipref() {
|
||||
return BooleanFalse("alteremoji");
|
||||
}
|
||||
|
||||
public static String authorsads() {
|
||||
return authorsrecomm() ? "authors_rec" : "null";
|
||||
}
|
||||
|
||||
public static boolean authorsrecomm() {
|
||||
return BooleanTrue("authorsrecomm");
|
||||
}
|
||||
|
||||
public static boolean awayphp() {
|
||||
return BooleanTrue("awayphp");
|
||||
}
|
||||
|
||||
public static boolean VKUI_INJ() {
|
||||
return BooleanTrue("VKUI_INJ");
|
||||
}
|
||||
|
||||
public static boolean benchmark() {
|
||||
return BooleanFalse("benchmark");
|
||||
}
|
||||
|
||||
public static boolean calls() {
|
||||
return BooleanTrue("calls");
|
||||
}
|
||||
|
||||
public static boolean captions() {
|
||||
return BooleanTrue("captions");
|
||||
}
|
||||
|
||||
public static boolean convUsersOnline() {
|
||||
return BooleanFalse("convUsersOnline");
|
||||
}
|
||||
|
||||
public static boolean copyright_post() {
|
||||
return BooleanFalse("copyright_post");
|
||||
}
|
||||
|
||||
public static boolean darkmode() {
|
||||
return BooleanTrue("darkmode");
|
||||
}
|
||||
|
||||
public static boolean default_ad_list() {
|
||||
return BooleanFalse("default_ad_list");
|
||||
}
|
||||
|
||||
public static boolean shitposting() {
|
||||
return BooleanFalse("shitposting");
|
||||
}
|
||||
|
||||
public static boolean dev() {
|
||||
return BooleanFalse("dev");
|
||||
}
|
||||
|
||||
public static boolean devmenu() {
|
||||
return BooleanFalse("devmenu");
|
||||
}
|
||||
|
||||
public static boolean dnr() {
|
||||
return BooleanTrue("dnr");
|
||||
}
|
||||
|
||||
public static boolean dns() {
|
||||
return BooleanTrue("dns");
|
||||
}
|
||||
|
||||
public static boolean libverify() {
|
||||
return BooleanFalse("libverify");
|
||||
}
|
||||
|
||||
public static boolean dnt() {
|
||||
return BooleanTrue("dnt");
|
||||
}
|
||||
|
||||
public static boolean dockcounter() {
|
||||
return BooleanTrue("dockcounter");
|
||||
}
|
||||
|
||||
public static boolean feedautoupdate() {
|
||||
return BooleanTrue("feedautoupdate");
|
||||
}
|
||||
|
||||
public static boolean feedcache() {
|
||||
return BooleanTrue("feedcache");
|
||||
}
|
||||
|
||||
public static void forceOffline() {
|
||||
if (setoffline()) {
|
||||
Users.b();
|
||||
}
|
||||
setupFilters();
|
||||
}
|
||||
|
||||
public static boolean forcenogms() {
|
||||
return BooleanTrue("forcenogms");
|
||||
}
|
||||
|
||||
public static String friendsads() {
|
||||
return postsrecomm() ? "user_rec" : "null";
|
||||
}
|
||||
|
||||
public static boolean friendsrecomm() {
|
||||
return BooleanTrue("friendsrecomm");
|
||||
}
|
||||
|
||||
public static boolean fulltime() {
|
||||
return BooleanTrue("fulltime");
|
||||
}
|
||||
|
||||
public static boolean gcmfix() {
|
||||
return BooleanTrue("gcmfix");
|
||||
}
|
||||
|
||||
public static String getAppVersion() throws IOException {
|
||||
return "VTLite | " + VERSIONNAME + " | " + getBuildNumber();
|
||||
}
|
||||
|
||||
public static String getBuildNumber() {
|
||||
return Prefs.getBuild(getContext(), "version.properties");
|
||||
}
|
||||
|
||||
public static String getCommitLink() {
|
||||
return "https://github.com/vtosters/lite/commit/" + Prefs.getBuild(getContext(), "version.properties");
|
||||
}
|
||||
|
||||
public static String getBuild(Context context, String name) {
|
||||
try {
|
||||
Scanner scanner = new Scanner(context.getAssets().open(name));
|
||||
while (scanner.hasNextLine()) {
|
||||
String line = scanner.findInLine("VERSION_BUILD=.+");
|
||||
if (line != null)
|
||||
return line.replace("VERSION_BUILD=", "");
|
||||
return "0000000";
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
return "0000000";
|
||||
}
|
||||
|
||||
public static String getDarkVKUI() {
|
||||
return !VKThemeHelper.d() ? "1" : "0";
|
||||
}
|
||||
|
||||
public static String getAmoledVKUI() {
|
||||
String string = getPreferences().getString("darktheme", "");
|
||||
return string.equals("amoled") ? "1" : "0";
|
||||
}
|
||||
|
||||
public static String getCommentsSort(String def) {
|
||||
String string = getPreferences().getString("commentssort", "");
|
||||
if (string.isEmpty()) {
|
||||
return def;
|
||||
}
|
||||
if (string.equals("new")) {
|
||||
return "desc";
|
||||
}
|
||||
if (string.equals("old")) {
|
||||
return "asc";
|
||||
}
|
||||
return def;
|
||||
}
|
||||
|
||||
public static String getMeToken() {
|
||||
return getPreferences().getString("me_token", "");
|
||||
}
|
||||
|
||||
public static void setMeToken(String str) {
|
||||
getPreferences().edit().putString("me_token", str).apply();
|
||||
}
|
||||
|
||||
public static int getNavbarColor() {
|
||||
return VKThemeHelper.a(R.attr.tabbar_background);
|
||||
}
|
||||
|
||||
public static String getSSFSLink() {
|
||||
return SSFSDomain() + "?token=" + getUserToken() + "&vt_dark=" + getDarkVKUI() + "&vt_amoled=" + getAmoledVKUI() + "&secret=" + getUserSecret() + "&proxy=" + getUserProxy() + "&lang=" + getLocale() + "&vt=1&vtl=1&vksans=" + isVKSansEnabled() + "&vt_version=" + getBuildNumber() + "&vt_debug=" + isDEVModEnabled();
|
||||
}
|
||||
|
||||
public static String getString(String key, String defValue) {
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext());
|
||||
return prefs.getString(key, defValue);
|
||||
}
|
||||
|
||||
public static String getUserProxy() {
|
||||
return proxy() ? "1" : "0";
|
||||
}
|
||||
|
||||
public static boolean hasMusicSubscription() {
|
||||
return BooleanTrue("hasMusicSubscription");
|
||||
}
|
||||
|
||||
public static boolean isEnableExternalOpening() {
|
||||
return BooleanFalse("isEnableExternalOpening");
|
||||
}
|
||||
|
||||
public static boolean iconvk() {
|
||||
return BooleanFalse("iconvk");
|
||||
}
|
||||
|
||||
public static boolean iconvkru() {
|
||||
return BooleanFalse("iconvkru");
|
||||
}
|
||||
|
||||
public static String isDEVModEnabled() {
|
||||
return dev() ? "1" : "0";
|
||||
}
|
||||
|
||||
public static boolean isOtaEnabled() {
|
||||
return BooleanTrue("ota_enabled");
|
||||
}
|
||||
|
||||
public static boolean isMusicRestricted() {
|
||||
return BooleanTrue("isMusicRestricted");
|
||||
}
|
||||
|
||||
public static String isVKSansEnabled() {
|
||||
return vksans() ? "1" : "0";
|
||||
}
|
||||
|
||||
public static boolean msgflat() {
|
||||
return BooleanFalse("msgflat");
|
||||
}
|
||||
|
||||
public static boolean msgtails() {
|
||||
return BooleanTrue("msgtails");
|
||||
}
|
||||
|
||||
public static boolean navbar() {
|
||||
return BooleanTrue("navbar");
|
||||
}
|
||||
|
||||
public static boolean newfeed() {
|
||||
return BooleanTrue("newfeed");
|
||||
}
|
||||
|
||||
public static boolean offline() {
|
||||
return BooleanTrue("offline");
|
||||
}
|
||||
|
||||
public static boolean oldabout() {
|
||||
return BooleanFalse("oldabout");
|
||||
}
|
||||
|
||||
public static boolean postsrecomm() {
|
||||
return BooleanTrue("postsrecomm");
|
||||
}
|
||||
|
||||
public static String promoads() {
|
||||
return ads() ? "null" : "promo_button";
|
||||
}
|
||||
|
||||
public static String readstatus() {
|
||||
return dnr() ? "messages.markAsRead" : "null";
|
||||
}
|
||||
|
||||
public static boolean refsfilter() {
|
||||
return BooleanFalse("refsfilter");
|
||||
}
|
||||
|
||||
public static boolean rightLikes() {
|
||||
return BooleanFalse("rightLikes");
|
||||
}
|
||||
|
||||
public static boolean setoffline() {
|
||||
return BooleanFalse("setoffline");
|
||||
}
|
||||
|
||||
public static boolean shortinfo() {
|
||||
return BooleanTrue("shortinfo");
|
||||
}
|
||||
|
||||
public static boolean shortlinkfilter() {
|
||||
return BooleanFalse("shortlinkfilter");
|
||||
}
|
||||
|
||||
public static boolean shortpost() {
|
||||
return BooleanTrue("shortpost");
|
||||
}
|
||||
|
||||
public static boolean showmenu() {
|
||||
return BooleanFalse("showmenu");
|
||||
}
|
||||
|
||||
public static boolean ssl() {
|
||||
return BooleanTrue("ssl");
|
||||
}
|
||||
|
||||
public static boolean stories() {
|
||||
return BooleanTrue("stories");
|
||||
}
|
||||
|
||||
public static String storyads() {
|
||||
return adsstories() ? "null" : "ads";
|
||||
}
|
||||
|
||||
public static boolean swipe() {
|
||||
return BooleanTrue("swipe");
|
||||
}
|
||||
|
||||
public static boolean systememoji() {
|
||||
return BooleanFalse("systememoji");
|
||||
}
|
||||
|
||||
public static boolean unlockstats() {
|
||||
return BooleanFalse("unlockstats");
|
||||
}
|
||||
|
||||
public static boolean usevkui() {
|
||||
return BooleanTrue("usevkui");
|
||||
}
|
||||
|
||||
public static boolean vksans() {
|
||||
return BooleanFalse("vksans");
|
||||
}
|
||||
|
||||
public static boolean voice() {
|
||||
return BooleanTrue("voice");
|
||||
}
|
||||
|
||||
public static boolean newvideo() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public static String widgetads() {
|
||||
return ads() ? "null" : "app_widget";
|
||||
}
|
||||
|
||||
public static int getMsgCount() {
|
||||
String customvalue = getPreferences().getString("msgcount", "");
|
||||
return customvalue.isEmpty() ? 30 : Integer.parseInt(customvalue);
|
||||
}
|
||||
|
||||
public static String MediacontentFix() {
|
||||
return Build.VERSION.SDK_INT >= 29 ? "date_modified DESC" : "datetaken DESC";
|
||||
}
|
||||
|
||||
public static String MediacontentFix2() {
|
||||
return Build.VERSION.SDK_INT >= 29 ? "date_modified" : "datetaken";
|
||||
}
|
||||
|
||||
public static String MediacontentFix3() {
|
||||
return Build.VERSION.SDK_INT >= 29 ? ", date_modified=" : ", dateTaken=";
|
||||
}
|
||||
|
||||
public static boolean inject(JSONObject jSONObject) {
|
||||
String optString = jSONObject.optString(NavigatorKeys.j, "");
|
||||
if (!ads(optString) && !authors_rec(optString) && !recomm(optString) && !friendrecomm(optString)) {
|
||||
String optString2 = jSONObject.optString("post_type", "");
|
||||
if (!ads(optString2) && !authors_rec(optString2) && !recomm(optString2) && !friendrecomm(optString2)) {
|
||||
String optString3 = jSONObject.optString("filters", "");
|
||||
if (ads(optString3) || authors_rec(optString3) || recomm(optString3) || friendrecomm(optString3) || isBlockedByFilter(jSONObject.optString(NavigatorKeys.x, "")) || checkCopyright(jSONObject) || captions(jSONObject)) {
|
||||
return false;
|
||||
}
|
||||
return !AD(jSONObject);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static void setupFilters() {
|
||||
mFilters = new ArrayList();
|
||||
ReferalsPut();
|
||||
StandardFilterPut();
|
||||
ShortLinkPut();
|
||||
IDontWantToReadIt();
|
||||
String string = getPreferences().getString("spamfilters", "");
|
||||
if (!string.isEmpty()) {
|
||||
mFilters.addAll(Arrays.asList(string.split(", ")));
|
||||
}
|
||||
}
|
||||
|
||||
public static void ReferalsPut() {
|
||||
if (BooleanTrue("refsfilter")) {
|
||||
try {
|
||||
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(getContext().getAssets().open("Referals.txt")));
|
||||
while (true) {
|
||||
String readLine = bufferedReader.readLine();
|
||||
if (readLine != null) {
|
||||
mFilters.add(readLine);
|
||||
} else {
|
||||
bufferedReader.close();
|
||||
return;
|
||||
}
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void ShortLinkPut() {
|
||||
if (BooleanTrue("shortlinkfilter")) {
|
||||
try {
|
||||
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(getContext().getAssets().open("LinkShorter.txt")));
|
||||
while (true) {
|
||||
String readLine = bufferedReader.readLine();
|
||||
if (readLine != null) {
|
||||
mFilters.add(readLine);
|
||||
} else {
|
||||
bufferedReader.close();
|
||||
return;
|
||||
}
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void StandardFilterPut() {
|
||||
if (BooleanTrue("default_ad_list")) {
|
||||
try {
|
||||
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(getContext().getAssets().open("StandartFilter.txt")));
|
||||
while (true) {
|
||||
String readLine = bufferedReader.readLine();
|
||||
if (readLine != null) {
|
||||
mFilters.add(readLine);
|
||||
} else {
|
||||
bufferedReader.close();
|
||||
return;
|
||||
}
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void IDontWantToReadIt() {
|
||||
if (BooleanTrue("shitposting")) {
|
||||
try {
|
||||
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(getContext().getAssets().open("IDontWantToReadIt.txt")));
|
||||
while (true) {
|
||||
String readLine = bufferedReader.readLine();
|
||||
if (readLine != null) {
|
||||
mFilters.add(readLine);
|
||||
} else {
|
||||
bufferedReader.close();
|
||||
return;
|
||||
}
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static String SSFSDomain() {
|
||||
String string = getPreferences().getString("ssfscustom", "");
|
||||
if (!string.isEmpty()) {
|
||||
return string;
|
||||
}
|
||||
return "https://vtsf.vknext.net";
|
||||
}
|
||||
|
||||
public static String VKVersion() {
|
||||
String string = getPreferences().getString("vkversion", "");
|
||||
if (!string.isEmpty()) {
|
||||
return string;
|
||||
}
|
||||
return "5.29";
|
||||
}
|
||||
|
||||
public static boolean isBlockedByFilter(String str) {
|
||||
for (String str2 : mFilters) {
|
||||
if (str.toLowerCase().contains(str2.toLowerCase())) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static void injectAbout(List<Items2> list) {
|
||||
list.clear();
|
||||
list.add(new Items1());
|
||||
if (!oldabout()) {
|
||||
list.add(new Items(21, R.string.opencommit));
|
||||
list.add(new Items(8, R.string.tgchannel));
|
||||
list.add(new Items(9, R.string.tgchat));
|
||||
list.add(new Items(16, R.string.vtfaq));
|
||||
list.add(new Items(19, R.string.vtsite));
|
||||
list.add(new Items(20, R.string.donate));
|
||||
list.add(new Items(17, R.string.vkgroup));
|
||||
list.add(new Items(18, R.string.sett_debug));
|
||||
return;
|
||||
}
|
||||
list.add(new Items(0, R.string.about_app_feedback));
|
||||
list.add(new Items(1, R.string.about_app_estimate));
|
||||
list.add(new Items(2, R.string.about_app_privacy));
|
||||
list.add(new Items(5, R.string.about_app_cookie));
|
||||
list.add(new Items(3, R.string.about_app_terms_to_use));
|
||||
list.add(new Items(4, R.string.about_app_license));
|
||||
list.add(new Items(6, R.string.about_app_data_protect));
|
||||
list.add(new Items(8, R.string.sett_debug));
|
||||
}
|
||||
|
||||
public static boolean ads(String str) {
|
||||
if ((str.equals("ads_easy_promote") || str.equals("promo_button") || str.equals("app_widget") || str.equals("ads")) && ads()) {
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static String getLocale() {
|
||||
String string = getPreferences().getString("lang_value", "");
|
||||
if (string.equals("system")) {
|
||||
return Locale.getDefault().getLanguage();
|
||||
}
|
||||
return string.isEmpty() ? Locale.getDefault().getLanguage() : string;
|
||||
}
|
||||
|
||||
public static boolean proxy() {
|
||||
return getPreferences().getString("proxy", "").equals("apiproxy");
|
||||
}
|
||||
|
||||
public static boolean authors_rec(String str) {
|
||||
return str.equals("authors_rec") && !authorsrecomm();
|
||||
}
|
||||
|
||||
public static boolean captions(JSONObject jSONObject) {
|
||||
try {
|
||||
JSONObject jSONObject2 = jSONObject.getJSONObject("caption");
|
||||
if (!captions()) {
|
||||
return true;
|
||||
}
|
||||
boolean postsrecomm = postsrecomm();
|
||||
return (jSONObject2.getString(NavigatorKeys.j).equals("explorebait") && !postsrecomm) || ((jSONObject2.getString(NavigatorKeys.j).equals("shared") && postsrecomm) || ((jSONObject.getString(NavigatorKeys.j).equals("digest") && postsrecomm) || ((jSONObject2.getString(NavigatorKeys.j).equals("commented") && postsrecomm) || (jSONObject2.getString(NavigatorKeys.j).equals("voted") && postsrecomm))));
|
||||
} catch (JSONException unused) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean recomm(String str) {
|
||||
return (str.equals("user_rec") || str.equals("live_recommended") || str.equals("inline_user_rec")) && !postsrecomm();
|
||||
}
|
||||
|
||||
public static boolean friendrecomm(String str) {
|
||||
return str.equals("friends_recommendations") && !friendsrecomm();
|
||||
}
|
||||
|
||||
public static boolean AD(JSONObject jSONObject) {
|
||||
return jSONObject.optInt("marked_as_ads", 0) == 1 && adsgroup();
|
||||
}
|
||||
|
||||
public static boolean checkCopyright(JSONObject jSONObject) {
|
||||
return jSONObject.optInt("copyright", 0) == 1 && copyright_post();
|
||||
}
|
||||
|
||||
public static Activity getCurrentActivity() {
|
||||
if (activities.size() == 0) {
|
||||
return null;
|
||||
}
|
||||
return activities.get(0);
|
||||
}
|
||||
|
||||
public static void init(Application application) {
|
||||
setupFilters();
|
||||
fixGapps();
|
||||
setProxy();
|
||||
migrate();
|
||||
registerActivities(application);
|
||||
}
|
||||
|
||||
private static void registerActivities(Application application) {
|
||||
application.registerActivityLifecycleCallbacks(new Application.ActivityLifecycleCallbacks() {
|
||||
@Override // android.app.Application.ActivityLifecycleCallbacks
|
||||
public void onActivityPaused(Activity activity) {
|
||||
}
|
||||
|
||||
@Override // android.app.Application.ActivityLifecycleCallbacks
|
||||
public void onActivityResumed(Activity activity) {
|
||||
}
|
||||
|
||||
@Override // android.app.Application.ActivityLifecycleCallbacks
|
||||
public void onActivitySaveInstanceState(Activity activity, Bundle bundle) {
|
||||
}
|
||||
|
||||
@Override // android.app.Application.ActivityLifecycleCallbacks
|
||||
public void onActivityStarted(Activity activity) {
|
||||
}
|
||||
|
||||
@Override // android.app.Application.ActivityLifecycleCallbacks
|
||||
public void onActivityStopped(Activity activity) {
|
||||
}
|
||||
|
||||
@Override // android.app.Application.ActivityLifecycleCallbacks
|
||||
public void onActivityCreated(Activity activity, Bundle bundle) {
|
||||
if (activity instanceof VKActivity) {
|
||||
Prefs.activities.add(activity);
|
||||
}
|
||||
}
|
||||
|
||||
@Override // android.app.Application.ActivityLifecycleCallbacks
|
||||
public void onActivityDestroyed(Activity activity) {
|
||||
Prefs.activities.remove(activity);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public static boolean isUseAlternativeFragments() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public static Class getStartFragment() {
|
||||
String string = getPreferences().getString("start_values", "");
|
||||
if (string.equals("default")) {
|
||||
return getInstance().getSelectedTabs().get(0).fragmentClass;
|
||||
}
|
||||
if (string.equals("newsfeed")) {
|
||||
return Feed2049.b.c();
|
||||
}
|
||||
if (string.equals("messenger")) {
|
||||
return DialogsFragment.class;
|
||||
}
|
||||
if (string.equals("groups")) {
|
||||
return GroupsFragment.class;
|
||||
}
|
||||
if (string.equals("music")) {
|
||||
return MusicFragment.class;
|
||||
}
|
||||
if (string.equals("friends")) {
|
||||
return FriendsFragment.class;
|
||||
}
|
||||
if (string.equals("photos")) {
|
||||
return PhotosFragment.class;
|
||||
}
|
||||
if (string.equals("videos")) {
|
||||
return VideosFragment.class;
|
||||
}
|
||||
if (string.equals("settings")) {
|
||||
return SettingsListFragment.class;
|
||||
}
|
||||
if (string.equals("apps")) {
|
||||
return AppsFragment.class;
|
||||
}
|
||||
if (string.equals("discover")) {
|
||||
return Feed2049.b.e();
|
||||
}
|
||||
if (string.equals("notifications")) {
|
||||
return NotificationsContainerFragment.class;
|
||||
}
|
||||
if (string.equals("money")) {
|
||||
return MoneyTransfersFragment.class;
|
||||
}
|
||||
if (string.equals("games")) {
|
||||
return GamesFragment.class;
|
||||
}
|
||||
if (string.equals("liked")) {
|
||||
return FaveTabFragment.class;
|
||||
}
|
||||
if (string.equals("menu")) {
|
||||
return MenuFragment.class;
|
||||
}
|
||||
if (string.equals("profile")) {
|
||||
return ProfileFragment.class;
|
||||
}
|
||||
if (string.equals("lives")) {
|
||||
return LivesTabsFragment.class;
|
||||
}
|
||||
if (string.equals("docs")) {
|
||||
return DocumentsViewFragment.class;
|
||||
}
|
||||
return string.equals("brtd") ? BirthdaysFragment.class : getInstance().getSelectedTabs().get(0).fragmentClass;
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,7 @@
|
||||
package ru.vtosters.lite.utils;
|
||||
|
||||
import static ru.vtosters.lite.utils.Helper.getPreferences;
|
||||
import static ru.vtosters.lite.utils.Prefs.BooleanFalse;
|
||||
import static ru.vtosters.lite.utils.Prefs.proxy;
|
||||
import static ru.vtosters.lite.utils.Globals.*;
|
||||
import static ru.vtosters.lite.utils.Preferences.*;
|
||||
|
||||
import java.util.Properties;
|
||||
|
||||
@@ -160,6 +159,10 @@ public class Proxy {
|
||||
return string.isEmpty() ? "8888" : string;
|
||||
}
|
||||
|
||||
public static boolean proxy() {
|
||||
return getPreferences().getString("proxy", "").equals("apiproxy");
|
||||
}
|
||||
|
||||
// Official vk proxy enforcer
|
||||
public static boolean proxyvk() {
|
||||
return BooleanFalse("proxyvk");
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
package ru.vtosters.lite.utils;
|
||||
|
||||
import static ru.vtosters.lite.utils.About.*;
|
||||
import static ru.vtosters.lite.utils.Globals.*;
|
||||
import static ru.vtosters.lite.utils.Preferences.*;
|
||||
import static ru.vtosters.lite.utils.Proxy.*;
|
||||
|
||||
import com.vk.core.ui.themes.VKThemeHelper;
|
||||
|
||||
public class SSFS {
|
||||
public static String getSSFSLink() {
|
||||
return SSFSDomain() + "?token=" + getUserToken() + "&vt_dark=" + getDarkVKUI() + "&vt_amoled=" + getAmoledVKUI() + "&secret=" + getUserSecret() + "&proxy=" + getUserProxy() + "&lang=" + getLocale() + "&vt=1&vtl=1&vksans=" + isVKSansEnabled() + "&vt_version=" + getBuildNumber() + "&vt_debug=" + isDEVModEnabled();
|
||||
}
|
||||
|
||||
public static String SSFSDomain() {
|
||||
String string = getPreferences().getString("ssfscustom", "");
|
||||
if (!string.isEmpty()) {
|
||||
return string;
|
||||
}
|
||||
return "https://vtsf.vknext.net";
|
||||
}
|
||||
|
||||
public static String getDarkVKUI() {
|
||||
return !VKThemeHelper.d() ? "1" : "0";
|
||||
}
|
||||
|
||||
public static String getAmoledVKUI() {
|
||||
String string = getPreferences().getString("darktheme", "");
|
||||
return string.equals("amoled") ? "1" : "0";
|
||||
}
|
||||
|
||||
public static String getUserProxy() {
|
||||
return proxy() ? "1" : "0";
|
||||
}
|
||||
|
||||
public static String isVKSansEnabled() {
|
||||
return vksans() ? "1" : "0";
|
||||
}
|
||||
|
||||
public static String isDEVModEnabled() {
|
||||
return dev() ? "1" : "0";
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,7 @@ import static android.os.Environment.getExternalStoragePublicDirectory;
|
||||
import static android.widget.Toast.LENGTH_LONG;
|
||||
import static android.widget.Toast.LENGTH_SHORT;
|
||||
import static android.widget.Toast.makeText;
|
||||
import static ru.vtosters.lite.utils.Helper.getContext;
|
||||
import static ru.vtosters.lite.utils.Globals.getContext;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
package ru.vtosters.lite.utils;
|
||||
|
||||
import static ru.vtosters.lite.utils.Helper.getContext;
|
||||
import static ru.vtosters.lite.utils.Helper.getPreferences;
|
||||
import static ru.vtosters.lite.utils.Prefs.getNavbarColor;
|
||||
import static ru.vtosters.lite.utils.Prefs.navbar;
|
||||
import static ru.vtosters.lite.utils.Prefs.vksans;
|
||||
import static ru.vtosters.lite.utils.Globals.*;
|
||||
import static ru.vtosters.lite.utils.Preferences.*;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.ColorStateList;
|
||||
@@ -107,10 +104,6 @@ public class Themes {
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean color_grishka() {
|
||||
return ru.vtosters.lite.utils.Prefs.BooleanTrue("color_grishka");
|
||||
}
|
||||
|
||||
public static boolean isColorRefAccented(int i) {
|
||||
return i == R.color.cornflower_blue || i == R.color.cornflower_blue_two || i == R.color.dot_unread || i == R.color.fave_promo_btn_pressed || i == R.color.im_back_to_vk_gradient_start || i == R.color.live_emoji_butt_hide || i == R.color.picker_tab_bg_selected || i == R.color.sky_300 || i == R.color.text_blue || i == R.color.tw__blue_default || i == R.color.tw__blue_pressed || i == R.color.white_blue32 || i == R.color.name || i == R.color.picker_blue || i == R.color.picker_blue_pressed || i == R.color.picker_tab_text_selected || i == R.color.sharing_blue_btn_pressed || i == R.color.sharing_blue_btn_normal || i == R.color.tip_background || i == R.color.vkim_msg_sending_ic || i == R.color.vkim_playing_drawable_rect || i == R.color.accent_blue || i == R.color.light_blue_gray || i == R.color.light_blue || i == R.color.blue_200 || i == R.color.header_blue || i == R.color.blue_200_muted || i == R.color.im_old_accent || i == R.color.im_old_accent_muted || i == R.color.im_dark_accent || i == R.color.im_dark_accent_muted || i == R.color.azure_A400 || i == R.color.blue || i == R.color.blue_400 || i == R.color.blue_300 || i == R.color.cool_blue;
|
||||
}
|
||||
@@ -122,18 +115,6 @@ public class Themes {
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean vkim_msg() {
|
||||
return ru.vtosters.lite.utils.Prefs.BooleanFalse("vkim_msg");
|
||||
}
|
||||
|
||||
public static boolean amoled() {
|
||||
return ru.vtosters.lite.utils.Prefs.BooleanFalse("amoled");
|
||||
}
|
||||
|
||||
public static boolean vkme_msg() {
|
||||
return ru.vtosters.lite.utils.Prefs.BooleanFalse("vkme_msg");
|
||||
}
|
||||
|
||||
public static Drawable recolorDrawable(Drawable drawable) {
|
||||
if (drawable == null) {
|
||||
return null;
|
||||
@@ -208,4 +189,9 @@ public class Themes {
|
||||
public static int vk_sans_text_regular() {
|
||||
return vksans() ? R.font.vk_sans_text_regular : R.font.roboto_regular;
|
||||
}
|
||||
|
||||
public static int getNavbarColor() {
|
||||
return VKThemeHelper.a(R.attr.tabbar_background);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package ru.vtosters.lite.utils;
|
||||
|
||||
import static ru.vtosters.lite.utils.Helper.getContext;
|
||||
import static ru.vtosters.lite.utils.Helper.getPreferences;
|
||||
import static ru.vtosters.lite.utils.Globals.getContext;
|
||||
import static ru.vtosters.lite.utils.Globals.getPreferences;
|
||||
import static ru.vtosters.lite.utils.Themes.getColorFromAttr;
|
||||
import static ru.vtosters.lite.utils.Themes.hex;
|
||||
|
||||
@@ -67,7 +67,7 @@ public class VKUIInjector {
|
||||
|
||||
public static void inject(WebView webView) {
|
||||
String string = getPreferences().getString("darktheme", "");
|
||||
if (Prefs.BooleanTrue("VKUI_INJ")) {
|
||||
if (Preferences.BooleanTrue("VKUI_INJ")) {
|
||||
if (!isLoaded) {
|
||||
load();
|
||||
}
|
||||
|
||||
@@ -273,7 +273,7 @@
|
||||
|
||||
check-cast v2, Landroid/content/Context;
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Prefs;->getCommitLink()Ljava/lang/String;
|
||||
invoke-static {}, Lru/vtosters/lite/utils/About;->getCommitLink()Ljava/lang/String;
|
||||
|
||||
move-result-object v3
|
||||
|
||||
@@ -304,7 +304,7 @@
|
||||
|
||||
if-eqz v0, :cond_8
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Helper;->getContext()Landroid/content/Context;
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Globals;->getContext()Landroid/content/Context;
|
||||
|
||||
move-result-object p1
|
||||
|
||||
|
||||
@@ -632,7 +632,7 @@
|
||||
|
||||
invoke-interface {p1, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z
|
||||
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Prefs;->injectAbout(Ljava/util/List;)V
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/About;->injectAbout(Ljava/util/List;)V
|
||||
|
||||
return-void
|
||||
.end method
|
||||
|
||||
@@ -4040,7 +4040,7 @@
|
||||
|
||||
if-eqz v2, :cond_51
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Helper;->getContext()Landroid/content/Context;
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Globals;->getContext()Landroid/content/Context;
|
||||
|
||||
move-result-object v1
|
||||
|
||||
@@ -4091,7 +4091,7 @@
|
||||
|
||||
if-eqz v2, :cond_52
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Helper;->getContext()Landroid/content/Context;
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Globals;->getContext()Landroid/content/Context;
|
||||
|
||||
move-result-object v1
|
||||
|
||||
@@ -4144,7 +4144,7 @@
|
||||
|
||||
if-eqz v2, :cond_130
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Helper;->getContext()Landroid/content/Context;
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Globals;->getContext()Landroid/content/Context;
|
||||
|
||||
move-result-object v1
|
||||
|
||||
@@ -4197,7 +4197,7 @@
|
||||
|
||||
if-eqz v2, :cond_131
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Helper;->getContext()Landroid/content/Context;
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Globals;->getContext()Landroid/content/Context;
|
||||
|
||||
move-result-object v1
|
||||
|
||||
@@ -4250,7 +4250,7 @@
|
||||
|
||||
if-eqz v2, :cond_132
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Helper;->getContext()Landroid/content/Context;
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Globals;->getContext()Landroid/content/Context;
|
||||
|
||||
move-result-object v1
|
||||
|
||||
@@ -4304,7 +4304,7 @@
|
||||
|
||||
if-eqz v2, :cond_53
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Helper;->getContext()Landroid/content/Context;
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Globals;->getContext()Landroid/content/Context;
|
||||
|
||||
move-result-object v1
|
||||
|
||||
@@ -4355,7 +4355,7 @@
|
||||
|
||||
if-eqz v2, :cond_54
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Helper;->getContext()Landroid/content/Context;
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Globals;->getContext()Landroid/content/Context;
|
||||
|
||||
move-result-object v1
|
||||
|
||||
@@ -4406,7 +4406,7 @@
|
||||
|
||||
if-eqz v2, :cond_55
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Helper;->getContext()Landroid/content/Context;
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Globals;->getContext()Landroid/content/Context;
|
||||
|
||||
move-result-object v1
|
||||
|
||||
@@ -4457,7 +4457,7 @@
|
||||
|
||||
if-eqz v2, :cond_56
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Helper;->getContext()Landroid/content/Context;
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Globals;->getContext()Landroid/content/Context;
|
||||
|
||||
move-result-object v1
|
||||
|
||||
@@ -4508,7 +4508,7 @@
|
||||
|
||||
if-eqz v2, :cond_57
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Helper;->getContext()Landroid/content/Context;
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Globals;->getContext()Landroid/content/Context;
|
||||
|
||||
move-result-object v1
|
||||
|
||||
@@ -4559,7 +4559,7 @@
|
||||
|
||||
if-eqz v2, :cond_58
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Helper;->getContext()Landroid/content/Context;
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Globals;->getContext()Landroid/content/Context;
|
||||
|
||||
move-result-object v1
|
||||
|
||||
@@ -4610,7 +4610,7 @@
|
||||
|
||||
if-eqz v2, :cond_59
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Helper;->getContext()Landroid/content/Context;
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Globals;->getContext()Landroid/content/Context;
|
||||
|
||||
move-result-object v1
|
||||
|
||||
@@ -4661,7 +4661,7 @@
|
||||
|
||||
if-eqz v2, :cond_5a
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Helper;->getContext()Landroid/content/Context;
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Globals;->getContext()Landroid/content/Context;
|
||||
|
||||
move-result-object v1
|
||||
|
||||
@@ -5758,7 +5758,7 @@
|
||||
|
||||
move-result v0
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Prefs;->newvideo()Z
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->newvideo()Z
|
||||
|
||||
move-result v0
|
||||
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
|
||||
move-result v0
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Prefs;->dev()Z
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->dev()Z
|
||||
|
||||
move-result v0
|
||||
|
||||
@@ -151,7 +151,7 @@
|
||||
|
||||
move-result v0
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Prefs;->dev()Z
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->dev()Z
|
||||
|
||||
move-result v0
|
||||
|
||||
|
||||
@@ -1062,7 +1062,7 @@
|
||||
|
||||
if-eqz v0, :cond_0
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Prefs;->darkmode()Z
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->darkmode()Z
|
||||
|
||||
move-result v0
|
||||
|
||||
|
||||
+2
-2
@@ -566,7 +566,7 @@
|
||||
invoke-interface {v2, p0, v0}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
||||
|
||||
:cond_f
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Prefs;->forceOffline()V
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->forceOffline()V
|
||||
|
||||
return-object v2
|
||||
.end method
|
||||
@@ -775,7 +775,7 @@
|
||||
|
||||
check-cast p1, Ljava/lang/Integer;
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Prefs;->forceOffline()V
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->forceOffline()V
|
||||
|
||||
return-object p1
|
||||
.end method
|
||||
|
||||
@@ -124,7 +124,7 @@
|
||||
|
||||
move-result v1
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Themes;->vkme_msg()Z
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->vkme_msg()Z
|
||||
|
||||
move-result v1
|
||||
|
||||
@@ -1327,7 +1327,7 @@
|
||||
const-string p2, "VT_Verification"
|
||||
|
||||
.line 181
|
||||
invoke-static {p2}, Lru/vtosters/lite/utils/Prefs;->BooleanTrue(Ljava/lang/String;)Z
|
||||
invoke-static {p2}, Lru/vtosters/lite/utils/Preferences;->BooleanTrue(Ljava/lang/String;)Z
|
||||
|
||||
move-result p2
|
||||
|
||||
@@ -1357,7 +1357,7 @@
|
||||
const-string p2, "VT_Verification"
|
||||
|
||||
.line 181
|
||||
invoke-static {p2}, Lru/vtosters/lite/utils/Prefs;->BooleanTrue(Ljava/lang/String;)Z
|
||||
invoke-static {p2}, Lru/vtosters/lite/utils/Preferences;->BooleanTrue(Ljava/lang/String;)Z
|
||||
|
||||
move-result p2
|
||||
|
||||
|
||||
+1
-1
@@ -112,7 +112,7 @@
|
||||
|
||||
move-result p1
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Themes;->vkme_msg()Z
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->vkme_msg()Z
|
||||
|
||||
move-result p1
|
||||
|
||||
|
||||
+2
-2
@@ -76,7 +76,7 @@
|
||||
const-string p2, "VT_Verification"
|
||||
|
||||
.line 181
|
||||
invoke-static {p2}, Lru/vtosters/lite/utils/Prefs;->BooleanTrue(Ljava/lang/String;)Z
|
||||
invoke-static {p2}, Lru/vtosters/lite/utils/Preferences;->BooleanTrue(Ljava/lang/String;)Z
|
||||
|
||||
move-result p2
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
const-string p2, "VT_Verification"
|
||||
|
||||
.line 181
|
||||
invoke-static {p2}, Lru/vtosters/lite/utils/Prefs;->BooleanTrue(Ljava/lang/String;)Z
|
||||
invoke-static {p2}, Lru/vtosters/lite/utils/Preferences;->BooleanTrue(Ljava/lang/String;)Z
|
||||
|
||||
move-result p2
|
||||
|
||||
|
||||
+1
-1
@@ -231,7 +231,7 @@
|
||||
|
||||
move-result v1
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Themes;->vkme_msg()Z
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->vkme_msg()Z
|
||||
|
||||
move-result v1
|
||||
|
||||
|
||||
@@ -343,7 +343,7 @@
|
||||
|
||||
move-result v0
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Themes;->vkme_msg()Z
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->vkme_msg()Z
|
||||
|
||||
move-result v0
|
||||
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
.locals 6
|
||||
|
||||
.line 165
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Prefs;->alteremoji(Landroid/content/Context;)Z
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Preferences;->alteremoji(Landroid/content/Context;)Z
|
||||
|
||||
move-result v4
|
||||
|
||||
@@ -161,7 +161,7 @@
|
||||
.locals 7
|
||||
|
||||
.line 154
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Prefs;->alteremoji(Landroid/content/Context;)Z
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Preferences;->alteremoji(Landroid/content/Context;)Z
|
||||
|
||||
move-result v5
|
||||
|
||||
@@ -339,7 +339,7 @@
|
||||
.locals 7
|
||||
|
||||
.line 172
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Prefs;->alteremoji(Landroid/content/Context;)Z
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Preferences;->alteremoji(Landroid/content/Context;)Z
|
||||
|
||||
move-result v4
|
||||
|
||||
|
||||
@@ -520,13 +520,13 @@
|
||||
|
||||
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->a(Ljava/lang/Object;Ljava/lang/String;)V
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Prefs;->dev()Z
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->dev()Z
|
||||
|
||||
move-result v1
|
||||
|
||||
if-eqz v1, :cond_3
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Helper;->getContext()Landroid/content/Context;
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Globals;->getContext()Landroid/content/Context;
|
||||
|
||||
move-result-object v3
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
.line 18
|
||||
invoke-super {p0, p1}, Lcom/vk/webapp/VkUiFragment;->b(Landroid/os/Bundle;)V
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Prefs;->getSSFSLink()Ljava/lang/String;
|
||||
invoke-static {}, Lru/vtosters/lite/utils/SSFS;->getSSFSLink()Ljava/lang/String;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
|
||||
const-string v1, "arm"
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Prefs;->VKVersion()Ljava/lang/String;
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->VKVersion()Ljava/lang/String;
|
||||
|
||||
move-result-object v2
|
||||
|
||||
@@ -727,7 +727,7 @@
|
||||
.param p0, "s" # I
|
||||
|
||||
.line 17
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Prefs;->fulltime()Z
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->fulltime()Z
|
||||
|
||||
move-result v0
|
||||
|
||||
@@ -1071,7 +1071,7 @@
|
||||
.method private setLang()V
|
||||
.locals 6
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Helper;->getContext()Landroid/content/Context;
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Globals;->getContext()Landroid/content/Context;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
@@ -1089,7 +1089,7 @@
|
||||
|
||||
new-instance v3, Ljava/util/Locale;
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Prefs;->getLocale()Ljava/lang/String;
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->getLocale()Ljava/lang/String;
|
||||
|
||||
move-result-object v4
|
||||
|
||||
@@ -1321,7 +1321,7 @@
|
||||
.method public onCreate()V
|
||||
.locals 4
|
||||
|
||||
invoke-static {p0}, Lru/vtosters/lite/utils/Prefs;->init(Landroid/app/Application;)V
|
||||
invoke-static {p0}, Lru/vtosters/lite/utils/Preferences;->init(Landroid/app/Application;)V
|
||||
|
||||
invoke-direct {p0}, Lcom/vtosters/lite/VKApplication;->setLang()V
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@
|
||||
|
||||
.prologue
|
||||
.line 41
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Helper;->BaseContextLocale(Landroid/content/Context;)Landroid/content/Context;
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Globals;->BaseContextLocale(Landroid/content/Context;)Landroid/content/Context;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
|
||||
@@ -2582,7 +2582,7 @@
|
||||
|
||||
iput-boolean v2, v0, Lcom/vtosters/lite/api/ExtendedUserProfile;->bp:Z
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Prefs;->getFriendRecomm()Ljava/lang/String;
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Newsfeed;->getFriendRecomm()Ljava/lang/String;
|
||||
|
||||
move-result-object v2
|
||||
|
||||
|
||||
@@ -51,13 +51,13 @@
|
||||
.method public a(Lcom/vk/api/sdk/exceptions/VKApiExecutionException;)V
|
||||
.locals 5
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Prefs;->offline()Z
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->offline()Z
|
||||
|
||||
move-result v2
|
||||
|
||||
if-nez v2, :cond_0
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Prefs;->forceOffline()V
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->forceOffline()V
|
||||
|
||||
return-void
|
||||
|
||||
|
||||
@@ -1031,7 +1031,7 @@
|
||||
|
||||
if-eqz v0, :cond_0
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Prefs;->voice()Z
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->voice()Z
|
||||
|
||||
move-result v0
|
||||
|
||||
@@ -1080,7 +1080,7 @@
|
||||
|
||||
if-eqz v0, :cond_2
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Prefs;->voice()Z
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->voice()Z
|
||||
|
||||
move-result v6
|
||||
|
||||
@@ -4835,7 +4835,7 @@
|
||||
return-void
|
||||
|
||||
:cond_0
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Prefs;->voice()Z
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->voice()Z
|
||||
|
||||
move-result v2
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
.prologue
|
||||
.line 41
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Helper;->BaseContextLocale(Landroid/content/Context;)Landroid/content/Context;
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Globals;->BaseContextLocale(Landroid/content/Context;)Landroid/content/Context;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
|
||||
@@ -234,7 +234,7 @@
|
||||
|
||||
.prologue
|
||||
.line 41
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Helper;->BaseContextLocale(Landroid/content/Context;)Landroid/content/Context;
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Globals;->BaseContextLocale(Landroid/content/Context;)Landroid/content/Context;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
|
||||
@@ -359,7 +359,7 @@
|
||||
|
||||
.prologue
|
||||
.line 41
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Helper;->BaseContextLocale(Landroid/content/Context;)Landroid/content/Context;
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Globals;->BaseContextLocale(Landroid/content/Context;)Landroid/content/Context;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
|
||||
@@ -549,7 +549,7 @@
|
||||
|
||||
.prologue
|
||||
.line 41
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Helper;->BaseContextLocale(Landroid/content/Context;)Landroid/content/Context;
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Globals;->BaseContextLocale(Landroid/content/Context;)Landroid/content/Context;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
.method private a(Landroid/content/Context;Z)V
|
||||
.locals 5
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Prefs;->ssl()Z
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->ssl()Z
|
||||
|
||||
move-result v0
|
||||
|
||||
|
||||
@@ -746,7 +746,7 @@
|
||||
.method public a(Ljava/lang/CharSequence;II)Ljava/lang/CharSequence;
|
||||
.locals 8
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Prefs;->systememoji()Z
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->systememoji()Z
|
||||
|
||||
move-result v0
|
||||
|
||||
|
||||
+1
-1
@@ -182,7 +182,7 @@
|
||||
|
||||
move-result-object p1
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Prefs;->forceOffline()V
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->forceOffline()V
|
||||
|
||||
return-object p1
|
||||
.end method
|
||||
|
||||
+1
-1
@@ -151,7 +151,7 @@
|
||||
|
||||
check-cast p1, Lcom/vk/im/engine/internal/api_commands/messages/MessagesGetConversationsByIdApiCmd$b;
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Prefs;->forceOffline()V
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->forceOffline()V
|
||||
|
||||
return-object p1
|
||||
.end method
|
||||
|
||||
@@ -2213,7 +2213,7 @@
|
||||
.line 183
|
||||
sget-object v3, Lcom/vk/im/engine/internal/api_parsers/ImageSizesParser;->a:Lcom/vk/im/engine/internal/api_parsers/ImageSizesParser;
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Prefs;->getBackgroundStickers()Ljava/lang/String;
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->getBackgroundStickers()Ljava/lang/String;
|
||||
|
||||
move-result-object v4
|
||||
|
||||
|
||||
+1
-1
@@ -370,7 +370,7 @@
|
||||
|
||||
move-result v0
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Themes;->vkme_msg()Z
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->vkme_msg()Z
|
||||
|
||||
move-result v0
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
|
||||
move-result p1
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Themes;->vkme_msg()Z
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->vkme_msg()Z
|
||||
|
||||
move-result p1
|
||||
|
||||
|
||||
@@ -861,7 +861,7 @@
|
||||
|
||||
move-result v0
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Themes;->vkme_msg()Z
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->vkme_msg()Z
|
||||
|
||||
move-result v0
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
.method public final b()Lcom/vk/newsfeed/Feed2049$ExperimentType;
|
||||
.locals 3
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Prefs;->newfeed()Z
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->newfeed()Z
|
||||
|
||||
move-result v0
|
||||
|
||||
|
||||
@@ -186,7 +186,7 @@
|
||||
|
||||
.prologue
|
||||
.line 41
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Helper;->BaseContextLocale(Landroid/content/Context;)Landroid/content/Context;
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Globals;->BaseContextLocale(Landroid/content/Context;)Landroid/content/Context;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
|
||||
.prologue
|
||||
.line 41
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Helper;->BaseContextLocale(Landroid/content/Context;)Landroid/content/Context;
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Globals;->BaseContextLocale(Landroid/content/Context;)Landroid/content/Context;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
|
||||
@@ -119,7 +119,7 @@
|
||||
|
||||
.prologue
|
||||
.line 41
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Helper;->BaseContextLocale(Landroid/content/Context;)Landroid/content/Context;
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Globals;->BaseContextLocale(Landroid/content/Context;)Landroid/content/Context;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
|
||||
@@ -232,7 +232,7 @@
|
||||
.method private a(Ljava/lang/String;)Ljava/lang/String;
|
||||
.locals 4
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Prefs;->benchmark()Z
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->benchmark()Z
|
||||
|
||||
move-result v0
|
||||
|
||||
|
||||
@@ -116,7 +116,7 @@
|
||||
|
||||
const/4 v4, 0x1
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Prefs;->devmenu()Z
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->devmenu()Z
|
||||
|
||||
move-result v5
|
||||
|
||||
@@ -512,7 +512,7 @@
|
||||
|
||||
invoke-virtual {v0, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Helper;->isGmsInstalled()Z
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Globals;->isGmsInstalled()Z
|
||||
|
||||
move-result v6
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
|
||||
.prologue
|
||||
.line 41
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Helper;->BaseContextLocale(Landroid/content/Context;)Landroid/content/Context;
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Globals;->BaseContextLocale(Landroid/content/Context;)Landroid/content/Context;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
|
||||
move-result-object v1
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Prefs;->getLocale()Ljava/lang/String;
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->getLocale()Ljava/lang/String;
|
||||
|
||||
move-result-object v1
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
|
||||
move-result-object v1
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Prefs;->getLocale()Ljava/lang/String;
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->getLocale()Ljava/lang/String;
|
||||
|
||||
move-result-object v1
|
||||
|
||||
|
||||
@@ -153,7 +153,7 @@
|
||||
|
||||
move-result-object v0
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Prefs;->ssl()Z
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->ssl()Z
|
||||
|
||||
move-result v1
|
||||
|
||||
@@ -325,7 +325,7 @@
|
||||
}
|
||||
.end annotation
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Prefs;->ssl()Z
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->ssl()Z
|
||||
|
||||
move-result v0
|
||||
|
||||
@@ -353,7 +353,7 @@
|
||||
}
|
||||
.end annotation
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Prefs;->ssl()Z
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->ssl()Z
|
||||
|
||||
move-result v0
|
||||
|
||||
@@ -376,7 +376,7 @@
|
||||
.method public getAcceptedIssuers()[Ljava/security/cert/X509Certificate;
|
||||
.locals 1
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Prefs;->ssl()Z
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->ssl()Z
|
||||
|
||||
move-result v0
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
goto/16 :goto_6
|
||||
|
||||
:sswitch_0
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Prefs;->widgetads()Ljava/lang/String;
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Newsfeed;->widgetads()Ljava/lang/String;
|
||||
|
||||
move-result-object p2
|
||||
|
||||
@@ -100,7 +100,7 @@
|
||||
goto/16 :goto_6
|
||||
|
||||
:sswitch_1
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Prefs;->authorsads()Ljava/lang/String;
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Newsfeed;->authorsads()Ljava/lang/String;
|
||||
|
||||
move-result-object p2
|
||||
|
||||
@@ -136,7 +136,7 @@
|
||||
goto/16 :goto_6
|
||||
|
||||
:sswitch_3
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Prefs;->promoads()Ljava/lang/String;
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Newsfeed;->promoads()Ljava/lang/String;
|
||||
|
||||
move-result-object p2
|
||||
|
||||
@@ -408,7 +408,7 @@
|
||||
goto/16 :goto_6
|
||||
|
||||
:sswitch_10
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Prefs;->friendsads()Ljava/lang/String;
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Newsfeed;->friendsads()Ljava/lang/String;
|
||||
|
||||
move-result-object p2
|
||||
|
||||
|
||||
@@ -132,7 +132,7 @@
|
||||
|
||||
const-string v4, "_data"
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Prefs;->MediacontentFix2()Ljava/lang/String;
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->MediacontentFix2()Ljava/lang/String;
|
||||
|
||||
move-result-object v5
|
||||
|
||||
@@ -155,7 +155,7 @@
|
||||
|
||||
const-string v1, "_id"
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Prefs;->MediacontentFix2()Ljava/lang/String;
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->MediacontentFix2()Ljava/lang/String;
|
||||
|
||||
move-result-object v2
|
||||
|
||||
@@ -371,7 +371,7 @@
|
||||
|
||||
move-result v6
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Prefs;->MediacontentFix2()Ljava/lang/String;
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->MediacontentFix2()Ljava/lang/String;
|
||||
|
||||
move-result-object v7
|
||||
|
||||
@@ -833,7 +833,7 @@
|
||||
|
||||
const/4 v9, 0x0
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Prefs;->MediacontentFix()Ljava/lang/String;
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->MediacontentFix()Ljava/lang/String;
|
||||
|
||||
move-result-object v10
|
||||
|
||||
@@ -866,7 +866,7 @@
|
||||
|
||||
const/4 v8, 0x0
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Prefs;->MediacontentFix()Ljava/lang/String;
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->MediacontentFix()Ljava/lang/String;
|
||||
|
||||
move-result-object v9
|
||||
|
||||
@@ -1045,7 +1045,7 @@
|
||||
|
||||
move-result v6
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Prefs;->MediacontentFix2()Ljava/lang/String;
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->MediacontentFix2()Ljava/lang/String;
|
||||
|
||||
move-result-object v7
|
||||
|
||||
|
||||
@@ -514,7 +514,7 @@
|
||||
|
||||
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Prefs;->MediacontentFix3()Ljava/lang/String;
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->MediacontentFix3()Ljava/lang/String;
|
||||
|
||||
move-result-object v1
|
||||
|
||||
|
||||
@@ -472,7 +472,7 @@
|
||||
|
||||
.prologue
|
||||
.line 41
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Helper;->BaseContextLocale(Landroid/content/Context;)Landroid/content/Context;
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Globals;->BaseContextLocale(Landroid/content/Context;)Landroid/content/Context;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
|
||||
@@ -3659,7 +3659,7 @@
|
||||
.line 1302
|
||||
iget-object v2, v1, Landroid/content/pm/PackageInfo;->versionName:Ljava/lang/String;
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Prefs;->VKVersion()Ljava/lang/String;
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->VKVersion()Ljava/lang/String;
|
||||
|
||||
move-result-object v2
|
||||
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
|
||||
const-class v1, Lcom/vtosters/lite/fragments/messages/dialogs/DialogsFragment;
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Prefs;->getStartFragment()Ljava/lang/Class;
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Newsfeed;->getStartFragment()Ljava/lang/Class;
|
||||
|
||||
move-result-object v1
|
||||
|
||||
@@ -129,7 +129,7 @@
|
||||
|
||||
move-result-object v1
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Prefs;->getStartFragment()Ljava/lang/Class;
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Newsfeed;->getStartFragment()Ljava/lang/Class;
|
||||
|
||||
move-result-object v1
|
||||
|
||||
@@ -661,7 +661,7 @@
|
||||
|
||||
move-result-object v0
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Prefs;->getStartFragment()Ljava/lang/Class;
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Newsfeed;->getStartFragment()Ljava/lang/Class;
|
||||
|
||||
move-result-object v1
|
||||
|
||||
@@ -755,7 +755,7 @@
|
||||
|
||||
move-result-object v1
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Prefs;->getStartFragment()Ljava/lang/Class;
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Newsfeed;->getStartFragment()Ljava/lang/Class;
|
||||
|
||||
move-result-object v1
|
||||
|
||||
|
||||
@@ -229,7 +229,7 @@
|
||||
|
||||
.prologue
|
||||
.line 41
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Helper;->BaseContextLocale(Landroid/content/Context;)Landroid/content/Context;
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Globals;->BaseContextLocale(Landroid/content/Context;)Landroid/content/Context;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
|
||||
@@ -414,7 +414,7 @@
|
||||
|
||||
.prologue
|
||||
.line 41
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Helper;->BaseContextLocale(Landroid/content/Context;)Landroid/content/Context;
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Globals;->BaseContextLocale(Landroid/content/Context;)Landroid/content/Context;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
|
||||
@@ -128,7 +128,7 @@
|
||||
|
||||
invoke-virtual {p0, p1, p2}, Lcom/vtosters/lite/api/newsfeed/NewsfeedCustomGet;->a(Ljava/lang/String;Ljava/lang/String;)Lcom/vk/api/base/ApiRequest;
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Prefs;->forceOffline()V
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->forceOffline()V
|
||||
|
||||
return-void
|
||||
.end method
|
||||
|
||||
@@ -503,7 +503,7 @@
|
||||
invoke-virtual {v0, v2, v1}, Lcom/vtosters/lite/api/newsfeed/NewsfeedGet;->a(Ljava/lang/String;Ljava/lang/String;)Lcom/vk/api/base/ApiRequest;
|
||||
|
||||
:cond_d
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Prefs;->forceOffline()V
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->forceOffline()V
|
||||
|
||||
return-void
|
||||
|
||||
@@ -531,7 +531,7 @@
|
||||
.method public static c(Z)J
|
||||
.locals 3
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Prefs;->feedautoupdate()Z
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->feedautoupdate()Z
|
||||
|
||||
move-result v0
|
||||
|
||||
@@ -730,7 +730,7 @@
|
||||
|
||||
move-result-object v2
|
||||
|
||||
invoke-static {v2}, Lru/vtosters/lite/utils/Prefs;->inject(Lorg/json/JSONObject;)Z
|
||||
invoke-static {v2}, Lru/vtosters/lite/utils/Newsfeed;->injectFilters(Lorg/json/JSONObject;)Z
|
||||
|
||||
move-result v10
|
||||
|
||||
|
||||
@@ -380,7 +380,7 @@
|
||||
|
||||
const-string v1, "libverify_support"
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Prefs;->libverify()Z
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->libverify()Z
|
||||
|
||||
move-result v2
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
.prologue
|
||||
.line 41
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Helper;->BaseContextLocale(Landroid/content/Context;)Landroid/content/Context;
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Globals;->BaseContextLocale(Landroid/content/Context;)Landroid/content/Context;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
|
||||
+1
-1
@@ -48,7 +48,7 @@
|
||||
|
||||
.prologue
|
||||
.line 41
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Helper;->BaseContextLocale(Landroid/content/Context;)Landroid/content/Context;
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Globals;->BaseContextLocale(Landroid/content/Context;)Landroid/content/Context;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
|
||||
+1
-1
@@ -323,7 +323,7 @@
|
||||
|
||||
.prologue
|
||||
.line 41
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Helper;->BaseContextLocale(Landroid/content/Context;)Landroid/content/Context;
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Globals;->BaseContextLocale(Landroid/content/Context;)Landroid/content/Context;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
|
||||
@@ -303,7 +303,7 @@
|
||||
|
||||
move-result-object v0
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Prefs;->getLocale()Ljava/lang/String;
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->getLocale()Ljava/lang/String;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
|
||||
move-result-object p1
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Prefs;->getAppVersion()Ljava/lang/String;
|
||||
invoke-static {}, Lru/vtosters/lite/utils/About;->getAppVersion()Ljava/lang/String;
|
||||
|
||||
move-result-object p1
|
||||
|
||||
|
||||
+1
-1
@@ -165,7 +165,7 @@
|
||||
|
||||
move-result-object v3
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Prefs;->gcmfix()Z
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->gcmfix()Z
|
||||
|
||||
move-result v5
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user