Refactoring + renaming
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
package bruhcollective.itaysonlab.libvkx.client;
|
||||
|
||||
import static ru.vtosters.lite.utils.Helper.*;
|
||||
import static ru.vtosters.lite.utils.Helper.getContext;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.RemoteException;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package bruhcollective.itaysonlab.libvkx.client;
|
||||
|
||||
import static ru.vtosters.lite.utils.Helper.*;
|
||||
import static ru.vtosters.lite.utils.Helper.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.*;
|
||||
import static ru.vtosters.lite.utils.Helper.getContext;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package ru.f0x1d.net;
|
||||
|
||||
import static ru.vtosters.lite.utils.Helper.*;
|
||||
import static ru.vtosters.lite.utils.Helper.getUserToken;
|
||||
|
||||
import android.os.AsyncTask;
|
||||
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
package ru.vtosters.lite.dnr;
|
||||
|
||||
import static ru.vtosters.lite.dnr.DNRModule.*;
|
||||
import static ru.vtosters.lite.utils.Helper.*;
|
||||
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 com.vk.im.engine.models.dialogs.Dialog;
|
||||
import com.vk.im.ui.components.common.DialogAction;
|
||||
@@ -9,8 +12,6 @@ import com.vk.im.ui.components.common.DialogAction;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
|
||||
import ru.vtosters.lite.utils.Helper;
|
||||
|
||||
public class DNRInjector {
|
||||
public static void inject(Dialog dialog, List<DialogAction> list) {
|
||||
int peerId = dialog.a();
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package ru.vtosters.lite.dnr;
|
||||
|
||||
import static ru.f0x1d.net.F0x1dRequest.*;
|
||||
import static ru.vtosters.lite.utils.Helper.*;
|
||||
import static ru.vtosters.lite.utils.Proxy.*;
|
||||
import static ru.f0x1d.net.F0x1dRequest.makeRequest;
|
||||
import static ru.vtosters.lite.utils.Helper.getUserToken;
|
||||
import static ru.vtosters.lite.utils.Proxy.getApiCom;
|
||||
|
||||
import com.vk.core.util.ToastUtils;
|
||||
import com.vk.im.engine.commands.messages.SetUserActivityCmd;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package ru.vtosters.lite.dnr.helpers;
|
||||
|
||||
import static ru.vtosters.lite.utils.Helper.*;
|
||||
import static ru.vtosters.lite.utils.Helper.getContext;
|
||||
|
||||
import android.content.ContentValues;
|
||||
import android.database.Cursor;
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package ru.vtosters.lite.dnr.helpers;
|
||||
|
||||
import static ru.vtosters.lite.utils.Helper.getContext;
|
||||
|
||||
import android.content.ContentValues;
|
||||
import android.database.Cursor;
|
||||
import android.database.sqlite.SQLiteDatabase;
|
||||
@@ -9,11 +11,10 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import ru.vtosters.lite.dnr.DNRPrefs;
|
||||
import ru.vtosters.lite.utils.Helper;
|
||||
|
||||
public class DoNotTypeDBHelper extends SQLiteOpenHelper {
|
||||
public DoNotTypeDBHelper() {
|
||||
super(Helper.getContext(), "dnt", null, 1);
|
||||
super(getContext(), "dnt", null, 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package ru.vtosters.lite.f0x1d;
|
||||
|
||||
import static ru.vtosters.lite.utils.Helper.*;
|
||||
import static ru.vtosters.lite.utils.Helper.getContext;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.Notification;
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
package ru.vtosters.lite.f0x1d;
|
||||
|
||||
import static android.widget.Toast.*;
|
||||
import static ru.vtosters.lite.utils.Helper.*;
|
||||
import static android.widget.Toast.LENGTH_SHORT;
|
||||
import static android.widget.Toast.makeText;
|
||||
import static ru.vtosters.lite.utils.Helper.getContext;
|
||||
|
||||
import android.app.NotificationManager;
|
||||
import android.app.Service;
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
package ru.vtosters.lite.foaf;
|
||||
|
||||
import static android.widget.Toast.*;
|
||||
import static ru.vtosters.lite.utils.Helper.*;
|
||||
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.Proxy.getApiCom;
|
||||
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.exifinterface.media.ExifInterface;
|
||||
|
||||
@@ -27,7 +26,6 @@ import java.util.regex.Pattern;
|
||||
import okhttp3.OkHttpClient;
|
||||
import okhttp3.Request;
|
||||
import ru.f0x1d.net.F0x1dRequest;
|
||||
import ru.vtosters.lite.utils.Helper;
|
||||
import ru.vtosters.lite.utils.Prefs;
|
||||
|
||||
public class FoafBase {
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
package ru.vtosters.lite.tgs;
|
||||
|
||||
import static ru.vtosters.lite.utils.Helper.getContext;
|
||||
|
||||
import android.content.SharedPreferences;
|
||||
import android.preference.PreferenceManager;
|
||||
|
||||
import ru.vtosters.lite.utils.Helper;
|
||||
|
||||
public class TGPref {
|
||||
private static final SharedPreferences Prefs = PreferenceManager.getDefaultSharedPreferences(Helper.getContext());
|
||||
private static final SharedPreferences Prefs = PreferenceManager.getDefaultSharedPreferences(getContext());
|
||||
|
||||
private static final String CNCT_METHOD = "VTGS:CM";
|
||||
private static final String TG_BOTKEY = "VTGS:BKey";
|
||||
@@ -57,8 +57,7 @@ public class TGPref {
|
||||
}
|
||||
|
||||
public static void setTGProxyUserPass(String user, String pass) {
|
||||
Prefs.edit().putString(TG_PROXYUSER, user).putString(TG_PROXYPASS, pass)
|
||||
.apply();
|
||||
Prefs.edit().putString(TG_PROXYUSER, user).putString(TG_PROXYPASS, pass).apply();
|
||||
}
|
||||
|
||||
public static boolean isTGProxyPassEnabled() {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package ru.vtosters.lite.tgs;
|
||||
|
||||
import static ru.vtosters.lite.utils.Helper.*;
|
||||
import static ru.vtosters.lite.utils.Helper.getContext;
|
||||
import static ru.vtosters.lite.utils.Helper.getString;
|
||||
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapFactory;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package ru.vtosters.lite.ui;
|
||||
|
||||
import static ru.vtosters.lite.utils.Helper.*;
|
||||
import static ru.vtosters.lite.utils.Helper.convertDpToPixel;
|
||||
import static ru.vtosters.lite.utils.Helper.getContext;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.content.Context;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package ru.vtosters.lite.ui.dialogs;
|
||||
|
||||
import static ru.vtosters.lite.utils.Helper.*;
|
||||
import static ru.vtosters.lite.utils.Helper.edit;
|
||||
import static ru.vtosters.lite.utils.Helper.getContext;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package ru.vtosters.lite.ui.dialogs;
|
||||
|
||||
import static ru.vtosters.lite.utils.Helper.*;
|
||||
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 android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package ru.vtosters.lite.ui.dialogs;
|
||||
|
||||
import static ru.vtosters.lite.utils.Helper.*;
|
||||
import static ru.vtosters.lite.utils.Helper.edit;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
@@ -9,7 +9,6 @@ import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
|
||||
import ru.vtosters.lite.utils.Helper;
|
||||
import ru.vtosters.lite.utils.OEMDetector;
|
||||
import ru.vtosters.lite.utils.Prefs;
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package ru.vtosters.lite.ui.fragments;
|
||||
|
||||
import static ru.vtosters.lite.utils.Helper.getString;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.preference.Preference;
|
||||
|
||||
@@ -7,8 +9,6 @@ import com.vk.core.util.ToastUtils;
|
||||
import com.vtosters.lite.R;
|
||||
import com.vtosters.lite.fragments.MaterialPreferenceToolbarFragment;
|
||||
|
||||
import ru.vtosters.lite.utils.Helper;
|
||||
|
||||
public class InterfaceFragment extends MaterialPreferenceToolbarFragment {
|
||||
@Override
|
||||
public void b(Bundle bundle) {
|
||||
@@ -22,7 +22,7 @@ public class InterfaceFragment extends MaterialPreferenceToolbarFragment {
|
||||
}
|
||||
|
||||
public boolean restart(Preference preference, Object obj) {
|
||||
ToastUtils.a(Helper.getString("restartapp"));
|
||||
ToastUtils.a(getString("restartapp"));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
package ru.vtosters.lite.ui.fragments;
|
||||
|
||||
import static android.widget.Toast.*;
|
||||
import static ru.vtosters.lite.utils.Helper.*;
|
||||
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.SettBackup.backupSettings;
|
||||
import static ru.vtosters.lite.utils.SettBackup.deletePrefs;
|
||||
import static ru.vtosters.lite.utils.SettBackup.restoreBackup;
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
package ru.vtosters.lite.ui.fragments;
|
||||
|
||||
import static ru.vtosters.lite.utils.Helper.getString;
|
||||
import static ru.vtosters.lite.utils.IconHelper.switchToDefault;
|
||||
import static ru.vtosters.lite.utils.IconHelper.switchToVK;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.preference.Preference;
|
||||
|
||||
@@ -7,9 +11,6 @@ import com.vk.core.util.ToastUtils;
|
||||
import com.vtosters.lite.R;
|
||||
import com.vtosters.lite.fragments.MaterialPreferenceToolbarFragment;
|
||||
|
||||
import ru.vtosters.lite.utils.Helper;
|
||||
import ru.vtosters.lite.utils.IconHelper;
|
||||
|
||||
public class ThemesFragment extends MaterialPreferenceToolbarFragment {
|
||||
|
||||
@Override
|
||||
@@ -21,11 +22,11 @@ public class ThemesFragment extends MaterialPreferenceToolbarFragment {
|
||||
|
||||
public boolean apply(Preference preference, Object obj) {
|
||||
if (((Boolean) obj).booleanValue()) {
|
||||
IconHelper.switchToVK();
|
||||
switchToVK();
|
||||
} else {
|
||||
IconHelper.switchToDefault();
|
||||
switchToDefault();
|
||||
}
|
||||
ToastUtils.a(Helper.getString("iconapplying"));
|
||||
ToastUtils.a(getString("iconapplying"));
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -38,7 +39,7 @@ public class ThemesFragment extends MaterialPreferenceToolbarFragment {
|
||||
public static class b implements Preference.b {
|
||||
@Override // android.support.v7.preference.Preference.b
|
||||
public boolean a(Preference preference, Object obj) {
|
||||
ToastUtils.a(Helper.getString("restartapp"));
|
||||
ToastUtils.a(getString("restartapp"));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package ru.vtosters.lite.ui.fragments.dockbar;
|
||||
|
||||
import static ru.vtosters.lite.utils.Helper.*;
|
||||
import static ru.vtosters.lite.utils.Helper.convertDpToPixel;
|
||||
import static ru.vtosters.lite.utils.Helper.getContext;
|
||||
|
||||
import android.content.res.ColorStateList;
|
||||
import android.graphics.Typeface;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package ru.vtosters.lite.ui.fragments.dockbar;
|
||||
|
||||
import static ru.vtosters.lite.utils.Helper.*;
|
||||
import static ru.vtosters.lite.utils.Helper.convertDpToPixel;
|
||||
import static ru.vtosters.lite.utils.Helper.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.*;
|
||||
import static ru.vtosters.lite.utils.Helper.getContext;
|
||||
|
||||
import android.content.res.ColorStateList;
|
||||
import android.graphics.drawable.Drawable;
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package ru.vtosters.lite.ui.fragments.dockbar;
|
||||
|
||||
import static ru.vtosters.lite.utils.Helper.getContext;
|
||||
|
||||
import com.vk.apps.AppsFragment;
|
||||
import com.vk.discover.DiscoverFeedFragment;
|
||||
import com.vk.discover.DiscoverFragment;
|
||||
@@ -40,7 +42,6 @@ import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import ru.vtosters.lite.utils.Helper;
|
||||
import ru.vtosters.lite.utils.Prefs;
|
||||
|
||||
public class DockBarManager {
|
||||
@@ -75,7 +76,7 @@ public class DockBarManager {
|
||||
}
|
||||
|
||||
private void load() {
|
||||
File dockbar = new File(Helper.getContext().getFilesDir(), "dockbar.json");
|
||||
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));
|
||||
@@ -163,13 +164,13 @@ public class DockBarManager {
|
||||
}
|
||||
|
||||
public void delete() {
|
||||
File dockbar = new File(Helper.getContext().getFilesDir(), "dockbar.json");
|
||||
File dockbar = new File(getContext().getFilesDir(), "dockbar.json");
|
||||
if (dockbar.exists()) dockbar.delete();
|
||||
}
|
||||
|
||||
public void save() {
|
||||
try {
|
||||
File dockbar = new File(Helper.getContext().getFilesDir(), "dockbar.json");
|
||||
File dockbar = new File(getContext().getFilesDir(), "dockbar.json");
|
||||
|
||||
JSONArray selected = new JSONArray();
|
||||
for (DockBarTab tab : mSelectedTabs) {
|
||||
|
||||
+6
-2
@@ -1,7 +1,11 @@
|
||||
package ru.vtosters.lite.ui.fragments.multiaccount;
|
||||
|
||||
import static ru.vtosters.lite.utils.Helper.*;
|
||||
import static ru.vtosters.lite.utils.Themes.*;
|
||||
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.Themes.getTextAttr;
|
||||
import static ru.vtosters.lite.utils.Themes.recolorDrawable;
|
||||
|
||||
import android.graphics.Typeface;
|
||||
import android.graphics.drawable.Drawable;
|
||||
|
||||
+3
-2
@@ -1,5 +1,7 @@
|
||||
package ru.vtosters.lite.ui.fragments.multiaccount;
|
||||
|
||||
import static ru.vtosters.lite.utils.Helper.getString;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.widget.LinearLayoutManager;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
@@ -9,7 +11,6 @@ import android.view.ViewGroup;
|
||||
import android.widget.LinearLayout;
|
||||
|
||||
import me.grishka.appkit.fragments.ToolbarFragment;
|
||||
import ru.vtosters.lite.utils.Helper;
|
||||
|
||||
public class MultiAccountFragment extends ToolbarFragment {
|
||||
|
||||
@@ -36,6 +37,6 @@ public class MultiAccountFragment extends ToolbarFragment {
|
||||
|
||||
super.a(arg0, arg1);
|
||||
|
||||
a(Helper.getString("accounts"));
|
||||
a(getString("accounts"));
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
package ru.vtosters.lite.ui.fragments.multiaccount;
|
||||
|
||||
import static ru.vtosters.lite.utils.Helper.*;
|
||||
import static ru.vtosters.lite.utils.Helper.getContext;
|
||||
import static ru.vtosters.lite.utils.Helper.getPreferences;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
|
||||
@@ -1,8 +1,16 @@
|
||||
package ru.vtosters.lite.ui.fragments.tgstickers;
|
||||
|
||||
import static android.widget.Toast.*;
|
||||
import static ru.vtosters.lite.utils.Helper.*;
|
||||
import static ru.vtosters.lite.utils.Themes.*;
|
||||
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.Themes.getAccentColor;
|
||||
import static ru.vtosters.lite.utils.Themes.getSTextAttr;
|
||||
import static ru.vtosters.lite.utils.Themes.getTextAttr;
|
||||
import static ru.vtosters.lite.utils.Themes.recolorDrawable;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.app.ProgressDialog;
|
||||
|
||||
+2
-1
@@ -1,6 +1,7 @@
|
||||
package ru.vtosters.lite.ui.fragments.tgstickers;
|
||||
|
||||
import static ru.vtosters.lite.utils.Helper.*;
|
||||
import static ru.vtosters.lite.utils.Helper.getContext;
|
||||
import static ru.vtosters.lite.utils.Helper.getString;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package ru.vtosters.lite.utils;
|
||||
|
||||
import static ru.vtosters.lite.utils.Helper.*;
|
||||
import static ru.vtosters.lite.utils.Helper.getContext;
|
||||
import static ru.vtosters.lite.utils.Helper.isEmpty;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.content.Context;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package ru.vtosters.lite.utils;
|
||||
|
||||
import static ru.vtosters.lite.utils.Proxy.*;
|
||||
import static ru.vtosters.lite.utils.Prefs.getLocale;
|
||||
|
||||
import android.app.NotificationChannel;
|
||||
import android.app.NotificationManager;
|
||||
@@ -15,7 +15,6 @@ import android.os.Build;
|
||||
import android.preference.PreferenceManager;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.StringRes;
|
||||
|
||||
import com.vk.core.util.ToastUtils;
|
||||
import com.vtosters.lite.UserProfile;
|
||||
@@ -24,8 +23,10 @@ import com.vtosters.lite.auth.VKAccountManager;
|
||||
import com.vtosters.lite.im.ImEngineProvider;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.Locale;
|
||||
|
||||
public class Helper {
|
||||
// Current UserId
|
||||
public static int getUserId() {
|
||||
return VKAccountManager.b().a();
|
||||
}
|
||||
@@ -42,10 +43,12 @@ public class Helper {
|
||||
return PreferenceManager.getDefaultSharedPreferences(getContext()).edit();
|
||||
}
|
||||
|
||||
// Delete and reload msg cache
|
||||
public static void reloadMSG() {
|
||||
ImEngineProvider.a().h();
|
||||
}
|
||||
|
||||
// UserId Profile via userProfile
|
||||
public static int getUserID(UserProfile userProfile) {
|
||||
return userProfile.n;
|
||||
}
|
||||
@@ -58,6 +61,7 @@ public class Helper {
|
||||
return userProfile.o;
|
||||
}
|
||||
|
||||
// UserId Profile via extendedUserProfile
|
||||
public static int getUserID(ExtendedUserProfile extendedUserProfile) {
|
||||
return getUserID(fromEup(extendedUserProfile));
|
||||
}
|
||||
@@ -81,10 +85,8 @@ public class Helper {
|
||||
public static Context getContext() {
|
||||
try {
|
||||
Class<?> appGlobalsClazz = Class.forName("android.app.AppGlobals");
|
||||
|
||||
Method getInitialApplication = appGlobalsClazz.getDeclaredMethod("getInitialApplication");
|
||||
getInitialApplication.setAccessible(true);
|
||||
|
||||
return (Context) getInitialApplication.invoke(null);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
@@ -119,7 +121,7 @@ public class Helper {
|
||||
}
|
||||
|
||||
public static int convertDpToPixel(float f) {
|
||||
return (int) (f * (((float) getContext().getResources().getDisplayMetrics().densityDpi) / 160.0f));
|
||||
return (int) (f * ((float) getContext().getResources().getDisplayMetrics().densityDpi / 160.0f));
|
||||
}
|
||||
|
||||
public static SharedPreferences getPreferences() {
|
||||
@@ -140,6 +142,7 @@ public class Helper {
|
||||
return activeNetwork != null && activeNetwork.isConnectedOrConnecting();
|
||||
}
|
||||
|
||||
// Music channels fix
|
||||
public static void fixGapps() {
|
||||
try {
|
||||
if (Build.VERSION.SDK_INT >= 26) {
|
||||
@@ -158,4 +161,21 @@ public class Helper {
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
}
|
||||
|
||||
// Language changer and BaseContext inject
|
||||
public static Context BaseContextLocale(Context context) {
|
||||
Locale locale = new Locale(getLocale());
|
||||
Locale.setDefault(locale);
|
||||
var resources = context.getResources();
|
||||
var configuration = resources.getConfiguration();
|
||||
if (Build.VERSION.SDK_INT >= 24) {
|
||||
configuration.setLocale(locale);
|
||||
configuration.setLayoutDirection(locale);
|
||||
return context.createConfigurationContext(configuration);
|
||||
}
|
||||
configuration.locale = locale;
|
||||
configuration.setLayoutDirection(locale);
|
||||
resources.updateConfiguration(configuration, resources.getDisplayMetrics());
|
||||
return context;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package ru.vtosters.lite.utils;
|
||||
|
||||
import static ru.vtosters.lite.utils.Helper.*;
|
||||
import static ru.vtosters.lite.utils.Helper.getContext;
|
||||
import static ru.vtosters.lite.utils.Helper.getPackageName;
|
||||
|
||||
import android.content.ComponentName;
|
||||
import android.content.pm.PackageManager;
|
||||
|
||||
@@ -1,19 +1,21 @@
|
||||
package ru.vtosters.lite.utils;
|
||||
|
||||
import static ru.vtosters.lite.ui.fragments.multiaccount.MultiAccountManager.*;
|
||||
import static ru.vtosters.lite.utils.Helper.*;
|
||||
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.app.NotificationChannel;
|
||||
import android.app.NotificationManager;
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.view.Window;
|
||||
|
||||
import com.vk.about.Items;
|
||||
import com.vk.about.Items1;
|
||||
@@ -55,9 +57,6 @@ import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Scanner;
|
||||
|
||||
import ru.vtosters.lite.ui.fragments.dockbar.DockBarManager;
|
||||
import ru.vtosters.lite.ui.fragments.multiaccount.MultiAccountManager;
|
||||
|
||||
public class Prefs {
|
||||
private static final List<Activity> activities = new ArrayList<>();
|
||||
public static String VERSIONNAME = "2.0 Beta";
|
||||
@@ -149,7 +148,7 @@ public class Prefs {
|
||||
}
|
||||
|
||||
public static boolean copyright_post() {
|
||||
return BooleanTrue("copyright_post");
|
||||
return BooleanFalse("copyright_post");
|
||||
}
|
||||
|
||||
public static boolean darkmode() {
|
||||
@@ -255,10 +254,6 @@ public class Prefs {
|
||||
return "0000000";
|
||||
}
|
||||
|
||||
public static String getBranch() {
|
||||
return getPreferences().getString("ota_branches", "Stable");
|
||||
}
|
||||
|
||||
public static String getDarkVKUI() {
|
||||
return !VKThemeHelper.d() ? "1" : "0";
|
||||
}
|
||||
@@ -371,40 +366,6 @@ public class Prefs {
|
||||
return ads() ? "null" : "promo_button";
|
||||
}
|
||||
|
||||
public static String proxyHostHTTP() {
|
||||
String string = getPreferences().getString("proxyHostHTTP", "");
|
||||
return string.isEmpty() ? "192.168.0.1" : string;
|
||||
}
|
||||
|
||||
public static String proxyHostHTTPS() {
|
||||
String string = getPreferences().getString("proxyHostHTTPS", "");
|
||||
return string.isEmpty() ? "192.168.0.1" : string;
|
||||
}
|
||||
|
||||
public static String proxyHostSocks() {
|
||||
String string = getPreferences().getString("proxyHostSocks", "");
|
||||
return string.isEmpty() ? "192.168.0.1" : string;
|
||||
}
|
||||
|
||||
public static String proxyPortHTTP() {
|
||||
String string = getPreferences().getString("proxyPortHTTP", "");
|
||||
return string.isEmpty() ? "8888" : string;
|
||||
}
|
||||
|
||||
public static String proxyPortHTTPS() {
|
||||
String string = getPreferences().getString("proxyPortHTTPS", "");
|
||||
return string.isEmpty() ? "8888" : string;
|
||||
}
|
||||
|
||||
public static String proxyPortSocks() {
|
||||
String string = getPreferences().getString("proxyPortSocks", "");
|
||||
return string.isEmpty() ? "8888" : string;
|
||||
}
|
||||
|
||||
public static boolean proxyvk() {
|
||||
return BooleanFalse("proxyvk");
|
||||
}
|
||||
|
||||
public static String readstatus() {
|
||||
return dnr() ? "messages.markAsRead" : "null";
|
||||
}
|
||||
@@ -486,12 +447,6 @@ public class Prefs {
|
||||
return customvalue.isEmpty() ? 30 : Integer.parseInt(customvalue);
|
||||
}
|
||||
|
||||
public static void setNavbarColor(Window window, int i) {
|
||||
if (navbar() && Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
window.setNavigationBarColor(getNavbarColor());
|
||||
}
|
||||
}
|
||||
|
||||
public static String MediacontentFix() {
|
||||
return Build.VERSION.SDK_INT >= 29 ? "date_modified DESC" : "datetaken DESC";
|
||||
}
|
||||
@@ -724,7 +679,7 @@ public class Prefs {
|
||||
}
|
||||
|
||||
private static void registerActivities(Application application) {
|
||||
application.registerActivityLifecycleCallbacks(new Application.ActivityLifecycleCallbacks() { // from class: ru.vtoster2.VTCore.1
|
||||
application.registerActivityLifecycleCallbacks(new Application.ActivityLifecycleCallbacks() {
|
||||
@Override // android.app.Application.ActivityLifecycleCallbacks
|
||||
public void onActivityPaused(Activity activity) {
|
||||
}
|
||||
@@ -766,7 +721,7 @@ public class Prefs {
|
||||
public static Class getStartFragment() {
|
||||
String string = getPreferences().getString("start_values", "");
|
||||
if (string.equals("default")) {
|
||||
return DockBarManager.getInstance().getSelectedTabs().get(0).fragmentClass;
|
||||
return getInstance().getSelectedTabs().get(0).fragmentClass;
|
||||
}
|
||||
if (string.equals("newsfeed")) {
|
||||
return Feed2049.b.c();
|
||||
@@ -822,22 +777,6 @@ public class Prefs {
|
||||
if (string.equals("docs")) {
|
||||
return DocumentsViewFragment.class;
|
||||
}
|
||||
return string.equals("brtd") ? BirthdaysFragment.class : DockBarManager.getInstance().getSelectedTabs().get(0).fragmentClass;
|
||||
}
|
||||
|
||||
public static Context BaseContextLocale(Context context) {
|
||||
Locale locale = new Locale(getLocale());
|
||||
Locale.setDefault(locale);
|
||||
var resources = context.getResources();
|
||||
var configuration = resources.getConfiguration();
|
||||
if (Build.VERSION.SDK_INT >= 24) {
|
||||
configuration.setLocale(locale);
|
||||
configuration.setLayoutDirection(locale);
|
||||
return context.createConfigurationContext(configuration);
|
||||
}
|
||||
configuration.locale = locale;
|
||||
configuration.setLayoutDirection(locale);
|
||||
resources.updateConfiguration(configuration, resources.getDisplayMetrics());
|
||||
return context;
|
||||
return string.equals("brtd") ? BirthdaysFragment.class : getInstance().getSelectedTabs().get(0).fragmentClass;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,8 @@
|
||||
package ru.vtosters.lite.utils;
|
||||
|
||||
import static ru.vtosters.lite.utils.Helper.*;
|
||||
import static ru.vtosters.lite.utils.Prefs.proxyHostHTTP;
|
||||
import static ru.vtosters.lite.utils.Prefs.proxyHostHTTPS;
|
||||
import static ru.vtosters.lite.utils.Prefs.proxyHostSocks;
|
||||
import static ru.vtosters.lite.utils.Prefs.proxyPortHTTP;
|
||||
import static ru.vtosters.lite.utils.Prefs.proxyPortHTTPS;
|
||||
import static ru.vtosters.lite.utils.Prefs.proxyPortSocks;
|
||||
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 java.util.Properties;
|
||||
|
||||
@@ -45,7 +41,7 @@ public class Proxy {
|
||||
|
||||
public static String getApiCom() {
|
||||
String string = getPreferences().getString("proxyapi", "");
|
||||
if (!Prefs.proxy() & string.isEmpty()) {
|
||||
if (!proxy() & string.isEmpty()) {
|
||||
return "api.vk.com";
|
||||
}
|
||||
return string;
|
||||
@@ -53,7 +49,7 @@ public class Proxy {
|
||||
|
||||
public static String getAwayPhpCom() {
|
||||
String string = getPreferences().getString("proxyapi", "");
|
||||
if (!Prefs.proxy() & string.isEmpty()) {
|
||||
if (!proxy() & string.isEmpty()) {
|
||||
return "m.vk.com";
|
||||
}
|
||||
return string;
|
||||
@@ -61,7 +57,7 @@ public class Proxy {
|
||||
|
||||
public static String getOauthCom() {
|
||||
String string = getPreferences().getString("proxyoauth", "");
|
||||
if (!Prefs.proxy() & string.isEmpty()) {
|
||||
if (!proxy() & string.isEmpty()) {
|
||||
return "oauth.vk.com";
|
||||
}
|
||||
return string;
|
||||
@@ -69,7 +65,7 @@ public class Proxy {
|
||||
|
||||
public static String getStaticCom() {
|
||||
String string = getPreferences().getString("proxystatic", "");
|
||||
if (!Prefs.proxy() & string.isEmpty()) {
|
||||
if (!proxy() & string.isEmpty()) {
|
||||
return "static.vk.com";
|
||||
}
|
||||
return string;
|
||||
@@ -78,28 +74,13 @@ public class Proxy {
|
||||
public static String staticFix(String str) {
|
||||
String str2;
|
||||
String string = getPreferences().getString("proxystatic", "");
|
||||
if (!Prefs.proxy() & string.isEmpty()) {
|
||||
if (!proxy() & string.isEmpty()) {
|
||||
return str;
|
||||
}
|
||||
str2 = string;
|
||||
return str.replace(str2, "static.vk.com");
|
||||
}
|
||||
|
||||
public static String GetConnector(String str) {
|
||||
if (!Prefs.proxy()) {
|
||||
return str;
|
||||
}
|
||||
if (str.startsWith("https://")) {
|
||||
String replace = str.replace("https://", "");
|
||||
return "https://" + getApiCom() + "/_/" + replace;
|
||||
} else if (str.startsWith("http://")) {
|
||||
String replace2 = str.replace("http://", "");
|
||||
return "http://" + getApiCom() + "/_/" + replace2;
|
||||
} else {
|
||||
return getApiCom() + "/_/" + str;
|
||||
}
|
||||
}
|
||||
|
||||
public static void setProxy() {
|
||||
switch (getPreferences().getString("proxy", "")) {
|
||||
case "zaborona":
|
||||
@@ -148,4 +129,39 @@ public class Proxy {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public static String proxyHostHTTP() {
|
||||
String string = getPreferences().getString("proxyHostHTTP", "");
|
||||
return string.isEmpty() ? "192.168.0.1" : string;
|
||||
}
|
||||
|
||||
public static String proxyHostHTTPS() {
|
||||
String string = getPreferences().getString("proxyHostHTTPS", "");
|
||||
return string.isEmpty() ? "192.168.0.1" : string;
|
||||
}
|
||||
|
||||
public static String proxyHostSocks() {
|
||||
String string = getPreferences().getString("proxyHostSocks", "");
|
||||
return string.isEmpty() ? "192.168.0.1" : string;
|
||||
}
|
||||
|
||||
public static String proxyPortHTTP() {
|
||||
String string = getPreferences().getString("proxyPortHTTP", "");
|
||||
return string.isEmpty() ? "8888" : string;
|
||||
}
|
||||
|
||||
public static String proxyPortHTTPS() {
|
||||
String string = getPreferences().getString("proxyPortHTTPS", "");
|
||||
return string.isEmpty() ? "8888" : string;
|
||||
}
|
||||
|
||||
public static String proxyPortSocks() {
|
||||
String string = getPreferences().getString("proxyPortSocks", "");
|
||||
return string.isEmpty() ? "8888" : string;
|
||||
}
|
||||
|
||||
// Official vk proxy enforcer
|
||||
public static boolean proxyvk() {
|
||||
return BooleanFalse("proxyvk");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,13 +1,17 @@
|
||||
package ru.vtosters.lite.utils;
|
||||
|
||||
import static ru.vtosters.lite.utils.Helper.*;
|
||||
import static ru.vtosters.lite.utils.Prefs.*;
|
||||
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 android.content.Context;
|
||||
import android.content.res.ColorStateList;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Build;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import android.view.Window;
|
||||
import android.widget.ImageButton;
|
||||
|
||||
import com.vk.core.d.RecoloredDrawable;
|
||||
@@ -168,6 +172,12 @@ public class Themes {
|
||||
return getContext().getResources().getColor(i);
|
||||
}
|
||||
|
||||
public static void setNavbarColor(Window window, int i) {
|
||||
if (navbar() && Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
window.setNavigationBarColor(getNavbarColor());
|
||||
}
|
||||
}
|
||||
|
||||
public static String hex(int i) {
|
||||
return String.format("#%06X", Integer.valueOf(i & 16777215));
|
||||
}
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
package ru.vtosters.lite.utils;
|
||||
|
||||
import static ru.vtosters.lite.utils.Helper.*;
|
||||
import static ru.vtosters.lite.utils.Themes.*;
|
||||
import static ru.vtosters.lite.utils.Helper.getContext;
|
||||
import static ru.vtosters.lite.utils.Helper.getPreferences;
|
||||
import static ru.vtosters.lite.utils.Themes.getColorFromAttr;
|
||||
import static ru.vtosters.lite.utils.Themes.hex;
|
||||
|
||||
import android.util.Base64;
|
||||
import android.webkit.WebView;
|
||||
|
||||
@@ -927,7 +927,7 @@
|
||||
|
||||
invoke-virtual {p1, v0}, Landroid/view/Window;->setBackgroundDrawableResource(I)V
|
||||
|
||||
invoke-static {p1, v0}, Lru/vtosters/lite/utils/Prefs;->setNavbarColor(Landroid/view/Window;I)V
|
||||
invoke-static {p1, v0}, Lru/vtosters/lite/utils/Themes;->setNavbarColor(Landroid/view/Window;I)V
|
||||
|
||||
return-void
|
||||
.end method
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
|
||||
move-result v0
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Prefs;->proxyvk()Z
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Proxy;->proxyvk()Z
|
||||
|
||||
move-result v0
|
||||
|
||||
|
||||
@@ -255,7 +255,7 @@
|
||||
|
||||
move-result v0
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Prefs;->proxyvk()Z
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Proxy;->proxyvk()Z
|
||||
|
||||
move-result v0
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@
|
||||
|
||||
.prologue
|
||||
.line 41
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Prefs;->BaseContextLocale(Landroid/content/Context;)Landroid/content/Context;
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Helper;->BaseContextLocale(Landroid/content/Context;)Landroid/content/Context;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
@@ -195,7 +195,7 @@
|
||||
|
||||
invoke-virtual {p1, v0}, Landroid/view/Window;->setBackgroundDrawableResource(I)V
|
||||
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Prefs;->setNavbarColor(Landroid/view/Window;I)V
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Themes;->setNavbarColor(Landroid/view/Window;I)V
|
||||
|
||||
.line 42
|
||||
invoke-virtual {p0}, Lcom/vtosters/lite/VKFragmentActivity;->isTaskRoot()Z
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
.prologue
|
||||
.line 41
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Prefs;->BaseContextLocale(Landroid/content/Context;)Landroid/content/Context;
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Helper;->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/Prefs;->BaseContextLocale(Landroid/content/Context;)Landroid/content/Context;
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Helper;->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/Prefs;->BaseContextLocale(Landroid/content/Context;)Landroid/content/Context;
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Helper;->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/Prefs;->BaseContextLocale(Landroid/content/Context;)Landroid/content/Context;
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Helper;->BaseContextLocale(Landroid/content/Context;)Landroid/content/Context;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
|
||||
@@ -648,7 +648,7 @@
|
||||
|
||||
invoke-virtual {v0, v9}, Landroid/view/Window;->setStatusBarColor(I)V
|
||||
|
||||
invoke-static {v0, v9}, Lru/vtosters/lite/utils/Prefs;->setNavbarColor(Landroid/view/Window;I)V
|
||||
invoke-static {v0, v9}, Lru/vtosters/lite/utils/Themes;->setNavbarColor(Landroid/view/Window;I)V
|
||||
|
||||
.line 97
|
||||
:cond_10
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
.line 28
|
||||
invoke-virtual {p0, p1}, Landroid/view/Window;->setStatusBarColor(I)V
|
||||
|
||||
invoke-static {p0, p1}, Lru/vtosters/lite/utils/Prefs;->setNavbarColor(Landroid/view/Window;I)V
|
||||
invoke-static {p0, p1}, Lru/vtosters/lite/utils/Themes;->setNavbarColor(Landroid/view/Window;I)V
|
||||
|
||||
:cond_1
|
||||
return-void
|
||||
|
||||
@@ -186,7 +186,7 @@
|
||||
|
||||
.prologue
|
||||
.line 41
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Prefs;->BaseContextLocale(Landroid/content/Context;)Landroid/content/Context;
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Helper;->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/Prefs;->BaseContextLocale(Landroid/content/Context;)Landroid/content/Context;
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Helper;->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/Prefs;->BaseContextLocale(Landroid/content/Context;)Landroid/content/Context;
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Helper;->BaseContextLocale(Landroid/content/Context;)Landroid/content/Context;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
@@ -399,7 +399,7 @@
|
||||
|
||||
invoke-virtual {p1, v0}, Landroid/view/Window;->setStatusBarColor(I)V
|
||||
|
||||
invoke-static {p1, v0}, Lru/vtosters/lite/utils/Prefs;->setNavbarColor(Landroid/view/Window;I)V
|
||||
invoke-static {p1, v0}, Lru/vtosters/lite/utils/Themes;->setNavbarColor(Landroid/view/Window;I)V
|
||||
|
||||
:cond_0
|
||||
return-void
|
||||
@@ -442,7 +442,7 @@
|
||||
|
||||
invoke-virtual {p1, v0}, Landroid/view/Window;->setStatusBarColor(I)V
|
||||
|
||||
invoke-static {p1, v0}, Lru/vtosters/lite/utils/Prefs;->setNavbarColor(Landroid/view/Window;I)V
|
||||
invoke-static {p1, v0}, Lru/vtosters/lite/utils/Themes;->setNavbarColor(Landroid/view/Window;I)V
|
||||
|
||||
:cond_0
|
||||
return-void
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
|
||||
invoke-virtual {v1, v2}, Landroid/view/Window;->setBackgroundDrawableResource(I)V
|
||||
|
||||
invoke-static {v1, v2}, Lru/vtosters/lite/utils/Prefs;->setNavbarColor(Landroid/view/Window;I)V
|
||||
invoke-static {v1, v2}, Lru/vtosters/lite/utils/Themes;->setNavbarColor(Landroid/view/Window;I)V
|
||||
|
||||
:cond_1
|
||||
return-object v0
|
||||
@@ -140,7 +140,7 @@
|
||||
|
||||
invoke-virtual {v2, v3}, Landroid/view/Window;->setBackgroundDrawableResource(I)V
|
||||
|
||||
invoke-static {v2, v3}, Lru/vtosters/lite/utils/Prefs;->setNavbarColor(Landroid/view/Window;I)V
|
||||
invoke-static {v2, v3}, Lru/vtosters/lite/utils/Themes;->setNavbarColor(Landroid/view/Window;I)V
|
||||
:try_end_0
|
||||
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
|
||||
|
||||
|
||||
@@ -1095,7 +1095,7 @@
|
||||
.line 854
|
||||
invoke-virtual {p0, p1}, Landroid/view/Window;->setStatusBarColor(I)V
|
||||
|
||||
invoke-static {p0, p1}, Lru/vtosters/lite/utils/Prefs;->setNavbarColor(Landroid/view/Window;I)V
|
||||
invoke-static {p0, p1}, Lru/vtosters/lite/utils/Themes;->setNavbarColor(Landroid/view/Window;I)V
|
||||
:try_end_0
|
||||
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
|
||||
|
||||
|
||||
@@ -127,7 +127,7 @@
|
||||
|
||||
invoke-virtual {p1, p2}, Landroid/view/Window;->setBackgroundDrawableResource(I)V
|
||||
|
||||
invoke-static {p1, p2}, Lru/vtosters/lite/utils/Prefs;->setNavbarColor(Landroid/view/Window;I)V
|
||||
invoke-static {p1, p2}, Lru/vtosters/lite/utils/Themes;->setNavbarColor(Landroid/view/Window;I)V
|
||||
|
||||
return-void
|
||||
.end method
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
|
||||
.prologue
|
||||
.line 41
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Prefs;->BaseContextLocale(Landroid/content/Context;)Landroid/content/Context;
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Helper;->BaseContextLocale(Landroid/content/Context;)Landroid/content/Context;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
|
||||
@@ -317,7 +317,7 @@
|
||||
.line 72
|
||||
invoke-virtual {p0, p1}, Landroid/view/Window;->setStatusBarColor(I)V
|
||||
|
||||
invoke-static {p0, p1}, Lru/vtosters/lite/utils/Prefs;->setNavbarColor(Landroid/view/Window;I)V
|
||||
invoke-static {p0, p1}, Lru/vtosters/lite/utils/Themes;->setNavbarColor(Landroid/view/Window;I)V
|
||||
:try_end_0
|
||||
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
|
||||
|
||||
|
||||
@@ -316,7 +316,7 @@
|
||||
|
||||
invoke-virtual {v2, v0, v1}, Landroid/view/Window;->setLayout(II)V
|
||||
|
||||
invoke-static {v2, v1}, Lru/vtosters/lite/utils/Prefs;->setNavbarColor(Landroid/view/Window;I)V
|
||||
invoke-static {v2, v1}, Lru/vtosters/lite/utils/Themes;->setNavbarColor(Landroid/view/Window;I)V
|
||||
|
||||
return-void
|
||||
.end method
|
||||
|
||||
@@ -1468,7 +1468,7 @@
|
||||
|
||||
move-result v1
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Prefs;->proxyvk()Z
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Proxy;->proxyvk()Z
|
||||
|
||||
move-result v1
|
||||
|
||||
|
||||
@@ -1166,7 +1166,7 @@
|
||||
|
||||
move-result p1
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Prefs;->proxyvk()Z
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Proxy;->proxyvk()Z
|
||||
|
||||
move-result p1
|
||||
|
||||
@@ -1294,7 +1294,7 @@
|
||||
|
||||
move-result v0
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Prefs;->proxyvk()Z
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Proxy;->proxyvk()Z
|
||||
|
||||
move-result v0
|
||||
|
||||
|
||||
+1
-1
@@ -160,7 +160,7 @@
|
||||
.line 55
|
||||
invoke-virtual {v0, p3}, Landroid/view/Window;->setStatusBarColor(I)V
|
||||
|
||||
invoke-static {v0, p3}, Lru/vtosters/lite/utils/Prefs;->setNavbarColor(Landroid/view/Window;I)V
|
||||
invoke-static {v0, p3}, Lru/vtosters/lite/utils/Themes;->setNavbarColor(Landroid/view/Window;I)V
|
||||
|
||||
:cond_2
|
||||
return-void
|
||||
|
||||
@@ -472,7 +472,7 @@
|
||||
|
||||
.prologue
|
||||
.line 41
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Prefs;->BaseContextLocale(Landroid/content/Context;)Landroid/content/Context;
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Helper;->BaseContextLocale(Landroid/content/Context;)Landroid/content/Context;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
|
||||
@@ -229,7 +229,7 @@
|
||||
|
||||
.prologue
|
||||
.line 41
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Prefs;->BaseContextLocale(Landroid/content/Context;)Landroid/content/Context;
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Helper;->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/Prefs;->BaseContextLocale(Landroid/content/Context;)Landroid/content/Context;
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Helper;->BaseContextLocale(Landroid/content/Context;)Landroid/content/Context;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
@@ -498,7 +498,7 @@
|
||||
|
||||
invoke-virtual {v0, v1}, Landroid/view/Window;->setBackgroundDrawableResource(I)V
|
||||
|
||||
invoke-static {v0, v1}, Lru/vtosters/lite/utils/Prefs;->setNavbarColor(Landroid/view/Window;I)V
|
||||
invoke-static {v0, v1}, Lru/vtosters/lite/utils/Themes;->setNavbarColor(Landroid/view/Window;I)V
|
||||
|
||||
.line 48
|
||||
new-instance v0, Landroid/view/View;
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
.prologue
|
||||
.line 41
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Prefs;->BaseContextLocale(Landroid/content/Context;)Landroid/content/Context;
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Helper;->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/Prefs;->BaseContextLocale(Landroid/content/Context;)Landroid/content/Context;
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Helper;->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/Prefs;->BaseContextLocale(Landroid/content/Context;)Landroid/content/Context;
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Helper;->BaseContextLocale(Landroid/content/Context;)Landroid/content/Context;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
|
||||
.prologue
|
||||
.line 41
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Prefs;->BaseContextLocale(Landroid/content/Context;)Landroid/content/Context;
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Helper;->BaseContextLocale(Landroid/content/Context;)Landroid/content/Context;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
|
||||
@@ -498,7 +498,7 @@
|
||||
|
||||
move-result v0
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Prefs;->proxyvk()Z
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Proxy;->proxyvk()Z
|
||||
|
||||
move-result v0
|
||||
|
||||
|
||||
+1
-1
@@ -43,7 +43,7 @@
|
||||
|
||||
.prologue
|
||||
.line 41
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Prefs;->BaseContextLocale(Landroid/content/Context;)Landroid/content/Context;
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Helper;->BaseContextLocale(Landroid/content/Context;)Landroid/content/Context;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
|
||||
invoke-virtual {v1, v3}, Landroid/view/Window;->setStatusBarColor(I)V
|
||||
|
||||
invoke-static {v1, v3}, Lru/vtosters/lite/utils/Prefs;->setNavbarColor(Landroid/view/Window;I)V
|
||||
invoke-static {v1, v3}, Lru/vtosters/lite/utils/Themes;->setNavbarColor(Landroid/view/Window;I)V
|
||||
|
||||
.line 71
|
||||
:cond_1
|
||||
|
||||
@@ -144,7 +144,7 @@
|
||||
:goto_1
|
||||
invoke-virtual {v2, v4}, Landroid/view/Window;->setStatusBarColor(I)V
|
||||
|
||||
invoke-static {v2, v4}, Lru/vtosters/lite/utils/Prefs;->setNavbarColor(Landroid/view/Window;I)V
|
||||
invoke-static {v2, v4}, Lru/vtosters/lite/utils/Themes;->setNavbarColor(Landroid/view/Window;I)V
|
||||
|
||||
.line 641
|
||||
:cond_2
|
||||
|
||||
@@ -214,7 +214,7 @@
|
||||
.line 83
|
||||
invoke-virtual {v0, v1}, Landroid/view/Window;->setStatusBarColor(I)V
|
||||
|
||||
invoke-static {v0, v1}, Lru/vtosters/lite/utils/Prefs;->setNavbarColor(Landroid/view/Window;I)V
|
||||
invoke-static {v0, v1}, Lru/vtosters/lite/utils/Themes;->setNavbarColor(Landroid/view/Window;I)V
|
||||
|
||||
const/4 v0, 0x1
|
||||
|
||||
@@ -268,7 +268,7 @@
|
||||
|
||||
invoke-virtual {v0, v1}, Landroid/view/Window;->setStatusBarColor(I)V
|
||||
|
||||
invoke-static {v0, v1}, Lru/vtosters/lite/utils/Prefs;->setNavbarColor(Landroid/view/Window;I)V
|
||||
invoke-static {v0, v1}, Lru/vtosters/lite/utils/Themes;->setNavbarColor(Landroid/view/Window;I)V
|
||||
|
||||
:cond_0
|
||||
const/4 v0, 0x0
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
|
||||
invoke-virtual {v0, v1}, Landroid/view/Window;->setStatusBarColor(I)V
|
||||
|
||||
invoke-static {v0, v1}, Lru/vtosters/lite/utils/Prefs;->setNavbarColor(Landroid/view/Window;I)V
|
||||
invoke-static {v0, v1}, Lru/vtosters/lite/utils/Themes;->setNavbarColor(Landroid/view/Window;I)V
|
||||
|
||||
return-void
|
||||
.end method
|
||||
|
||||
@@ -448,7 +448,7 @@
|
||||
|
||||
.prologue
|
||||
.line 41
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Prefs;->BaseContextLocale(Landroid/content/Context;)Landroid/content/Context;
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Helper;->BaseContextLocale(Landroid/content/Context;)Landroid/content/Context;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
|
||||
@@ -259,7 +259,7 @@
|
||||
|
||||
invoke-virtual {v2, v3, v3}, Landroid/view/Window;->setFlags(II)V
|
||||
|
||||
invoke-static {v2, v3}, Lru/vtosters/lite/utils/Prefs;->setNavbarColor(Landroid/view/Window;I)V
|
||||
invoke-static {v2, v3}, Lru/vtosters/lite/utils/Themes;->setNavbarColor(Landroid/view/Window;I)V
|
||||
|
||||
:cond_0
|
||||
if-eqz v0, :cond_1
|
||||
|
||||
@@ -263,7 +263,7 @@
|
||||
|
||||
.prologue
|
||||
.line 41
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Prefs;->BaseContextLocale(Landroid/content/Context;)Landroid/content/Context;
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Helper;->BaseContextLocale(Landroid/content/Context;)Landroid/content/Context;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
|
||||
.prologue
|
||||
.line 41
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Prefs;->BaseContextLocale(Landroid/content/Context;)Landroid/content/Context;
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Helper;->BaseContextLocale(Landroid/content/Context;)Landroid/content/Context;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
|
||||
@@ -220,7 +220,7 @@
|
||||
|
||||
.prologue
|
||||
.line 41
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Prefs;->BaseContextLocale(Landroid/content/Context;)Landroid/content/Context;
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Helper;->BaseContextLocale(Landroid/content/Context;)Landroid/content/Context;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
|
||||
@@ -1595,7 +1595,7 @@
|
||||
.line 118
|
||||
invoke-virtual {p1, v0}, Landroid/view/Window;->setGravity(I)V
|
||||
|
||||
invoke-static {p1, v0}, Lru/vtosters/lite/utils/Prefs;->setNavbarColor(Landroid/view/Window;I)V
|
||||
invoke-static {p1, v0}, Lru/vtosters/lite/utils/Themes;->setNavbarColor(Landroid/view/Window;I)V
|
||||
|
||||
:cond_0
|
||||
return-void
|
||||
|
||||
+1
-1
@@ -520,7 +520,7 @@
|
||||
|
||||
invoke-virtual {p1, v3}, Landroid/view/Window;->setStatusBarColor(I)V
|
||||
|
||||
invoke-static {p1, v3}, Lru/vtosters/lite/utils/Prefs;->setNavbarColor(Landroid/view/Window;I)V
|
||||
invoke-static {p1, v3}, Lru/vtosters/lite/utils/Themes;->setNavbarColor(Landroid/view/Window;I)V
|
||||
|
||||
.line 83
|
||||
:cond_1
|
||||
|
||||
@@ -528,7 +528,7 @@
|
||||
|
||||
invoke-virtual {v0, v1}, Landroid/view/Window;->setStatusBarColor(I)V
|
||||
|
||||
invoke-static {v0, v1}, Lru/vtosters/lite/utils/Prefs;->setNavbarColor(Landroid/view/Window;I)V
|
||||
invoke-static {v0, v1}, Lru/vtosters/lite/utils/Themes;->setNavbarColor(Landroid/view/Window;I)V
|
||||
|
||||
:cond_1
|
||||
return-void
|
||||
|
||||
@@ -786,7 +786,7 @@
|
||||
|
||||
invoke-virtual {v0, v1}, Landroid/view/Window;->setStatusBarColor(I)V
|
||||
|
||||
invoke-static {v0, v1}, Lru/vtosters/lite/utils/Prefs;->setNavbarColor(Landroid/view/Window;I)V
|
||||
invoke-static {v0, v1}, Lru/vtosters/lite/utils/Themes;->setNavbarColor(Landroid/view/Window;I)V
|
||||
|
||||
.line 183
|
||||
:cond_0
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
invoke-virtual {v0, v1, v1}, Landroid/view/Window;->setFlags(II)V
|
||||
|
||||
:goto_0
|
||||
invoke-static {v0, v1}, Lru/vtosters/lite/utils/Prefs;->setNavbarColor(Landroid/view/Window;I)V
|
||||
invoke-static {v0, v1}, Lru/vtosters/lite/utils/Themes;->setNavbarColor(Landroid/view/Window;I)V
|
||||
|
||||
return-void
|
||||
.end method
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
|
||||
.prologue
|
||||
.line 41
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Prefs;->BaseContextLocale(Landroid/content/Context;)Landroid/content/Context;
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Helper;->BaseContextLocale(Landroid/content/Context;)Landroid/content/Context;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
|
||||
@@ -227,7 +227,7 @@
|
||||
|
||||
.prologue
|
||||
.line 41
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Prefs;->BaseContextLocale(Landroid/content/Context;)Landroid/content/Context;
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Helper;->BaseContextLocale(Landroid/content/Context;)Landroid/content/Context;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
|
||||
.prologue
|
||||
.line 41
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Prefs;->BaseContextLocale(Landroid/content/Context;)Landroid/content/Context;
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Helper;->BaseContextLocale(Landroid/content/Context;)Landroid/content/Context;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
|
||||
@@ -828,7 +828,7 @@
|
||||
|
||||
invoke-virtual {v0, v1}, Landroid/view/Window;->setStatusBarColor(I)V
|
||||
|
||||
invoke-static {v0, v1}, Lru/vtosters/lite/utils/Prefs;->setNavbarColor(Landroid/view/Window;I)V
|
||||
invoke-static {v0, v1}, Lru/vtosters/lite/utils/Themes;->setNavbarColor(Landroid/view/Window;I)V
|
||||
|
||||
.line 118
|
||||
:cond_0
|
||||
@@ -878,7 +878,7 @@
|
||||
|
||||
invoke-virtual {p1, v0}, Landroid/view/Window;->setStatusBarColor(I)V
|
||||
|
||||
invoke-static {p1, v0}, Lru/vtosters/lite/utils/Prefs;->setNavbarColor(Landroid/view/Window;I)V
|
||||
invoke-static {p1, v0}, Lru/vtosters/lite/utils/Themes;->setNavbarColor(Landroid/view/Window;I)V
|
||||
|
||||
:cond_0
|
||||
return-void
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
|
||||
.prologue
|
||||
.line 41
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Prefs;->BaseContextLocale(Landroid/content/Context;)Landroid/content/Context;
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Helper;->BaseContextLocale(Landroid/content/Context;)Landroid/content/Context;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user