Compare commits
30
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f5c80b230a | ||
|
|
87ee01bac9 | ||
|
|
126ad044f2 | ||
|
|
b636648457 | ||
|
|
bf3672a8c4 | ||
|
|
e6478d5161 | ||
|
|
ddea78aa4b | ||
|
|
b872fb17b8 | ||
|
|
4ec2c17df1 | ||
|
|
38a51f48d0 | ||
|
|
838897611c | ||
|
|
f42150063c | ||
|
|
d164d1219d | ||
|
|
fb71b4d781 | ||
|
|
f338738c1e | ||
|
|
fb704c7388 | ||
|
|
c99bca4200 | ||
|
|
92f43acb80 | ||
|
|
a7c85a24f2 | ||
|
|
fe5616b3f7 | ||
|
|
5c882c5ce2 | ||
|
|
61a4ed43b9 | ||
|
|
b242ad7ae4 | ||
|
|
1b02e806f8 | ||
|
|
eaf23a24ba | ||
|
|
ce64296c01 | ||
|
|
6e3716fe01 | ||
|
|
986ec2987c | ||
|
|
c98609db5d | ||
|
|
0b4e3c6303 |
@@ -15007,7 +15007,7 @@ public final class R {
|
||||
public static final int dockbar_save = 0x7f11123b;
|
||||
public static final int dockbar_selected_items = 0x7f11123c;
|
||||
public static final int dockbar_unselected_items = 0x7f11123d;
|
||||
public static final int download_latest_vtl = 0x7f11123e;
|
||||
public static final int checkforupdates = 0x7f11123e;
|
||||
public static final int other_fix_dynamic_colors = 0x7f11123f;
|
||||
public static final int other_reset_settings = 0x7f111240;
|
||||
public static final int other_reset_settings_summary = 0x7f111241;
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
package ru.vtosters.lite.audio.gcm;
|
||||
|
||||
import static ru.vtosters.lite.audio.gcm.NewGcmFix.FixToken;
|
||||
import static ru.vtosters.lite.audio.gcm.NewGcmFix.FixToken2;
|
||||
import static ru.vtosters.lite.utils.Preferences.VKVersion;
|
||||
import static ru.vtosters.lite.utils.Preferences.VKVersionBuild;
|
||||
import static ru.vtosters.lite.utils.Preferences.musicFixNew;
|
||||
|
||||
import android.os.Build;
|
||||
import android.util.Base64;
|
||||
@@ -38,7 +41,14 @@ public class GCMFix {
|
||||
genNewKey();
|
||||
}
|
||||
|
||||
public static String requestTokenV2(){
|
||||
return FixToken2();
|
||||
}
|
||||
|
||||
public static String requestToken() {
|
||||
if(musicFixNew()){
|
||||
return FixToken();
|
||||
}
|
||||
String xappide;
|
||||
try {
|
||||
String[] aidarr = {"3974055026275073921", "4418584909973341826", "4585634953328772978"};
|
||||
@@ -71,7 +81,7 @@ public class GCMFix {
|
||||
Thread.sleep(100);
|
||||
}
|
||||
String token = sb.toString();
|
||||
if (token.equals("EGISTRATION_ERROR")) {
|
||||
if (token.equals("REGISTRATION_ERROR")) {
|
||||
return requestToken();
|
||||
}
|
||||
rid = 0;
|
||||
@@ -79,12 +89,7 @@ public class GCMFix {
|
||||
String sig2 = getSig(pub22);
|
||||
params.clear();
|
||||
fillParams(params, sig2, pub22, xappide, Long.parseLong(aid.split(" ")[1].split(":")[0]), true);
|
||||
doRequest("https://android.clients.google.com/c2dm/register3", "POST", params, aid, new Callback() {
|
||||
@Override
|
||||
public void doCallback(String str) {
|
||||
GCMFix.lambda$requestToken$1(str);
|
||||
}
|
||||
});
|
||||
doRequest("https://android.clients.google.com/c2dm/register3", "POST", params, aid, GCMFix::lambda$requestToken$1);
|
||||
return token;
|
||||
} catch (FileNotFoundException e2) {
|
||||
return requestToken();
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
package ru.vtosters.lite.audio.gcm;
|
||||
|
||||
public class NewGcmFix { // @Leyzymoy is not gay, thank you my friend, sir...
|
||||
private static final short[] DATA = {835, 841, 841, 842, 771, 853, 771, 842, 771, 842, 859, 855, 832, 783, 846, 791, 852, 844, 855, 843, 770, 841, 842, 861, 845, 846, 851, 852, 777, 863, 778, 775, 775, 939, 951, 900, 934, 940, 905, 941, 935, 897, 935, 911, 935, 940, 931, 1015, 955, 916, 925, 900, 1015, 992, 939, 951, 900, 955, 940, 1020, 1019, 932, 916, 925, 903, 1016, 903, 909, 900, 1022, 916, 918, 896, 1022, 926, 922, 1022, 935, 936, 927, 992};
|
||||
|
||||
public static String FixToken() {
|
||||
short[] sArr = DATA;
|
||||
int hashCode = "۠ۡۦ".hashCode();
|
||||
int hashCode2 = "ۤۢۨ".hashCode();
|
||||
int hashCode3 = "ۦ۠ۤ".hashCode();
|
||||
return convert(sArr, ((hashCode2 ^ (-1)) & 1751594) | ((-1751595) & hashCode2), ((hashCode3 ^ (-1)) & 1753419) | ((-1753420) & hashCode3), ((hashCode ^ (-1)) & 1747007) | ((-1747008) & hashCode));
|
||||
}
|
||||
|
||||
public static String FixToken2() {
|
||||
short[] sArr = DATA;
|
||||
int hashCode = "ۦۧۢ".hashCode();
|
||||
int hashCode2 = "ۥ۟ۡ".hashCode();
|
||||
int hashCode3 = "ۣۤ۟".hashCode();
|
||||
return convert(sArr, ((hashCode2 ^ (-1)) & 1752486) | ((-1752487) & hashCode2), ((hashCode3 ^ (-1)) & 1751664) | ((-1751665) & hashCode3), ((hashCode ^ (-1)) & 1753487) | ((-1753488) & hashCode));
|
||||
}
|
||||
|
||||
private static String convert(short[] sArr, int i, int i2, int i3) {
|
||||
char[] cArr = new char[i2];
|
||||
for (int i4 = 0; i4 < i2; i4 = 1 - (0 - i4)) {
|
||||
short s = sArr[0 - ((0 - i) - i4)];
|
||||
cArr[i4] = (char) (((s ^ (-1)) & i3) | ((i3 ^ (-1)) & s));
|
||||
}
|
||||
return new String(cArr);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
package ru.vtosters.lite.downloaders;
|
||||
|
||||
import static ru.vtosters.lite.utils.Globals.getString;
|
||||
|
||||
import android.app.DownloadManager;
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.IntentFilter;
|
||||
import android.net.Uri;
|
||||
import android.os.Environment;
|
||||
|
||||
import com.vk.core.f.FileUtils;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import ru.vtosters.lite.ui.activities.APKInstallActivity;
|
||||
import ru.vtosters.lite.utils.Globals;
|
||||
|
||||
public class OTADownloader {
|
||||
|
||||
private static final BroadcastReceiver callback = new BroadcastReceiver() {
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
var extras = intent.getExtras();
|
||||
if (extras == null
|
||||
|| !intent.getAction().equals(DownloadManager.ACTION_DOWNLOAD_COMPLETE)) return;
|
||||
|
||||
var query = new DownloadManager.Query();
|
||||
var id = extras.getLong(DownloadManager.EXTRA_DOWNLOAD_ID);
|
||||
query.setFilterById(id);
|
||||
var manager = (DownloadManager) Globals.getContext().getSystemService(Context.DOWNLOAD_SERVICE);
|
||||
var cursor = manager.query(query);
|
||||
if (cursor.moveToFirst()) {
|
||||
var status = cursor.getInt(cursor.getColumnIndex(DownloadManager.COLUMN_STATUS));
|
||||
if (status == DownloadManager.STATUS_SUCCESSFUL) {
|
||||
var downloadDir = new File(Environment.getExternalStorageDirectory(), "Download");
|
||||
if (!downloadDir.exists()) return;
|
||||
var list = downloadDir.listFiles();
|
||||
if (list == null || list.length == 0) return;
|
||||
var maxIndex = -1;
|
||||
for (File file : list) {
|
||||
var name = file.getAbsolutePath().substring(file.getAbsolutePath().lastIndexOf("/") + 1);
|
||||
if (file.isFile()
|
||||
&& name.matches("VTLite-\\d+\\.apk"))
|
||||
maxIndex = Math.max(maxIndex, Integer.parseInt(name.replaceFirst(".+-(\\d+).+", "$1")));
|
||||
}
|
||||
File apk = maxIndex == -1 ? new File(downloadDir, "VTLite.apk") : new File(downloadDir, "VTLite-" + maxIndex + ".apk");
|
||||
APKInstallActivity.installOta(context, FileUtils.h(apk));
|
||||
} else if (status == DownloadManager.STATUS_FAILED) {
|
||||
Globals.sendToast(getString("downloaderr"));
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
public static void downloadBuild(String url) {
|
||||
var context = Globals.getContext();
|
||||
var uri = Uri.parse(url);
|
||||
|
||||
context.registerReceiver(callback, new IntentFilter(DownloadManager.ACTION_DOWNLOAD_COMPLETE));
|
||||
|
||||
var request = new DownloadManager.Request(uri);
|
||||
request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED);
|
||||
request.setTitle("VTLite.apk");
|
||||
request.setDestinationInExternalPublicDir(Environment.DIRECTORY_DOWNLOADS, "VTLite.apk");
|
||||
|
||||
var manager = (DownloadManager) Globals.getContext().getSystemService(Context.DOWNLOAD_SERVICE);
|
||||
manager.enqueue(request);
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,7 @@ import static android.widget.Toast.LENGTH_SHORT;
|
||||
import static android.widget.Toast.makeText;
|
||||
import static ru.vtosters.lite.utils.Globals.getIdentifier;
|
||||
import static ru.vtosters.lite.utils.Globals.getString;
|
||||
import static ru.vtosters.lite.utils.Preferences.getDateFormat;
|
||||
import static ru.vtosters.lite.utils.Proxy.getApiCom;
|
||||
import static ru.vtosters.lite.utils.Proxy.proxy;
|
||||
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
package ru.vtosters.lite.ui.activities;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.provider.Settings;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.widget.Toast;
|
||||
|
||||
public class APKInstallActivity extends AppCompatActivity {
|
||||
public static final int REQUEST_INSTALL_PERMISSION = 1;
|
||||
|
||||
public static final String EXTRA_APK_URI = "apk_uri";
|
||||
|
||||
private Uri mApkUri;
|
||||
|
||||
public static void installOta(Context context, Uri apkUri) {
|
||||
Intent intent = new Intent(context, APKInstallActivity.class);
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
|
||||
intent.putExtra(EXTRA_APK_URI, apkUri);
|
||||
|
||||
context.startActivity(intent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
Intent intent = getIntent();
|
||||
if (intent == null) {
|
||||
Toast.makeText(this, "No intent", Toast.LENGTH_SHORT).show();
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
|
||||
mApkUri = intent.getParcelableExtra(EXTRA_APK_URI);
|
||||
if (mApkUri == null) {
|
||||
Toast.makeText(this, "No apk uri", Toast.LENGTH_SHORT).show();
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
|
||||
installApk();
|
||||
}
|
||||
|
||||
private void installApk() {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
if (!getPackageManager().canRequestPackageInstalls()) {
|
||||
Intent permIntent = new Intent(Settings.ACTION_MANAGE_UNKNOWN_APP_SOURCES, Uri.parse("package:" + getPackageName()));
|
||||
startActivityForResult(permIntent, REQUEST_INSTALL_PERMISSION);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
Intent intent = new Intent(Intent.ACTION_VIEW);
|
||||
intent.setDataAndType(mApkUri, "application/vnd.android.package-archive");
|
||||
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
|
||||
startActivity(intent);
|
||||
} catch (Exception e) {
|
||||
Toast.makeText(this, "Ошибка установки обновления " + e.getLocalizedMessage(), Toast.LENGTH_LONG).show();
|
||||
}
|
||||
|
||||
finish();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
|
||||
if (requestCode == REQUEST_INSTALL_PERMISSION)
|
||||
installApk();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package ru.vtosters.lite.ui.dialogs;
|
||||
|
||||
import static ru.vtosters.lite.utils.Globals.getString;
|
||||
|
||||
import android.app.Activity;
|
||||
|
||||
import ru.vtosters.lite.downloaders.OTADownloader;
|
||||
import ru.vtosters.lite.ui.vkui.ModalBottomSheetWrapper;
|
||||
import ru.vtosters.lite.utils.OTAHelper;
|
||||
|
||||
public class OTADialog implements OTAHelper.OTAListener {
|
||||
|
||||
private Activity mActivity;
|
||||
|
||||
private OTAHelper mHelper;
|
||||
|
||||
public static OTADialog checkUpdates(Activity activity) {
|
||||
return new OTADialog(activity);
|
||||
}
|
||||
|
||||
public OTADialog(Activity activity) {
|
||||
mActivity = activity;
|
||||
|
||||
mHelper = new OTAHelper(this);
|
||||
mHelper.loadData();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdateApplied() {
|
||||
mActivity.runOnUiThread(() -> {
|
||||
// Toast.makeText(mActivity, "Обновления найдены", Toast.LENGTH_SHORT).show();
|
||||
new ModalBottomSheetWrapper(mActivity)
|
||||
.setUpdateInfoView(mHelper.getNewVersionName(), mHelper.getUpdateDescription())
|
||||
.setPositiveButton(getString("updateanddownload"), () -> {
|
||||
OTADownloader.downloadBuild(mHelper.getDownloadUrl());
|
||||
})
|
||||
.show();
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdateCanceled() {
|
||||
mActivity.runOnUiThread(() -> {
|
||||
// Toast.makeText(mActivity, "Обновлений не найдено", Toast.LENGTH_SHORT).show();
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package ru.vtosters.lite.ui.dialogs;
|
||||
|
||||
import static ru.vtosters.lite.utils.Globals.edit;
|
||||
import static ru.vtosters.lite.utils.Globals.getString;
|
||||
import static ru.vtosters.lite.utils.Preferences.getBoolValue;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.content.Intent;
|
||||
|
||||
import com.vk.navigation.Navigator;
|
||||
import com.vk.webapp.VKConnect;
|
||||
|
||||
public class VKIDProtection {
|
||||
public static void alert(final Activity activity) {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(activity);
|
||||
builder.setTitle(getString("debug_warning"));
|
||||
builder.setMessage(getString("vkidsumm"));
|
||||
builder.setCancelable(false);
|
||||
// android.content.DialogInterface.OnClickListener
|
||||
builder.setPositiveButton(getString("startbtn2"), (dialogInterface, i) -> edit().putBoolean("showAlertVkId", false).apply());
|
||||
// android.content.DialogInterface.OnClickListener
|
||||
builder.setNeutralButton(getString("vkiddisable"), (dialogInterface, i) -> {
|
||||
edit().putBoolean("showAlertVkId", false).apply();
|
||||
Intent a2 = new Navigator(VKConnect.class).a(activity);
|
||||
activity.startActivity(a2);
|
||||
});
|
||||
if (getBoolValue("showAlertVkId", true)) {
|
||||
builder.show();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -21,10 +21,10 @@ public class FeedFragment extends MaterialPreferenceToolbarFragment {
|
||||
}
|
||||
|
||||
private void prefs() {
|
||||
a("officialnewssett").a(new FeedFragment.openofficialsett());
|
||||
a("officialnewssett").a(new openofficialsett());
|
||||
}
|
||||
|
||||
public class openofficialsett implements Preference.c {
|
||||
public static class openofficialsett implements Preference.c {
|
||||
openofficialsett() {
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
package ru.vtosters.lite.ui.fragments;
|
||||
|
||||
import static ru.vtosters.lite.utils.Globals.deleteCache;
|
||||
import static ru.vtosters.lite.utils.Globals.getContext;
|
||||
import static ru.vtosters.lite.utils.Globals.restartApplicationWithTimer;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.preference.Preference;
|
||||
|
||||
@@ -18,6 +22,10 @@ public class MessagesFragment extends MaterialPreferenceToolbarFragment {
|
||||
|
||||
private void prefs() {
|
||||
a("vkme").a(new MessagesFragment.restart());
|
||||
a("vkme_notifs").a(new MessagesFragment.restart());
|
||||
a("isBGStickersEnabled").a(new MessagesFragment.clearCache());
|
||||
a("roundedmsgs").a(new MessagesFragment.restart());
|
||||
a("systememoji").a(new MessagesFragment.restart());
|
||||
}
|
||||
|
||||
public boolean restart(Preference preference, Object obj) {
|
||||
@@ -34,4 +42,24 @@ public class MessagesFragment extends MaterialPreferenceToolbarFragment {
|
||||
return MessagesFragment.this.restart(preference, obj);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean clearCache(Preference preference, Object obj) {
|
||||
SharedPreferences prefs = getContext().getSharedPreferences("stickers", Context.MODE_PRIVATE);
|
||||
SharedPreferences prefs2 = getContext().getSharedPreferences("stickers_storage", Context.MODE_PRIVATE);
|
||||
prefs.edit().clear().commit();
|
||||
prefs2.edit().clear().commit();
|
||||
deleteCache();
|
||||
restartApplicationWithTimer();
|
||||
return true;
|
||||
}
|
||||
|
||||
public class clearCache implements Preference.b {
|
||||
clearCache() {
|
||||
}
|
||||
|
||||
@Override // android.support.v7.preference.Preference.b
|
||||
public boolean a(Preference preference, Object obj) {
|
||||
return MessagesFragment.this.restart(preference, obj);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,14 @@
|
||||
package ru.vtosters.lite.ui.fragments;
|
||||
|
||||
import android.os.Bundle;
|
||||
import static ru.vtosters.lite.utils.Globals.getContext;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.preference.Preference;
|
||||
|
||||
import com.vk.navigation.Navigator;
|
||||
import com.vk.webapp.VKConnect;
|
||||
import com.vtosters.lite.R;
|
||||
import com.vtosters.lite.fragments.MaterialPreferenceToolbarFragment;
|
||||
|
||||
@@ -10,5 +17,23 @@ public class MusicFragment extends MaterialPreferenceToolbarFragment {
|
||||
public void b(Bundle bundle) {
|
||||
super.b(bundle);
|
||||
a(R.xml.preferences_music);
|
||||
prefs();
|
||||
}
|
||||
|
||||
private void prefs() {
|
||||
a("vkid_warn").a(new MusicFragment.openvkid());
|
||||
}
|
||||
|
||||
public static class openvkid implements Preference.c {
|
||||
openvkid() {
|
||||
}
|
||||
|
||||
@Override // android.support.v7.preference.Preference.c
|
||||
public boolean a(Preference preference) {
|
||||
Context context = getContext();
|
||||
Intent a2 = new Navigator(VKConnect.class).a(context);
|
||||
context.startActivity(a2);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ 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.Globals.deleteCache;
|
||||
import static ru.vtosters.lite.utils.Globals.getContext;
|
||||
import static ru.vtosters.lite.utils.Globals.getString;
|
||||
import static ru.vtosters.lite.utils.Globals.getUserToken;
|
||||
@@ -68,24 +69,27 @@ public class OtherFragment extends MaterialPreferenceToolbarFragment {
|
||||
}
|
||||
}
|
||||
|
||||
public class e implements Preference.c {
|
||||
public static class e implements Preference.c {
|
||||
e() {
|
||||
}
|
||||
|
||||
@Override // android.support.v7.preference.Preference.c
|
||||
public boolean a(Preference preference) {
|
||||
SharedPreferences prefs = getContext().getSharedPreferences("stickers", Context.MODE_PRIVATE);
|
||||
SharedPreferences prefs2 = getContext().getSharedPreferences("stickers_storage", Context.MODE_PRIVATE);
|
||||
prefs.edit().clear().commit();
|
||||
prefs2.edit().clear().commit();
|
||||
VKImageLoader.b();
|
||||
ImEngineProvider.a().h();
|
||||
AudioMessageUtils.j();
|
||||
FileUtils.l();
|
||||
deleteCache();
|
||||
ToastUtils.a(getString("cachecleaned"));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public class b implements Preference.c {
|
||||
public static class b implements Preference.c {
|
||||
b() {
|
||||
}
|
||||
|
||||
@@ -96,7 +100,7 @@ public class OtherFragment extends MaterialPreferenceToolbarFragment {
|
||||
}
|
||||
}
|
||||
|
||||
public class d implements Preference.c {
|
||||
public static class d implements Preference.c {
|
||||
d() {
|
||||
}
|
||||
|
||||
@@ -126,20 +130,23 @@ public class OtherFragment extends MaterialPreferenceToolbarFragment {
|
||||
}
|
||||
}
|
||||
|
||||
public class f implements Preference.c {
|
||||
public static class f implements Preference.c {
|
||||
f() {
|
||||
}
|
||||
|
||||
@Override // android.support.v7.preference.Preference.c
|
||||
public boolean a(Preference preference) {
|
||||
SharedPreferences prefs = getContext().getSharedPreferences("stickers", Context.MODE_PRIVATE);
|
||||
SharedPreferences prefs2 = getContext().getSharedPreferences("stickers_storage", Context.MODE_PRIVATE);
|
||||
prefs.edit().clear().commit();
|
||||
restartApplication();
|
||||
prefs2.edit().clear().commit();
|
||||
deleteCache();
|
||||
ToastUtils.a(getString("cachecleaned"));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public class deleteprefs implements Preference.c {
|
||||
public static class deleteprefs implements Preference.c {
|
||||
deleteprefs() {
|
||||
}
|
||||
|
||||
@@ -151,7 +158,7 @@ public class OtherFragment extends MaterialPreferenceToolbarFragment {
|
||||
}
|
||||
}
|
||||
|
||||
public class saveprefs implements Preference.c {
|
||||
public static class saveprefs implements Preference.c {
|
||||
saveprefs() {
|
||||
}
|
||||
|
||||
@@ -162,7 +169,7 @@ public class OtherFragment extends MaterialPreferenceToolbarFragment {
|
||||
}
|
||||
}
|
||||
|
||||
public class restoreprefs implements Preference.c {
|
||||
public static class restoreprefs implements Preference.c {
|
||||
restoreprefs() {
|
||||
}
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@ import static ru.vtosters.lite.utils.Preferences.ads;
|
||||
import static ru.vtosters.lite.utils.Preferences.devmenu;
|
||||
import static ru.vtosters.lite.utils.Preferences.disableSettingsSumms;
|
||||
import static ru.vtosters.lite.utils.Preferences.hasSpecialVerif;
|
||||
import static ru.vtosters.lite.utils.Preferences.isValidSignature;
|
||||
import static ru.vtosters.lite.utils.Preferences.navbar;
|
||||
import static ru.vtosters.lite.utils.Preferences.offline;
|
||||
import static ru.vtosters.lite.utils.Preferences.shortinfo;
|
||||
@@ -56,6 +57,7 @@ import com.vtosters.lite.fragments.k.BlacklistFragment;
|
||||
import com.vtosters.lite.fragments.money.music.control.subscription.MusicSubscriptionControlFragment;
|
||||
|
||||
import ru.vtosters.lite.ui.PreferencesUtil;
|
||||
import ru.vtosters.lite.ui.dialogs.OTADialog;
|
||||
import ru.vtosters.lite.ui.fragments.dockbar.DockBarFragment;
|
||||
import ru.vtosters.lite.ui.fragments.dockbar.DockBarManager;
|
||||
import ru.vtosters.lite.ui.fragments.multiaccount.MultiAccountFragment;
|
||||
@@ -255,12 +257,13 @@ public class VTSettings extends MaterialPreferenceToolbarFragment {
|
||||
return false;
|
||||
});
|
||||
|
||||
PreferencesUtil.addPreference(this, "", getString("vtlmusic"), musicsumm, "ic_music_24", preference -> {
|
||||
Context context = getContext();
|
||||
Intent a2 = new Navigator(MusicFragment.class).a(context);
|
||||
context.startActivity(a2);
|
||||
return false;
|
||||
});
|
||||
if (isValidSignature())
|
||||
PreferencesUtil.addPreference(this, "", getString("vtlmusic"), musicsumm, "ic_music_24", preference -> {
|
||||
Context context = getContext();
|
||||
Intent a2 = new Navigator(MusicFragment.class).a(context);
|
||||
context.startActivity(a2);
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
PreferencesUtil.addPreference(this, "", getString("vtlmessages"), msgsumm, "ic_message_24", preference -> {
|
||||
@@ -326,20 +329,32 @@ public class VTSettings extends MaterialPreferenceToolbarFragment {
|
||||
return false;
|
||||
});
|
||||
|
||||
PreferencesUtil.addPreference(this, "", getString("vtfaq"), "", "ic_help_24", preference -> {
|
||||
PreferencesUtil.addPreference(this, "", getString("vtfaq"), getString("vtfaqsumm"), "ic_help_24", preference -> {
|
||||
getContext().startActivity(new Intent("android.intent.action.VIEW").setData(Uri.parse("https://t.me/s/vtosters_faq")));
|
||||
return false;
|
||||
});
|
||||
|
||||
PreferencesUtil.addPreference(this, "", getString("reportbug"), "", "ic_bug_24", preference -> {
|
||||
PreferencesUtil.addPreference(this, "", getString("reportbug"), getString("reportbugsumm"), "ic_bug_24", preference -> {
|
||||
getContext().startActivity(new Intent("android.intent.action.VIEW").setData(Uri.parse("https://github.com/vtosters/lite/issues")));
|
||||
return false;
|
||||
});
|
||||
|
||||
PreferencesUtil.addPreference(this, "", getString("download_latest_vtl"), "", "ic_download_24", preference -> {
|
||||
getContext().startActivity(new Intent("android.intent.action.VIEW").setData(Uri.parse("https://github.com/vtosters/lite/releases/latest")));
|
||||
return false;
|
||||
});
|
||||
if (isValidSignature()) {
|
||||
PreferencesUtil.addPreferenceCategory(this, getString("updates"));
|
||||
|
||||
PreferencesUtil.addPreference(this, "", getString("checkforupdates"), "", "ic_download_24", preference -> {
|
||||
OTADialog.checkUpdates(p());
|
||||
return false;
|
||||
});
|
||||
|
||||
PreferencesUtil.addMaterialSwitchPreference(this, "checkupdates", getString("checkupdates"), "", "ic_recent_24", true, (preference, o) -> {
|
||||
boolean value = (boolean) o;
|
||||
|
||||
edit().putBoolean("checkupdates", value).commit();
|
||||
|
||||
return true;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public static String getValAsString(String stringid, Boolean value) {
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
package ru.vtosters.lite.ui.vkui;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.view.View;
|
||||
|
||||
import com.vk.core.dialogs.bottomsheet.ModalBottomSheet;
|
||||
|
||||
public class ModalBottomSheetProxy {
|
||||
public final ModalBottomSheet.a builder;
|
||||
|
||||
public ModalBottomSheetProxy(Activity activity) {
|
||||
builder = new ModalBottomSheet.a(activity);
|
||||
}
|
||||
|
||||
public void setTitle(String title) {
|
||||
builder.b(title);
|
||||
}
|
||||
|
||||
|
||||
public void setClickableMessage(String text) {
|
||||
builder.a(text, kostil -> {
|
||||
});
|
||||
}
|
||||
|
||||
public void setClickableMessage(String text, Runnable runnable) {
|
||||
builder.a(text, listener -> runnable.run());
|
||||
}
|
||||
|
||||
public void setPositiveButton(String text, Runnable runnable) {
|
||||
builder.b(text, kostil -> runnable.run());
|
||||
}
|
||||
|
||||
public void setSubtitle(String text) {
|
||||
builder.b((CharSequence) text);
|
||||
}
|
||||
|
||||
public void setView(View view) {
|
||||
builder.a(view);
|
||||
}
|
||||
|
||||
public ModalBottomSheet show() {
|
||||
return builder.c(null);
|
||||
}
|
||||
|
||||
public ModalBottomSheet show(boolean isCancellable) {
|
||||
var sheet = builder.c(null);
|
||||
sheet.b(isCancellable);
|
||||
return sheet;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
package ru.vtosters.lite.ui.vkui;
|
||||
|
||||
import static ru.vtosters.lite.utils.Globals.getString;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.graphics.Typeface;
|
||||
import android.view.View;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.vk.core.dialogs.bottomsheet.ModalBottomSheet;
|
||||
|
||||
import ru.vtosters.lite.utils.Globals;
|
||||
import ru.vtosters.lite.utils.Themes;
|
||||
|
||||
public class ModalBottomSheetWrapper {
|
||||
public final ModalBottomSheet.a builder;
|
||||
|
||||
public ModalBottomSheetWrapper(Activity activity) {
|
||||
builder = new ModalBottomSheet.a(activity);
|
||||
}
|
||||
|
||||
public ModalBottomSheetWrapper setTitle(String title) {
|
||||
builder.b(title);
|
||||
return this;
|
||||
}
|
||||
|
||||
public ModalBottomSheetWrapper setUpdateInfoView(String version, String changelog) {
|
||||
var context = Globals.getContext();
|
||||
var container = new LinearLayout(context);
|
||||
var title = new TextView(context);
|
||||
var changelogView = new TextView(context);
|
||||
|
||||
container.setOrientation(LinearLayout.VERTICAL);
|
||||
|
||||
title.setText(getString("newversion") + " " + version);
|
||||
title.setTypeface(title.getTypeface(), Typeface.BOLD);
|
||||
title.setSingleLine(true);
|
||||
title.setTextAlignment(View.TEXT_ALIGNMENT_CENTER);
|
||||
title.setTextColor(Themes.getTextAttr());
|
||||
title.setTextSize(24.0f);
|
||||
container.addView(title, new LinearLayout.LayoutParams(-1, -2));
|
||||
|
||||
changelogView.setPadding(0, Globals.convertDpToPixel(8), 0, 0);
|
||||
changelogView.setText(getString("changelog") + ": \n" + changelog);
|
||||
changelogView.setTextColor(Themes.getTextAttr());
|
||||
container.addView(changelogView, new LinearLayout.LayoutParams(-1, -2));
|
||||
|
||||
builder.a(container);
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
// try to call a true function and you will understand my pain
|
||||
public ModalBottomSheetWrapper setMessage(
|
||||
String text
|
||||
) {
|
||||
builder.a(text, listener -> {});
|
||||
return this;
|
||||
}
|
||||
|
||||
public ModalBottomSheetWrapper setClickableMessage(
|
||||
String text,
|
||||
Runnable callback
|
||||
) {
|
||||
builder.a(text, listener -> callback.run());
|
||||
return this;
|
||||
}
|
||||
|
||||
public ModalBottomSheetWrapper setPositiveButton(
|
||||
String text,
|
||||
Runnable callback
|
||||
) {
|
||||
builder.b(text, kostil -> callback.run());
|
||||
return this;
|
||||
}
|
||||
|
||||
public ModalBottomSheetWrapper setSubtitle(String text) {
|
||||
builder.b((CharSequence) text);
|
||||
return this;
|
||||
}
|
||||
|
||||
public ModalBottomSheetWrapper setView(View view) {
|
||||
builder.a(view);
|
||||
return this;
|
||||
}
|
||||
|
||||
public ModalBottomSheet show() {
|
||||
return builder.c(null);
|
||||
}
|
||||
|
||||
public ModalBottomSheet show(boolean isCancellable) {
|
||||
var sheet = builder.c(null);
|
||||
sheet.b(isCancellable);
|
||||
return sheet;
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package ru.vtosters.lite.utils;
|
||||
|
||||
import static androidx.core.content.ContextCompat.getDrawable;
|
||||
import static ru.vtosters.lite.utils.Preferences.checkupdates;
|
||||
import static ru.vtosters.lite.utils.Preferences.getLocale;
|
||||
import static ru.vtosters.lite.utils.Preferences.preferences;
|
||||
import static ru.vtosters.lite.utils.Themes.isDarkTheme;
|
||||
@@ -41,6 +42,7 @@ import com.vtosters.lite.api.ExtendedUserProfile;
|
||||
import com.vtosters.lite.auth.VKAccountManager;
|
||||
import com.vtosters.lite.im.ImEngineProvider;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.InputStream;
|
||||
import java.lang.reflect.Method;
|
||||
import java.net.URL;
|
||||
@@ -48,6 +50,12 @@ import java.net.URLConnection;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Objects;
|
||||
|
||||
import ru.vtosters.lite.ui.dialogs.DisableBattery;
|
||||
import ru.vtosters.lite.ui.dialogs.InstallGMS;
|
||||
import ru.vtosters.lite.ui.dialogs.OTADialog;
|
||||
import ru.vtosters.lite.ui.dialogs.Start;
|
||||
|
||||
public class Globals {
|
||||
private static final List<Activity> activities = new ArrayList<>();
|
||||
@@ -57,6 +65,15 @@ public class Globals {
|
||||
return preferences;
|
||||
}
|
||||
|
||||
public static void MainActivityInit(Activity activity){
|
||||
if(checkupdates())
|
||||
OTADialog.checkUpdates(activity);
|
||||
Start.alert(activity);
|
||||
InstallGMS.alert(activity);
|
||||
DisableBattery.alert(activity);
|
||||
// VKIDProtection.alert(activity);
|
||||
}
|
||||
|
||||
public static void componentSwitcher(String component, Boolean enabled) {
|
||||
var packageManager = getContext().getPackageManager();
|
||||
packageManager.setComponentEnabledSetting(new ComponentName(getPackageName(), getPackageName() + "." + component), enabled? PackageManager.COMPONENT_ENABLED_STATE_ENABLED : PackageManager.COMPONENT_ENABLED_STATE_DISABLED, PackageManager.DONT_KILL_APP);
|
||||
@@ -185,7 +202,31 @@ public class Globals {
|
||||
return null;
|
||||
} // Getting the global context through reflection to use context on application initialization
|
||||
|
||||
public static void deleteCache() {
|
||||
try {
|
||||
File dir = getContext().getCacheDir();
|
||||
deleteDir(dir);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean deleteDir(File dir) {
|
||||
if (dir != null && dir.isDirectory()) {
|
||||
String[] children = dir.list();
|
||||
for (int i=0; i < Objects.requireNonNull(children).length; i++) {
|
||||
boolean success = deleteDir(new File(dir, children[i]));
|
||||
if (!success) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return dir.delete();
|
||||
} else if(dir!= null && dir.isFile()) {
|
||||
return dir.delete();
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
public static boolean isGmsInstalled() {
|
||||
try {
|
||||
getContext().getPackageManager().getPackageInfo("com.google.android.gms", 0);
|
||||
|
||||
@@ -0,0 +1,126 @@
|
||||
package ru.vtosters.lite.utils;
|
||||
|
||||
import android.util.Log;
|
||||
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import okhttp3.Call;
|
||||
import okhttp3.Callback;
|
||||
import okhttp3.OkHttpClient;
|
||||
import okhttp3.Request;
|
||||
import okhttp3.Response;
|
||||
|
||||
public class OTAHelper {
|
||||
|
||||
private static final String LATEST_RELEASE_URL = "https://api.github.com/repositories/473685743/releases/latest";
|
||||
private static final String LATEST_RELEASE_COMMIT_URL = "https://api.github.com/repositories/473685743/git/ref/tags/%s";
|
||||
|
||||
private OTAListener mListener;
|
||||
|
||||
private final OkHttpClient mClient = new OkHttpClient();
|
||||
|
||||
private JSONObject mReleaseJson;
|
||||
private JSONObject mCommitJson;
|
||||
|
||||
public OTAHelper(OTAListener listener) {
|
||||
this.mListener = listener;
|
||||
}
|
||||
|
||||
public void loadData() {
|
||||
Request release = new Request.Builder()
|
||||
.url(LATEST_RELEASE_URL)
|
||||
.build();
|
||||
mClient.newCall(release).a(new Callback() {
|
||||
@Override
|
||||
public void a(Call call, IOException e) {
|
||||
Log.d("OTAHelper", "Error while getting latest release info: " + e);
|
||||
mListener.onUpdateCanceled();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void a(Call call, Response response) throws IOException {
|
||||
try {
|
||||
setData(response);
|
||||
} catch (JSONException | NullPointerException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void setData(Response response) throws IOException, JSONException {
|
||||
mReleaseJson = new JSONObject(response.body().string());
|
||||
|
||||
String tag = mReleaseJson.getString("tag_name");
|
||||
Request commit = new Request.Builder()
|
||||
.url(String.format(LATEST_RELEASE_COMMIT_URL, tag))
|
||||
.build();
|
||||
mClient.newCall(commit).a(new Callback() {
|
||||
@Override
|
||||
public void a(Call call, IOException e) {
|
||||
Log.d("OTAHelper", "Error while getting latest commit info: " + e);
|
||||
mListener.onUpdateCanceled();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void a(Call call, Response response) throws IOException {
|
||||
try {
|
||||
mCommitJson = new JSONObject(response.body().string());
|
||||
if (isNewVersion())
|
||||
mListener.onUpdateApplied();
|
||||
else mListener.onUpdateCanceled();
|
||||
} catch (NullPointerException | JSONException e) {
|
||||
e.printStackTrace();
|
||||
mListener.onUpdateCanceled();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public boolean isNewVersion() {
|
||||
try {
|
||||
String commitSHA = mCommitJson.getJSONObject("object").getString("sha");
|
||||
return !commitSHA.startsWith(About.getBuildNumber());
|
||||
} catch (Exception e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public String getNewVersionName() {
|
||||
try {
|
||||
return mReleaseJson.getString("name");
|
||||
} catch (JSONException e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public String getUpdateDescription() {
|
||||
try {
|
||||
return mReleaseJson.getString("body");
|
||||
} catch (JSONException e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public String getDownloadUrl() {
|
||||
try {
|
||||
return mReleaseJson.getJSONArray("assets")
|
||||
.getJSONObject(0)
|
||||
.getString("browser_download_url");
|
||||
} catch (JSONException e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public interface OTAListener {
|
||||
|
||||
void onUpdateApplied();
|
||||
|
||||
void onUpdateCanceled();
|
||||
|
||||
}
|
||||
}
|
||||
@@ -16,12 +16,14 @@ import static ru.vtosters.lite.utils.Globals.registerActivities;
|
||||
import static ru.vtosters.lite.utils.Newsfeed.setupFilters;
|
||||
import static ru.vtosters.lite.utils.OpusLoader.LoadLibrary;
|
||||
import static ru.vtosters.lite.utils.Proxy.setProxy;
|
||||
import static ru.vtosters.lite.utils.SignatureChecker.validateAppSignature;
|
||||
import static ru.vtosters.lite.utils.Themes.systemThemeChanger;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.Application;
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.util.Log;
|
||||
|
||||
@@ -30,6 +32,7 @@ import com.vk.im.engine.models.users.UserSex;
|
||||
import com.vtosters.lite.data.Users;
|
||||
import com.vtosters.lite.fragments.SettingsListFragment;
|
||||
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.Locale;
|
||||
@@ -147,6 +150,10 @@ public class Preferences {
|
||||
return getBoolValue("awayphp", true);
|
||||
}
|
||||
|
||||
public static boolean musicFixNew() {
|
||||
return getBoolValue("musicFixNew", true);
|
||||
}
|
||||
|
||||
public static Class useNewSettings() {
|
||||
boolean bool = getBoolValue("useNewSettings", true);
|
||||
return bool? VTSettings.class : SettingsListFragment.class;
|
||||
@@ -197,7 +204,7 @@ public class Preferences {
|
||||
}
|
||||
|
||||
public static boolean dockcounter() {
|
||||
return getBoolValue("dockcounter", true) && !vkme();
|
||||
return getBoolValue("dockcounter", true);
|
||||
}
|
||||
|
||||
public static boolean feedcache() {
|
||||
@@ -209,7 +216,7 @@ public class Preferences {
|
||||
}
|
||||
|
||||
public static boolean gcmfix() {
|
||||
return getBoolValue("gcmfix", true);
|
||||
return getBoolValue("gcmfix", true) && isValidSignature();
|
||||
}
|
||||
|
||||
public static boolean hasMusicSubscription() {
|
||||
@@ -361,10 +368,23 @@ public class Preferences {
|
||||
return getBoolValue("roundedmsgs", false);
|
||||
}
|
||||
|
||||
public static boolean checkupdates() {
|
||||
return getBoolValue("checkupdates", true) && isValidSignature();
|
||||
}
|
||||
|
||||
public static boolean disableanimstickers() {
|
||||
return getBoolValue("disableanimstickers", true);
|
||||
}
|
||||
|
||||
public static boolean isValidSignature() {
|
||||
try {
|
||||
return validateAppSignature();
|
||||
} catch (PackageManager.NameNotFoundException | NoSuchAlgorithmException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean disableSettingsSumms() {
|
||||
return getBoolValue("disableSettingsSumms", false);
|
||||
}
|
||||
@@ -393,7 +413,6 @@ public class Preferences {
|
||||
return hasPrometheus(getUserId());
|
||||
}
|
||||
|
||||
|
||||
public static String getLocale() {
|
||||
String string = getPrefsValue("lang_value");
|
||||
|
||||
@@ -419,6 +438,14 @@ public class Preferences {
|
||||
}
|
||||
}
|
||||
|
||||
public static String nullOnline() {
|
||||
return getString("onlineNull");
|
||||
}
|
||||
|
||||
public static boolean isOnlineNull(int status) {
|
||||
return status == 0;
|
||||
}
|
||||
|
||||
@SuppressLint("SimpleDateFormat")
|
||||
public static SimpleDateFormat setDateFormat() {
|
||||
return new SimpleDateFormat(getDateFormat());
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
package ru.vtosters.lite.utils;
|
||||
|
||||
import static android.content.pm.PackageManager.GET_SIGNATURES;
|
||||
import static android.content.pm.PackageManager.NameNotFoundException;
|
||||
import static ru.vtosters.lite.f0x1d.VTVerifications.decode;
|
||||
import static ru.vtosters.lite.utils.Globals.getContext;
|
||||
import static ru.vtosters.lite.utils.Globals.getPackageName;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.pm.PackageInfo;
|
||||
import android.content.pm.Signature;
|
||||
|
||||
import java.security.MessageDigest;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
|
||||
public class SignatureChecker {
|
||||
private static final String APP_SIGNATURE = "QzNFQTI3Q0ExNEJENzJFM0U2QUUyMDM0OTdCNDQ0NUFEQUMxRjk0NQ==";
|
||||
|
||||
public static String getSHA1(byte[] sig) throws NoSuchAlgorithmException{
|
||||
MessageDigest digest = MessageDigest.getInstance("SHA1");
|
||||
digest.update(sig);
|
||||
byte[] hashtext = digest.digest();
|
||||
return bytesToHex(hashtext);
|
||||
}
|
||||
|
||||
public static String bytesToHex(byte[] bytes){
|
||||
final char[] hexArray = {'0', '1', '2', '3', '4', '5', '6', '7', '8',
|
||||
'9', 'A', 'B', 'C', 'D', 'E', 'F'};
|
||||
char[] hexChars = new char[bytes.length * 2];
|
||||
int v;
|
||||
for (int j = 0; j < bytes.length; j++) {
|
||||
v = bytes[j] & 0xFF;
|
||||
hexChars[j * 2] = hexArray[v >>> 4];
|
||||
hexChars[j * 2 + 1] = hexArray[v & 0x0F];
|
||||
}
|
||||
return new String(hexChars);
|
||||
}
|
||||
|
||||
public static boolean validateAppSignature() throws NameNotFoundException, NoSuchAlgorithmException{
|
||||
@SuppressLint("PackageManagerGetSignatures") PackageInfo packageInfo = getContext().getPackageManager().getPackageInfo(getPackageName(), GET_SIGNATURES);
|
||||
for (Signature signature : packageInfo.signatures) {
|
||||
String sha1 = getSHA1(signature.toByteArray());
|
||||
return decode(APP_SIGNATURE).equals(sha1);
|
||||
}
|
||||
return false;
|
||||
} // Sig check to detect actions builds and etc
|
||||
}
|
||||
@@ -14,6 +14,7 @@ import static ru.vtosters.lite.utils.Preferences.systemtheme;
|
||||
import static ru.vtosters.lite.utils.Preferences.vkme;
|
||||
import static ru.vtosters.lite.utils.Preferences.vksans;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.res.ColorStateList;
|
||||
@@ -186,6 +187,11 @@ public class Themes {
|
||||
return new RecoloredDrawable(drawable, getHeaderText());
|
||||
} // Recolor toolbar drawable to accent color
|
||||
|
||||
public static Drawable recolorDrawableInt(int drawable) {
|
||||
@SuppressLint("UseCompatLoadingForDrawables") Drawable res = getResources().getDrawable(drawable);
|
||||
return new RecoloredDrawable(res, getAccentColor());
|
||||
} // Get res drawable via id and coloring to accent
|
||||
|
||||
public static ColorStateList recolorCSL(ColorStateList colorStateList) {
|
||||
if (colorStateList == null) {
|
||||
return null;
|
||||
|
||||
@@ -75,6 +75,7 @@
|
||||
<meta-data android:name="com.facebook.sdk.CodelessDebugLogEnabled" android:value="false"/>
|
||||
<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version"/>
|
||||
<meta-data android:name="com.google.firebase.messaging.default_notification_color" android:resource="@color/cornflower_blue"/>
|
||||
<activity android:name="ru.vtosters.lite.ui.activities.APKInstallActivity" />
|
||||
<activity android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize" android:label="@string/app_name" android:launchMode="singleTask" android:name="com.vtosters.lite.MainActivity" android:theme="@style/SplashTheme">
|
||||
<intent-filter>
|
||||
<category android:name="android.intent.category.MULTIWINDOW_LAUNCHER"/>
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
<com.vtosters.lite.ui.BadooTextView
|
||||
android:textSize="16.0dip"
|
||||
android:textColor="@color/sharing_blue_btn_text"
|
||||
android:textColor="@color/cool_blue"
|
||||
android:gravity="center"
|
||||
android:id="@android:id/text1"
|
||||
android:duplicateParentState="true"
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
<com.vtosters.lite.ui.BadooTextView
|
||||
android:textSize="16.0dip"
|
||||
android:textColor="@color/dark_grey"
|
||||
android:textColor="?text_primary"
|
||||
android:id="@id/sharing_title"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
<TextView
|
||||
android:textSize="14.0dip"
|
||||
android:textColor="@color/cool_grey"
|
||||
android:textColor="?text_secondary"
|
||||
android:ellipsize="end"
|
||||
android:id="@id/sharing_subtitle"
|
||||
android:visibility="gone"
|
||||
@@ -39,7 +39,7 @@
|
||||
android:layout_width="48.0dip"
|
||||
android:layout_height="48.0dip"
|
||||
android:layout_marginRight="4.0dip"
|
||||
android:tint="@color/cool_grey"
|
||||
android:tint="?text_primary"
|
||||
android:contentDescription="@string/search"
|
||||
android:layout_marginEnd="4.0dip"
|
||||
app:srcCompat="@drawable/ic_search_24"
|
||||
@@ -53,7 +53,7 @@
|
||||
android:layout_height="48.0dip"
|
||||
android:src="@drawable/ic_settings_24"
|
||||
android:scaleType="center"
|
||||
android:tint="@color/gray_300"
|
||||
android:tint="?text_primary"
|
||||
android:contentDescription="@string/menu_settings"
|
||||
android:layout_marginEnd="4.0dip"
|
||||
style="@style/Widget.AppCompat.ActionButton" />
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
android:textSize="12.0dip"
|
||||
android:textColor="#fffafafa"
|
||||
android:gravity="center"
|
||||
android:layout_gravity="center"
|
||||
android:id="@id/counter"
|
||||
android:background="@drawable/bottom_navigation_counter_bg"
|
||||
android:paddingLeft="@dimen/bottom_navigation_counter_padding"
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<LinearLayout android:layout_gravity="start"
|
||||
android:orientation="horizontal"
|
||||
android:padding="12.0dip"
|
||||
android:background="?tabbar_background"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="fill_parent"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
|
||||
@@ -4039,6 +4039,7 @@
|
||||
<string name="tgchannel">Telegram Канал</string>
|
||||
<string name="tgchat">Telegram Чат</string>
|
||||
<string name="vkgroup">Наша группа в ВК</string>
|
||||
<string name="vtfaqsumm">Ответы на все ваши вопросы здесь</string>
|
||||
<string name="vtsite">Наш сайт</string>
|
||||
<string name="installgms">Установите Сервисы Google Play</string>
|
||||
<string name="vtldads">Отключить рекламу</string>
|
||||
@@ -4200,6 +4201,7 @@
|
||||
<string name="proxysocks">Socks Прокси</string>
|
||||
<string name="proxystatic">Static Домен</string>
|
||||
<string name="reportbug">Сообщить о баге</string>
|
||||
<string name="reportbugsumm">Репорты багов помогают нам их исправлять</string>
|
||||
<string name="restartapp">Перезапустите приложение</string>
|
||||
<string name="savedmsg">Сохраненные сообщения</string>
|
||||
<string name="selectacc">Выберите аккаунт</string>
|
||||
@@ -4337,7 +4339,7 @@
|
||||
|
||||
<string name="add_another_account">Добавить новый аккаунт</string>
|
||||
|
||||
<string name="download_latest_vtl">Скачать последнюю версию</string>
|
||||
<string name="checkforupdates">Проверить обновления</string>
|
||||
|
||||
<string name="debug_warning">Внимание!</string>
|
||||
<string name="debug_warning_summary">Данное меню предназначено только для тестирования работоспособности приложения. Если вы являетесь рядовым юзером, то вам не следует ничего не трогать в данных настройках (пожалуйста)</string>
|
||||
@@ -4437,6 +4439,9 @@
|
||||
<string name="startbtn1">Новости</string>
|
||||
<string name="startbtn2">Продолжить</string>
|
||||
|
||||
<string name="vkiddisable">Отключить защиту</string>
|
||||
<string name="vkidsumm">ВКонтакте начали блокировать использование сторонних приложений, поэтому для стабильной работы всех разделов приложения необходимо отключить Защиту от подозрительных приложений \n\nVK ID -> Безопасность и вход -> Защита от подозрительных приложений</string>
|
||||
|
||||
<string name="videodownloaderr">Данное видео невозможно скачать</string>
|
||||
|
||||
<string name="roundedmsgs">Круглые сообщения</string>
|
||||
@@ -4474,6 +4479,15 @@
|
||||
<string name="vtlhidesumm">Скрыть подписи в настройках</string>
|
||||
|
||||
<string name="vtlssfssumm">Есть доступ</string>
|
||||
<string name="checkupdates">Авто обновления</string>
|
||||
<string name="updates">Обновления</string>
|
||||
|
||||
<string name="vkme_notifs">Вернуть вкладку уведомлений</string>
|
||||
<string name="updateanddownload">Обновить</string>
|
||||
<string name="newversion">Новая версия</string>
|
||||
<string name="changelog">Список изменений</string>
|
||||
<string name="downloaderr">Ошибка загрузки файла</string>
|
||||
<string name="onlineNull">Онлайн скрыт</string>
|
||||
|
||||
<string name="empty_text" />
|
||||
</resources>
|
||||
|
||||
@@ -117,9 +117,9 @@
|
||||
<item name="im_bubble_button_background_disabled">#66313233</item>
|
||||
<item name="im_bubble_button_foreground">@android:color/system_accent1_50</item>
|
||||
<item name="im_bubble_button_foreground_disabled">#66e1e3e6</item>
|
||||
<item name="im_bubble_gift_background">@color/gold_300</item>
|
||||
<item name="im_bubble_gift_text">@color/gold_100</item>
|
||||
<item name="im_bubble_gift_text_secondary">@color/gold_150</item>
|
||||
<item name="im_bubble_gift_background">@android:color/system_accent1_50</item>
|
||||
<item name="im_bubble_gift_text">?text_primary</item>
|
||||
<item name="im_bubble_gift_text_secondary">?text_secondary</item>
|
||||
<item name="im_bubble_incoming">@android:color/system_neutral1_900</item>
|
||||
<item name="im_bubble_incoming_alternate">@android:color/system_neutral1_900</item>
|
||||
<item name="im_bubble_incoming_alternate_highlighted">@android:color/system_neutral2_200
|
||||
|
||||
@@ -14953,7 +14953,7 @@
|
||||
<public type="string" name="dockbar_save" id="0x7f11123b" />
|
||||
<public type="string" name="dockbar_selected_items" id="0x7f11123c" />
|
||||
<public type="string" name="dockbar_unselected_items" id="0x7f11123d" />
|
||||
<public type="string" name="download_latest_vtl" id="0x7f11123e" />
|
||||
<public type="string" name="checkforupdates" id="0x7f11123e" />
|
||||
<public type="string" name="other_fix_dynamic_colors" id="0x7f11123f" />
|
||||
<public type="string" name="other_reset_settings" id="0x7f111240" />
|
||||
<public type="string" name="other_reset_settings_summary" id="0x7f111241" />
|
||||
|
||||
@@ -4164,6 +4164,7 @@ with video"</string>
|
||||
<string name="tgchat">Telegram Chat</string>
|
||||
<string name="vkgroup">Our VK Group</string>
|
||||
<string name="vtfaq">FAQ</string>
|
||||
<string name="vtfaqsumm">All your questions are answered here</string>
|
||||
<string name="vtsite">Our site</string>
|
||||
<string name="installgms">Install Google Play Services</string>
|
||||
<string name="vtldads">Disable Ads</string>
|
||||
@@ -4325,6 +4326,7 @@ You need to restart the application to apply proxy settings"</string>
|
||||
<string name="proxysocks">Socks Proxy</string>
|
||||
<string name="proxystatic">Static Domain</string>
|
||||
<string name="reportbug">Report a bug</string>
|
||||
<string name="reportbugsumm">Bug reports help us fix them</string>
|
||||
<string name="restartapp">Please, restart app</string>
|
||||
<string name="savedmsg">Saved messages</string>
|
||||
<string name="selectacc">Select account</string>
|
||||
@@ -4463,7 +4465,7 @@ May look like a fake leaving the online"</string>
|
||||
|
||||
<string name="add_another_account">Add new account</string>
|
||||
|
||||
<string name="download_latest_vtl">Download latest version</string>
|
||||
<string name="checkforupdates">Check for updates</string>
|
||||
|
||||
<string name="debug_warning">Warning!</string>
|
||||
<string name="debug_warning_summary">These options are for testing this app only. If you are a regular user, please, don\'t use them</string>
|
||||
@@ -4588,8 +4590,8 @@ May look like a fake leaving the online"</string>
|
||||
<string name="vtsettaboutmod">About modification</string>
|
||||
<string name="vtsettmod">Mod settings</string>
|
||||
|
||||
<string name="vtlsettenabled">enabled</string>
|
||||
<string name="vtlsettdisabled">disabled</string>
|
||||
<string name="vtlsettenabled">Enabled</string>
|
||||
<string name="vtlsettdisabled">Disabled</string>
|
||||
|
||||
<string name="vtlsettverifno">No</string>
|
||||
<string name="vtlsettverifyes">Yes</string>
|
||||
@@ -4608,6 +4610,18 @@ May look like a fake leaving the online"</string>
|
||||
<string name="vtlhidesumm">Hide settings summaries</string>
|
||||
|
||||
<string name="vtlssfssumm">Have access</string>
|
||||
<string name="checkupdates">Auto updates</string>
|
||||
<string name="updates">Updates</string>
|
||||
|
||||
<string name="vkme_notifs">Back notification tab to dock</string>
|
||||
<string name="updateanddownload">Update</string>
|
||||
<string name="newversion">New version</string>
|
||||
<string name="changelog">Changelog</string>
|
||||
<string name="downloaderr">Download error</string>
|
||||
<string name="onlineNull">Online is hidden</string>
|
||||
|
||||
<string name="vkiddisable">Disable protection</string>
|
||||
<string name="vkidsumm">VK has started blocking the use of third-party applications, so for the stable operation of all parts of the application, it is necessary to disable Protection from suspicious applications \n\nVK ID -> Security and Login -> Protection from suspicious applications</string>
|
||||
|
||||
<item type="string" name="APKTOOL_DUMMY_10be" />
|
||||
<item type="string" name="APKTOOL_DUMMY_10bf" />
|
||||
|
||||
@@ -34,16 +34,6 @@
|
||||
<PreferenceCategory
|
||||
android:key="multimedia"
|
||||
android:title="@string/sett_media">
|
||||
<com.vtosters.lite.ui.MaterialSwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="compressPhotos"
|
||||
android:title="@string/sett_compress_photos"
|
||||
app:singleLine="false" />
|
||||
<com.vtosters.lite.ui.MaterialSwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="compressVideos"
|
||||
android:title="@string/sett_compress_videos"
|
||||
app:singleLine="false" />
|
||||
<com.vtosters.lite.ui.MaterialSwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="saveProcessedImage"
|
||||
|
||||
@@ -29,16 +29,10 @@
|
||||
android:key="vkme"
|
||||
android:summary="@string/vkmesumm"
|
||||
android:title="@string/vkme" />
|
||||
<com.vtosters.lite.ui.MaterialSwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="vkme_msg"
|
||||
android:summary="TODO"
|
||||
android:title="@string/debug_experimental_vk_me_mode" />
|
||||
<com.vtosters.lite.ui.MaterialSwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="vkme_notifs"
|
||||
android:summary="Back notif tab"
|
||||
android:title="vkme_notifs" />
|
||||
android:title="@string/vkme_notifs" />
|
||||
<com.vtosters.lite.ui.MaterialSectionDividerPreference />
|
||||
</PreferenceCategory>
|
||||
<PreferenceCategory android:title="@string/interfaceemoji">
|
||||
|
||||
@@ -24,5 +24,9 @@
|
||||
android:key="gcmfix"
|
||||
android:summary="@string/vk_fix_music_summary"
|
||||
android:title="@string/vk_fix_music" />
|
||||
<com.vtosters.lite.ui.MaterialSwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="musicFixNew"
|
||||
android:title="Фикс музыки v2" />
|
||||
</PreferenceCategory>
|
||||
</PreferenceScreen>
|
||||
@@ -542,6 +542,10 @@
|
||||
iget-object v1, p0, Landroid/support/v7/widget/ToolbarWidgetWrapper;->q:Landroid/graphics/drawable/Drawable;
|
||||
|
||||
:goto_0
|
||||
invoke-static {v1}, Lru/vtosters/lite/utils/Themes;->recolorDrawableToolbar(Landroid/graphics/drawable/Drawable;)Landroid/graphics/drawable/Drawable;
|
||||
|
||||
move-result-object v1
|
||||
|
||||
invoke-virtual {v0, v1}, Landroid/support/v7/widget/Toolbar;->setNavigationIcon(Landroid/graphics/drawable/Drawable;)V
|
||||
|
||||
goto :goto_1
|
||||
|
||||
@@ -124,7 +124,7 @@
|
||||
|
||||
move-result v1
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->vkme_msg()Z
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->vkme()Z
|
||||
|
||||
move-result v1
|
||||
|
||||
|
||||
+4
@@ -2651,6 +2651,10 @@
|
||||
|
||||
check-cast v0, Landroid/graphics/drawable/Drawable;
|
||||
|
||||
invoke-static {v0}, Lru/vtosters/lite/utils/Themes;->recolorDrawableToolbar(Landroid/graphics/drawable/Drawable;)Landroid/graphics/drawable/Drawable;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
invoke-virtual {p1, v0}, Landroid/support/v7/widget/Toolbar;->setNavigationIcon(Landroid/graphics/drawable/Drawable;)V
|
||||
|
||||
:goto_0
|
||||
|
||||
+1
-1
@@ -231,7 +231,7 @@
|
||||
|
||||
move-result v1
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->vkme_msg()Z
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->vkme()Z
|
||||
|
||||
move-result v1
|
||||
|
||||
|
||||
@@ -216,7 +216,9 @@
|
||||
|
||||
if-gtz v4, :cond_1
|
||||
|
||||
const-string p1, ""
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->nullOnline()Ljava/lang/String;
|
||||
|
||||
move-result-object p1
|
||||
|
||||
goto :goto_0
|
||||
|
||||
|
||||
@@ -343,7 +343,7 @@
|
||||
|
||||
move-result v0
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->vkme_msg()Z
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->vkme()Z
|
||||
|
||||
move-result v0
|
||||
|
||||
@@ -832,7 +832,11 @@
|
||||
|
||||
sget v1, Lcom/vk/im/ui/R$e;->vkim_ic_verified:I
|
||||
|
||||
invoke-virtual {v0, v1}, Landroid/support/v7/widget/AppCompatImageView;->setImageResource(I)V
|
||||
invoke-static {v1}, Lru/vtosters/lite/utils/Themes;->recolorDrawableInt(I)Landroid/graphics/drawable/Drawable;
|
||||
|
||||
move-result-object v1
|
||||
|
||||
invoke-virtual {v0, v1}, Landroid/support/v7/widget/AppCompatImageView;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V
|
||||
|
||||
.line 116
|
||||
iget-object v0, v9, Lcom/vk/im/ui/views/dialogs/DialogItemView;->s:Landroid/support/v7/widget/AppCompatImageView;
|
||||
|
||||
@@ -203,7 +203,7 @@
|
||||
invoke-virtual {v0, v1}, Landroid/text/TextPaint;->setTextSize(F)V
|
||||
|
||||
.line 180
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Themes;->getHeaderText()I
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Themes;->getSTextAttr()I
|
||||
|
||||
move-result v1
|
||||
|
||||
|
||||
@@ -2224,13 +2224,13 @@
|
||||
const-string v3, "last_seen"
|
||||
|
||||
.line 299
|
||||
invoke-virtual {v1, v3}, Lorg/json/JSONObject;->getJSONObject(Ljava/lang/String;)Lorg/json/JSONObject;
|
||||
invoke-virtual {v1, v3}, Lorg/json/JSONObject;->optJSONObject(Ljava/lang/String;)Lorg/json/JSONObject;
|
||||
|
||||
move-result-object v3
|
||||
|
||||
const-string v5, "time"
|
||||
|
||||
invoke-virtual {v3, v5}, Lorg/json/JSONObject;->getInt(Ljava/lang/String;)I
|
||||
invoke-virtual {v3, v5}, Lorg/json/JSONObject;->optInt(Ljava/lang/String;)I
|
||||
|
||||
move-result v3
|
||||
|
||||
@@ -2239,7 +2239,7 @@
|
||||
const-string v3, "last_seen"
|
||||
|
||||
.line 300
|
||||
invoke-virtual {v1, v3}, Lorg/json/JSONObject;->getJSONObject(Ljava/lang/String;)Lorg/json/JSONObject;
|
||||
invoke-virtual {v1, v3}, Lorg/json/JSONObject;->optJSONObject(Ljava/lang/String;)Lorg/json/JSONObject;
|
||||
|
||||
move-result-object v3
|
||||
|
||||
|
||||
@@ -5556,6 +5556,31 @@
|
||||
|
||||
move-result-object p1
|
||||
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Themes;->recolorDrawableToolbar(Landroid/graphics/drawable/Drawable;)Landroid/graphics/drawable/Drawable;
|
||||
|
||||
move-result-object p1
|
||||
|
||||
invoke-virtual {p0, p1}, Landroid/support/v7/widget/Toolbar;->setNavigationIcon(Landroid/graphics/drawable/Drawable;)V
|
||||
|
||||
return-void
|
||||
.end method
|
||||
|
||||
.method public setNavigationIconAcent(I)V
|
||||
.locals 1
|
||||
|
||||
.line 939
|
||||
invoke-virtual {p0}, Landroid/support/v7/widget/Toolbar;->getContext()Landroid/content/Context;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
invoke-static {v0, p1}, Landroid/support/v7/c/a/AppCompatResources;->b(Landroid/content/Context;I)Landroid/graphics/drawable/Drawable;
|
||||
|
||||
move-result-object p1
|
||||
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Themes;->recolorDrawable(Landroid/graphics/drawable/Drawable;)Landroid/graphics/drawable/Drawable;
|
||||
|
||||
move-result-object p1
|
||||
|
||||
invoke-virtual {p0, p1}, Landroid/support/v7/widget/Toolbar;->setNavigationIcon(Landroid/graphics/drawable/Drawable;)V
|
||||
|
||||
return-void
|
||||
@@ -5629,7 +5654,7 @@
|
||||
|
||||
if-eqz v3, :cond_228
|
||||
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Themes;->recolorDrawable(Landroid/graphics/drawable/Drawable;)Landroid/graphics/drawable/Drawable;
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Themes;->recolorDrawableToolbar(Landroid/graphics/drawable/Drawable;)Landroid/graphics/drawable/Drawable;
|
||||
|
||||
move-result-object p1
|
||||
|
||||
@@ -5680,6 +5705,10 @@
|
||||
.line 1017
|
||||
iget-object v0, p0, Landroid/support/v7/widget/Toolbar;->e:Landroid/support/v7/widget/ActionMenuView;
|
||||
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Themes;->recolorDrawableToolbar(Landroid/graphics/drawable/Drawable;)Landroid/graphics/drawable/Drawable;
|
||||
|
||||
move-result-object p1
|
||||
|
||||
invoke-virtual {v0, p1}, Landroid/support/v7/widget/ActionMenuView;->setOverflowIcon(Landroid/graphics/drawable/Drawable;)V
|
||||
|
||||
return-void
|
||||
|
||||
@@ -191,6 +191,10 @@
|
||||
|
||||
invoke-static {p2, p3}, Landroid/support/v4/a/a/DrawableCompat;->a(Landroid/graphics/drawable/Drawable;I)V
|
||||
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Themes;->recolorDrawableToolbar(Landroid/graphics/drawable/Drawable;)Landroid/graphics/drawable/Drawable;
|
||||
|
||||
move-result-object p1
|
||||
|
||||
.line 53
|
||||
invoke-virtual {p0, p1}, Landroid/support/v7/widget/Toolbar;->setOverflowIcon(Landroid/graphics/drawable/Drawable;)V
|
||||
|
||||
|
||||
+1
-1
@@ -370,7 +370,7 @@
|
||||
|
||||
move-result v0
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->vkme_msg()Z
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->vkme()Z
|
||||
|
||||
move-result v0
|
||||
|
||||
|
||||
@@ -861,7 +861,7 @@
|
||||
|
||||
move-result v0
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->vkme_msg()Z
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->roundedmsgs()Z
|
||||
|
||||
move-result v0
|
||||
|
||||
|
||||
@@ -96,6 +96,13 @@
|
||||
|
||||
move-result p2
|
||||
|
||||
.line 180
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Themes;->getTextAttr()I
|
||||
|
||||
move-result v1
|
||||
|
||||
invoke-virtual {p1, v1}, Landroid/widget/TextView;->setTextColor(I)V
|
||||
|
||||
invoke-virtual {p1, p2}, Landroid/widget/TextView;->setText(I)V
|
||||
|
||||
return-void
|
||||
|
||||
@@ -254,6 +254,14 @@
|
||||
|
||||
iput-object p1, p0, Lcom/vk/sharing/view/SharingView;->l:Landroid/view/View;
|
||||
|
||||
iget-object p1, p0, Lcom/vk/sharing/view/SharingView;->l:Landroid/view/View;
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Themes;->getTabbarBackground()I
|
||||
|
||||
move-result v1
|
||||
|
||||
invoke-virtual {p1, v1}, Landroid/view/View;->setBackgroundColor(I)V
|
||||
|
||||
const/16 p1, 0x200
|
||||
|
||||
.line 269
|
||||
@@ -342,6 +350,14 @@
|
||||
|
||||
iput-object p1, p0, Lcom/vk/sharing/view/SharingView;->p:Landroid/widget/TextView;
|
||||
|
||||
iget-object p1, p0, Lcom/vk/sharing/view/SharingView;->p:Landroid/widget/TextView;
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Themes;->getTextAttr()I
|
||||
|
||||
move-result v1
|
||||
|
||||
invoke-virtual {p1, v1}, Landroid/widget/TextView;->setTextColor(I)V
|
||||
|
||||
const p1, 0x7f0a09ea
|
||||
|
||||
.line 281
|
||||
@@ -353,6 +369,12 @@
|
||||
|
||||
iput-object p1, p0, Lcom/vk/sharing/view/SharingView;->q:Landroid/widget/TextView;
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Themes;->getSTextAttr()I
|
||||
|
||||
move-result v1
|
||||
|
||||
invoke-virtual {p1, v1}, Landroid/widget/TextView;->setTextColor(I)V
|
||||
|
||||
.line 283
|
||||
new-instance p1, Lcom/vk/sharing/view/SharingView$1;
|
||||
|
||||
@@ -504,6 +526,12 @@
|
||||
|
||||
move-result-object p1
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Themes;->getTabbarBackground()I
|
||||
|
||||
move-result v1
|
||||
|
||||
invoke-virtual {p1, v1}, Landroid/view/View;->setBackgroundColor(I)V
|
||||
|
||||
check-cast p1, Lcom/vk/sharing/view/SharingActionsView;
|
||||
|
||||
iput-object p1, p0, Lcom/vk/sharing/view/SharingView;->H:Lcom/vk/sharing/view/SharingActionsView;
|
||||
@@ -528,6 +556,14 @@
|
||||
|
||||
iput-object p1, p0, Lcom/vk/sharing/view/SharingView;->I:Landroid/widget/LinearLayout;
|
||||
|
||||
iget-object p1, p0, Lcom/vk/sharing/view/SharingView;->I:Landroid/widget/LinearLayout;
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Themes;->getTabbarBackground()I
|
||||
|
||||
move-result v1
|
||||
|
||||
invoke-virtual {p1, v1}, Landroid/widget/LinearLayout;->setBackgroundColor(I)V
|
||||
|
||||
.line 370
|
||||
new-instance p1, Lcom/vk/sharing/view/SharingView$16;
|
||||
|
||||
@@ -2209,6 +2245,14 @@
|
||||
|
||||
iput-object v0, p0, Lcom/vk/sharing/view/SharingView;->O:Landroid/view/View;
|
||||
|
||||
iget-object v0, p0, Lcom/vk/sharing/view/SharingView;->O:Landroid/view/View;
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Themes;->getTabbarBackground()I
|
||||
|
||||
move-result v1
|
||||
|
||||
invoke-virtual {v0, v1}, Landroid/view/View;->setBackgroundColor(I)V
|
||||
|
||||
.line 711
|
||||
iget-object v0, p0, Lcom/vk/sharing/view/SharingView;->O:Landroid/view/View;
|
||||
|
||||
@@ -2244,6 +2288,14 @@
|
||||
|
||||
iput-object v0, p0, Lcom/vk/sharing/view/SharingView;->P:Landroid/view/View;
|
||||
|
||||
iget-object v0, p0, Lcom/vk/sharing/view/SharingView;->P:Landroid/view/View;
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Themes;->getTabbarBackground()I
|
||||
|
||||
move-result v1
|
||||
|
||||
invoke-virtual {v0, v1}, Landroid/view/View;->setBackgroundColor(I)V
|
||||
|
||||
.line 719
|
||||
iget-object v0, p0, Lcom/vk/sharing/view/SharingView;->P:Landroid/view/View;
|
||||
|
||||
@@ -2279,6 +2331,14 @@
|
||||
|
||||
iput-object v0, p0, Lcom/vk/sharing/view/SharingView;->Q:Landroid/view/View;
|
||||
|
||||
iget-object v0, p0, Lcom/vk/sharing/view/SharingView;->Q:Landroid/view/View;
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Themes;->getTabbarBackground()I
|
||||
|
||||
move-result v1
|
||||
|
||||
invoke-virtual {v0, v1}, Landroid/view/View;->setBackgroundColor(I)V
|
||||
|
||||
.line 727
|
||||
iget-object v0, p0, Lcom/vk/sharing/view/SharingView;->Q:Landroid/view/View;
|
||||
|
||||
|
||||
@@ -246,6 +246,10 @@
|
||||
|
||||
move-result p1
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Themes;->getTabbarBackground()I
|
||||
|
||||
move-result p1
|
||||
|
||||
invoke-virtual {p0, p1}, Lcom/vk/im/ui/views/WriteBarDisabled;->setBackgroundColor(I)V
|
||||
|
||||
const/16 p1, 0x11
|
||||
@@ -307,6 +311,10 @@
|
||||
|
||||
const/4 p1, -0x1
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Themes;->getTabbarBackground()I
|
||||
|
||||
move-result p1
|
||||
|
||||
.line 57
|
||||
invoke-virtual {p0, p1}, Lcom/vk/im/ui/views/WriteBarDisabled;->setBackgroundColor(I)V
|
||||
|
||||
|
||||
@@ -566,11 +566,7 @@
|
||||
|
||||
.line 65
|
||||
:cond_0
|
||||
invoke-static {p0}, Lru/vtosters/lite/ui/dialogs/Start;->alert(Landroid/app/Activity;)V
|
||||
|
||||
invoke-static {p0}, Lru/vtosters/lite/ui/dialogs/InstallGMS;->alert(Landroid/app/Activity;)V
|
||||
|
||||
invoke-static {p0}, Lru/vtosters/lite/ui/dialogs/DisableBattery;->alert(Landroid/app/Activity;)V
|
||||
invoke-static {p0}, Lru/vtosters/lite/utils/Globals;->MainActivityInit(Landroid/app/Activity;)V
|
||||
|
||||
invoke-virtual {p0}, Lcom/vtosters/lite/MainActivity;->getWindow()Landroid/view/Window;
|
||||
|
||||
|
||||
@@ -568,6 +568,10 @@
|
||||
|
||||
invoke-static {v1, v2}, Landroid/support/v4/a/a/DrawableCompat;->a(Landroid/graphics/drawable/Drawable;I)V
|
||||
|
||||
invoke-static {v1}, Lru/vtosters/lite/utils/Themes;->recolorDrawableToolbar(Landroid/graphics/drawable/Drawable;)Landroid/graphics/drawable/Drawable;
|
||||
|
||||
move-result-object v1
|
||||
|
||||
.line 627
|
||||
invoke-virtual {v0, v1}, Landroid/support/v7/widget/Toolbar;->setOverflowIcon(Landroid/graphics/drawable/Drawable;)V
|
||||
|
||||
|
||||
@@ -586,6 +586,10 @@
|
||||
|
||||
check-cast v0, Landroid/graphics/drawable/Drawable;
|
||||
|
||||
invoke-static {v0}, Lru/vtosters/lite/utils/Themes;->recolorDrawableToolbar(Landroid/graphics/drawable/Drawable;)Landroid/graphics/drawable/Drawable;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
invoke-virtual {p2, v0}, Landroid/support/v7/widget/Toolbar;->setNavigationIcon(Landroid/graphics/drawable/Drawable;)V
|
||||
|
||||
const v0, 0x7f11062b
|
||||
|
||||
@@ -2318,6 +2318,10 @@
|
||||
.line 554
|
||||
iget-object v0, p0, Landroid/support/v7/widget/ActionMenuView;->g:Landroid/support/v7/widget/ActionMenuPresenter;
|
||||
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Themes;->recolorDrawableToolbar(Landroid/graphics/drawable/Drawable;)Landroid/graphics/drawable/Drawable;
|
||||
|
||||
move-result-object p1
|
||||
|
||||
invoke-virtual {v0, p1}, Landroid/support/v7/widget/ActionMenuPresenter;->a(Landroid/graphics/drawable/Drawable;)V
|
||||
|
||||
return-void
|
||||
|
||||
+11
@@ -207,6 +207,17 @@
|
||||
|
||||
check-cast v4, Ljava/lang/String;
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->gcmfix()Z
|
||||
|
||||
move-result v6
|
||||
|
||||
if-eqz v6, :cond_10
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/audio/gcm/GCMFix;->requestTokenV2()Ljava/lang/String;
|
||||
|
||||
move-result-object v4
|
||||
|
||||
:cond_10
|
||||
invoke-virtual {v0, v3, v4}, Lcom/vk/api/internal/MethodCall$a;->a(Ljava/lang/String;Ljava/lang/String;)Lcom/vk/api/internal/MethodCall$a;
|
||||
|
||||
const-string v3, "nonce"
|
||||
|
||||
@@ -85,6 +85,10 @@
|
||||
|
||||
move-result-object v1
|
||||
|
||||
invoke-static {v1}, Lru/vtosters/lite/utils/Themes;->recolorDrawableToolbar(Landroid/graphics/drawable/Drawable;)Landroid/graphics/drawable/Drawable;
|
||||
|
||||
move-result-object v1
|
||||
|
||||
invoke-virtual {v0, v1}, Landroid/support/v7/widget/Toolbar;->setNavigationIcon(Landroid/graphics/drawable/Drawable;)V
|
||||
|
||||
.line 49
|
||||
|
||||
+2
-2
@@ -673,7 +673,7 @@
|
||||
|
||||
move-result p1
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->vkme_msg()Z
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->vkme()Z
|
||||
|
||||
move-result p1
|
||||
|
||||
@@ -1127,7 +1127,7 @@
|
||||
|
||||
move-result v0
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->vkme_msg()Z
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->vkme()Z
|
||||
|
||||
move-result v0
|
||||
|
||||
|
||||
@@ -2617,7 +2617,7 @@
|
||||
|
||||
move-result v0
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->vkme_msg()Z
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->vkme()Z
|
||||
|
||||
move-result v0
|
||||
|
||||
|
||||
@@ -342,7 +342,7 @@
|
||||
|
||||
move-result p2
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->vkme_msg()Z
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->vkme()Z
|
||||
|
||||
move-result p2
|
||||
|
||||
|
||||
@@ -873,7 +873,7 @@
|
||||
const v3, 0x7f0803e3
|
||||
|
||||
.line 333
|
||||
invoke-virtual {p3, v3}, Landroid/support/v7/widget/Toolbar;->setNavigationIcon(I)V
|
||||
invoke-virtual {p3, v3}, Landroid/support/v7/widget/Toolbar;->setNavigationIconAcent(I)V
|
||||
|
||||
.line 334
|
||||
invoke-virtual {p3}, Landroid/support/v7/widget/Toolbar;->getMenu()Landroid/view/Menu;
|
||||
|
||||
+1
-1
@@ -346,7 +346,7 @@
|
||||
|
||||
move-result p1
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->vkme_msg()Z
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->vkme()Z
|
||||
|
||||
move-result p1
|
||||
|
||||
|
||||
@@ -153,6 +153,10 @@
|
||||
|
||||
move-result-object v1
|
||||
|
||||
invoke-static {v1}, Lru/vtosters/lite/utils/Themes;->recolorDrawableToolbar(Landroid/graphics/drawable/Drawable;)Landroid/graphics/drawable/Drawable;
|
||||
|
||||
move-result-object v1
|
||||
|
||||
invoke-virtual {v0, v1}, Landroid/support/v7/widget/Toolbar;->setNavigationIcon(Landroid/graphics/drawable/Drawable;)V
|
||||
|
||||
.line 54
|
||||
|
||||
@@ -145,6 +145,10 @@
|
||||
|
||||
move-result-object p5
|
||||
|
||||
invoke-static {p5}, Lru/vtosters/lite/utils/Themes;->recolorDrawableToolbar(Landroid/graphics/drawable/Drawable;)Landroid/graphics/drawable/Drawable;
|
||||
|
||||
move-result-object p5
|
||||
|
||||
invoke-virtual {p5}, Landroid/graphics/drawable/Drawable;->mutate()Landroid/graphics/drawable/Drawable;
|
||||
|
||||
move-result-object p5
|
||||
@@ -247,6 +251,10 @@
|
||||
|
||||
check-cast p2, Landroid/graphics/drawable/Drawable;
|
||||
|
||||
invoke-static {p2}, Lru/vtosters/lite/utils/Themes;->recolorDrawableToolbar(Landroid/graphics/drawable/Drawable;)Landroid/graphics/drawable/Drawable;
|
||||
|
||||
move-result-object p2
|
||||
|
||||
invoke-virtual {p1, p2}, Landroid/support/v7/widget/Toolbar;->setOverflowIcon(Landroid/graphics/drawable/Drawable;)V
|
||||
|
||||
.line 88
|
||||
|
||||
@@ -2499,6 +2499,10 @@
|
||||
|
||||
aget-object p2, p2, v1
|
||||
|
||||
invoke-static {p2}, Lru/vtosters/lite/utils/Themes;->recolorDrawableToolbar(Landroid/graphics/drawable/Drawable;)Landroid/graphics/drawable/Drawable;
|
||||
|
||||
move-result-object p2
|
||||
|
||||
invoke-virtual {p1, p2}, Landroid/support/v7/widget/Toolbar;->setOverflowIcon(Landroid/graphics/drawable/Drawable;)V
|
||||
|
||||
.line 215
|
||||
|
||||
Reference in New Issue
Block a user