Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ff8e7b7f41 | ||
|
|
2c501606be | ||
|
|
73420fe1c4 | ||
|
|
337f81346c | ||
|
|
06f9a4545b | ||
|
|
fa99df93c4 | ||
|
|
adcd2472d5 | ||
|
|
7527b9a07e | ||
|
|
800c223baa | ||
|
|
d1123d3ccf | ||
|
|
f61fc99d9c | ||
|
|
60653cc739 | ||
|
|
d25bba10b0 | ||
|
|
3b67ecaa5e | ||
|
|
6600f32392 | ||
|
|
64303b1709 | ||
|
|
5c7e50d61e | ||
|
|
f68ad105a6 | ||
|
|
164479da1d | ||
|
|
d93bf41d28 | ||
|
|
38a2b3f2b2 | ||
|
|
342534676c | ||
|
|
56a6a6de03 | ||
|
|
d1445c2801 |
@@ -0,0 +1,502 @@
|
||||
package com.vk.medianative;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.Color;
|
||||
import android.os.Process;
|
||||
import android.os.*;
|
||||
import android.util.Log;
|
||||
import androidx.annotation.Keep;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.soloader.SoLoader;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.util.Scanner;
|
||||
|
||||
public final class MediaNative {
|
||||
private static final String a = NativeMediaEncoder.class.getSimpleName();
|
||||
private static final Object f17443d = new Object();
|
||||
@SuppressLint("StaticFieldLeak")
|
||||
@Keep
|
||||
public static volatile Context context;
|
||||
private static boolean isMediaLoaded = false;
|
||||
private static boolean isMediaMasksLoaded = false;
|
||||
|
||||
public static int HSLToIntRGB(float f2, float f3, float f4) {
|
||||
int[] iArr = new int[3];
|
||||
waitForContext();
|
||||
nativeHSLToRGB(f2, f3, f4, iArr);
|
||||
return Color.argb(255, iArr[0], iArr[1], iArr[2]);
|
||||
}
|
||||
|
||||
public static void HSLToRGB(float f2, float f3, float f4, int[] iArr) {
|
||||
waitForContext();
|
||||
nativeHSLToRGB(f2, f3, f4, iArr);
|
||||
}
|
||||
|
||||
public static int HSVToIntRGB(float f2, float f3, float f4) {
|
||||
int[] iArr = new int[3];
|
||||
waitForContext();
|
||||
nativeHSVToRGB(f2, f3, f4, iArr);
|
||||
return Color.argb(255, iArr[0], iArr[1], iArr[2]);
|
||||
}
|
||||
|
||||
public static void HSVToRGB(float f2, float f3, float f4, int[] iArr) {
|
||||
waitForContext();
|
||||
nativeHSVToRGB(f2, f3, f4, iArr);
|
||||
}
|
||||
|
||||
public static int LabToIntRGB(float f2, float f3, float f4) {
|
||||
int[] iArr = new int[3];
|
||||
waitForContext();
|
||||
nativeLabToRGB(f2, f3, f4, iArr);
|
||||
return Color.argb(255, iArr[0], iArr[1], iArr[2]);
|
||||
}
|
||||
|
||||
public static void LabToRGB(float f2, float f3, float f4, int[] iArr) {
|
||||
waitForContext();
|
||||
nativeLabToRGB(f2, f3, f4, iArr);
|
||||
}
|
||||
|
||||
public static void RGBToHSL(int i, int i2, int i3, float[] fArr) {
|
||||
waitForContext();
|
||||
nativeRGBToHSL(i, i2, i3, fArr);
|
||||
}
|
||||
|
||||
public static void RGBToHSV(int i, int i2, int i3, float[] fArr) {
|
||||
waitForContext();
|
||||
nativeRGBToHSV(i, i2, i3, fArr);
|
||||
}
|
||||
|
||||
public static void RGBToLab(int i, int i2, int i3, float[] fArr) {
|
||||
waitForContext();
|
||||
nativeRGBToLab(i, i2, i3, fArr);
|
||||
}
|
||||
|
||||
public static long animationPlayerCreate(String str, int i, int i2, boolean z) {
|
||||
waitForContext();
|
||||
return nativeAnimationPlayerCreate(str, i, i2, z);
|
||||
}
|
||||
|
||||
public static int animationPlayerDecode(long j, Bitmap bitmap) {
|
||||
waitForContext();
|
||||
return nativeAnimationPlayerDecode(j, bitmap);
|
||||
}
|
||||
|
||||
public static int animationPlayerGetSize(long j) {
|
||||
waitForContext();
|
||||
return nativeAnimationPlayerGetSize(j);
|
||||
}
|
||||
|
||||
public static void animationPlayerRelease(long j) {
|
||||
waitForContext();
|
||||
nativeAnimationPlayerRelease(j);
|
||||
}
|
||||
|
||||
public static boolean animationPlayerSeek(long j, int i) {
|
||||
waitForContext();
|
||||
return nativeAnimationPlayerSeek(j, i);
|
||||
}
|
||||
|
||||
public static void applyCurveAndSaturationBitmap(Bitmap bitmap, int[] iArr, float f2) {
|
||||
waitForContext();
|
||||
nativeCurveSaturation(bitmap, iArr, f2, Runtime.getRuntime().availableProcessors());
|
||||
}
|
||||
|
||||
public static long audioGetTotalPcmDuration() {
|
||||
waitForContext();
|
||||
return nativeAudioGetTotalPcmDuration();
|
||||
}
|
||||
|
||||
public static byte[] audioGetWaveform(short[] sArr, int i) {
|
||||
waitForContext();
|
||||
return nativeAudioGetWaveform(sArr, i);
|
||||
}
|
||||
|
||||
public static int audioIsOpusFile(String str) {
|
||||
waitForContext();
|
||||
return nativeAudioIsOpusFile(str);
|
||||
}
|
||||
|
||||
public static void audioReadOpusFile(ByteBuffer byteBuffer, int i, int[] iArr) {
|
||||
waitForContext();
|
||||
nativeAudioReadOpusFile(byteBuffer, i, iArr);
|
||||
}
|
||||
|
||||
public static int audioSeekOpusFile(float f2) {
|
||||
waitForContext();
|
||||
return nativeAudioSeekOpusFile(f2);
|
||||
}
|
||||
|
||||
public static int audioStartRecord(String str) { // need to hack
|
||||
waitForContext();
|
||||
return nativeAudioStartRecord(str);
|
||||
}
|
||||
|
||||
public static void audioStopRecord() { // need to hack
|
||||
waitForContext();
|
||||
nativeAudioStopRecord();
|
||||
}
|
||||
|
||||
public static int audioWriteFrame(ByteBuffer byteBuffer, int i) { // need to hack
|
||||
waitForContext();
|
||||
return nativeAudioWriteFrame(byteBuffer, i);
|
||||
}
|
||||
|
||||
private static void waitForContext() {
|
||||
synchronized (f17443d) {
|
||||
if (context == null) {
|
||||
try {
|
||||
f17443d.wait();
|
||||
} catch (InterruptedException e2) {
|
||||
Log.e(a, "Interrupted while waiting for context", e2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void blurBitmap(Bitmap bitmap, int i) {
|
||||
waitForContext();
|
||||
nativeBlur(bitmap, i);
|
||||
}
|
||||
|
||||
private static String c() {
|
||||
return getProcMaps(String.valueOf(Process.myPid()));
|
||||
}
|
||||
|
||||
public static void cameraProcessorCreate() {
|
||||
waitForContext();
|
||||
nativeProcessorCreate();
|
||||
}
|
||||
|
||||
public static boolean cameraProcessorDo(byte[] bArr, long[] jArr) {
|
||||
waitForContext();
|
||||
return nativeProcessorDo(bArr, jArr);
|
||||
}
|
||||
|
||||
public static int cameraProcessorGetVersion() {
|
||||
waitForContext();
|
||||
return nativeProcessorGetVersion();
|
||||
}
|
||||
|
||||
public static boolean cameraProcessorInit(String str, int i, int i2) {
|
||||
waitForContext();
|
||||
return nativeProcessorInit(str, i, i2);
|
||||
}
|
||||
|
||||
public static boolean cameraProcessorLoad(String str, boolean z) {
|
||||
waitForContext();
|
||||
return nativeProcessorLoad(str, z);
|
||||
}
|
||||
|
||||
public static void cameraProcessorMouseTap(int i, float f2, float f3) {
|
||||
waitForContext();
|
||||
nativeProcessorMouseTap(i, f2, f3);
|
||||
}
|
||||
|
||||
public static void cameraProcessorRelease() {
|
||||
waitForContext();
|
||||
nativeProcessorRelease();
|
||||
}
|
||||
|
||||
public static void colorCorrectionBitmap(Bitmap bitmap, Bitmap bitmap2, float[] fArr) {
|
||||
waitForContext();
|
||||
nativeColorCorrection(bitmap, bitmap2, fArr, fArr.length, Runtime.getRuntime().availableProcessors());
|
||||
}
|
||||
|
||||
public static byte[] compressBitmapJpeg(Bitmap bitmap, int i) {
|
||||
waitForContext();
|
||||
return nativeJpegTurboCompress(bitmap, i);
|
||||
}
|
||||
|
||||
public static String createAllInOneShader() {
|
||||
waitForContext();
|
||||
return nativeAllInOneShader();
|
||||
}
|
||||
|
||||
public static void createCurve(int[] iArr, int[] iArr2, int[] iArr3, int[] iArr4, int[] iArr5, float f2, float f3, float f4, float f5, float f6) {
|
||||
waitForContext();
|
||||
nativeCreateCurve(iArr, iArr2, iArr3, iArr4, iArr5, f2, f3, f4, f5, f6);
|
||||
}
|
||||
|
||||
public static String createOneInAllShader() {
|
||||
waitForContext();
|
||||
return nativeOneInAllShader();
|
||||
}
|
||||
|
||||
private static String d() {
|
||||
return getProcMaps("self");
|
||||
}
|
||||
|
||||
public static String dump() {
|
||||
return "LD_LIBRARY_PATH:\n" + SoLoader.makeLdLibraryPath() + "\nSELF_MAPS:\n" + d() + "\nPID_MAPS:\n" + c() + "\n";
|
||||
}
|
||||
|
||||
private static void e() {
|
||||
isMediaMasksLoaded = NativeLibLoader.loadLibrary("vkmediamasks");
|
||||
}
|
||||
|
||||
public static void enhanceBitmap(Bitmap bitmap, float f2) {
|
||||
waitForContext();
|
||||
nativeEnhance(bitmap, f2, Runtime.getRuntime().availableProcessors());
|
||||
}
|
||||
|
||||
private static void loadVKMediaLibs() {
|
||||
if (isMediaLoaded) {
|
||||
return;
|
||||
}
|
||||
NativeLibLoader.loadLibrary("ffmpeg");
|
||||
isMediaLoaded = NativeLibLoader.loadLibrary("vkmedia");
|
||||
isMediaLoaded = NativeLibLoader.loadLibrary("vkmediaencoder");
|
||||
}
|
||||
|
||||
public static void flipHorizontallyBitmap(Bitmap bitmap) {
|
||||
waitForContext();
|
||||
nativeFlipHorizontally(bitmap);
|
||||
}
|
||||
|
||||
public static void flipVerticallyBitmap(Bitmap bitmap) {
|
||||
waitForContext();
|
||||
nativeFlipVertically(bitmap);
|
||||
}
|
||||
|
||||
public static void generateHistogram(Bitmap bitmap, int[] iArr, int[] iArr2, int[] iArr3, int[] iArr4) {
|
||||
waitForContext();
|
||||
nativeHistogram(bitmap, iArr, iArr2, iArr3, iArr4);
|
||||
}
|
||||
|
||||
public static void init(Context context2) {
|
||||
synchronized (f17443d) {
|
||||
context = context2;
|
||||
SoLoader.init(context2, false);
|
||||
NativeLibLoader.loadLibrary("gnustl_shared");
|
||||
NativeLibLoader.loadLibrary("vkchronicle");
|
||||
loadVKMediaLibs();
|
||||
f17443d.notifyAll();
|
||||
}
|
||||
}
|
||||
|
||||
public static void intRGBToHSL(int i, float[] fArr) {
|
||||
waitForContext();
|
||||
nativeRGBToHSL(Color.red(i), Color.green(i), Color.blue(i), fArr);
|
||||
}
|
||||
|
||||
public static void intRGBToHSV(int i, float[] fArr) {
|
||||
waitForContext();
|
||||
nativeRGBToHSV(Color.red(i), Color.green(i), Color.blue(i), fArr);
|
||||
}
|
||||
|
||||
public static void intRGBToLab(int i, float[] fArr) {
|
||||
waitForContext();
|
||||
nativeRGBToLab(Color.red(i), Color.green(i), Color.blue(i), fArr);
|
||||
}
|
||||
|
||||
public static boolean isAsus() {
|
||||
return "asus".equalsIgnoreCase(Build.MANUFACTURER);
|
||||
}
|
||||
|
||||
public static boolean isMediaSupported() {
|
||||
if (!isMediaMasksLoaded) {
|
||||
e();
|
||||
}
|
||||
return isMediaMasksLoaded;
|
||||
}
|
||||
|
||||
public static boolean isX86() {
|
||||
try {
|
||||
String str = Build.SUPPORTED_ABIS[0];
|
||||
if (str != null) {
|
||||
return str.startsWith("x86");
|
||||
}
|
||||
return false;
|
||||
} catch (Throwable unused) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public static void lookupBitmap(Bitmap bitmap, Bitmap bitmap2) {
|
||||
waitForContext();
|
||||
nativeLookup(bitmap, bitmap2, Runtime.getRuntime().availableProcessors());
|
||||
}
|
||||
|
||||
public static long mediaEncoderCreate(MediaEncoderSettings mediaEncoderSettings) {
|
||||
waitForContext();
|
||||
return nativeCreateEncoder(mediaEncoderSettings);
|
||||
}
|
||||
|
||||
public static int mediaEncoderDoEncode(long j) {
|
||||
waitForContext();
|
||||
return nativeDoEncode(j);
|
||||
}
|
||||
|
||||
public static void mediaEncoderDoRelease(long j) {
|
||||
waitForContext();
|
||||
nativeReleaseEncoder(j);
|
||||
}
|
||||
|
||||
private static native String nativeAllInOneShader();
|
||||
|
||||
private static native long nativeAnimationPlayerCreate(String str, int i, int i2, boolean z);
|
||||
|
||||
private static native int nativeAnimationPlayerDecode(long j, Bitmap bitmap);
|
||||
|
||||
private static native int nativeAnimationPlayerGetSize(long j);
|
||||
|
||||
private static native void nativeAnimationPlayerRelease(long j);
|
||||
|
||||
private static native boolean nativeAnimationPlayerSeek(long j, int i);
|
||||
|
||||
private static native long nativeAudioGetTotalPcmDuration();
|
||||
|
||||
private static native byte[] nativeAudioGetWaveform(short[] sArr, int i);
|
||||
|
||||
private static native int nativeAudioIsOpusFile(String str);
|
||||
|
||||
private static native int nativeAudioOpenOpusFile(String str);
|
||||
|
||||
private static native void nativeAudioReadOpusFile(ByteBuffer byteBuffer, int i, int[] iArr);
|
||||
|
||||
private static native int nativeAudioSeekOpusFile(float f2);
|
||||
|
||||
private static native int nativeAudioStartRecord(String str);
|
||||
|
||||
private static native void nativeAudioStopRecord();
|
||||
|
||||
private static native int nativeAudioWriteFrame(ByteBuffer byteBuffer, int i);
|
||||
|
||||
private static native void nativeBlur(Bitmap bitmap, int i);
|
||||
|
||||
private static native void nativeColorCorrection(Bitmap bitmap, Bitmap bitmap2, float[] fArr, int i, int i2);
|
||||
|
||||
private static native String nativeCreateColorCorrectionShader(float[] fArr, int i, int i2);
|
||||
|
||||
private static native void nativeCreateCurve(int[] iArr, int[] iArr2, int[] iArr3, int[] iArr4, int[] iArr5, float f2, float f3, float f4, float f5, float f6);
|
||||
|
||||
private static native long nativeCreateEncoder(MediaEncoderSettings mediaEncoderSettings);
|
||||
|
||||
private static native void nativeCurveSaturation(Bitmap bitmap, int[] iArr, double d2, int i);
|
||||
|
||||
private static native int nativeDoEncode(long j);
|
||||
|
||||
private static native void nativeEnhance(Bitmap bitmap, double d2, int i);
|
||||
|
||||
private static native void nativeFlipHorizontally(Bitmap bitmap);
|
||||
|
||||
private static native void nativeFlipVertically(Bitmap bitmap);
|
||||
|
||||
private static native void nativeHSLToRGB(float f2, float f3, float f4, int[] iArr);
|
||||
|
||||
private static native void nativeHSVToRGB(float f2, float f3, float f4, int[] iArr);
|
||||
|
||||
private static native void nativeHistogram(Bitmap bitmap, int[] iArr, int[] iArr2, int[] iArr3, int[] iArr4);
|
||||
|
||||
private static native byte[] nativeJpegTurboCompress(Bitmap bitmap, int i);
|
||||
|
||||
private static native void nativeLabToRGB(float f2, float f3, float f4, int[] iArr);
|
||||
|
||||
private static native void nativeLookup(Bitmap bitmap, Bitmap bitmap2, int i);
|
||||
|
||||
private static native String nativeOneInAllShader();
|
||||
|
||||
private static native void nativePinBitmap(Bitmap bitmap);
|
||||
|
||||
private static native void nativeProcessorCreate();
|
||||
|
||||
private static native boolean nativeProcessorDo(byte[] bArr, long[] jArr);
|
||||
|
||||
private static native int nativeProcessorGetVersion();
|
||||
|
||||
private static native boolean nativeProcessorInit(String str, int i, int i2);
|
||||
|
||||
private static native boolean nativeProcessorLoad(String str, boolean z);
|
||||
|
||||
private static native void nativeProcessorMouseTap(int i, float f2, float f3);
|
||||
|
||||
private static native void nativeProcessorRelease();
|
||||
|
||||
private static native void nativeRGBToHSL(int i, int i2, int i3, float[] fArr);
|
||||
|
||||
private static native void nativeRGBToHSV(int i, int i2, int i3, float[] fArr);
|
||||
|
||||
private static native void nativeRGBToLab(int i, int i2, int i3, float[] fArr);
|
||||
|
||||
private static native void nativeReleaseEncoder(long j);
|
||||
|
||||
private static native void nativeResize(Bitmap bitmap, Bitmap bitmap2, int i);
|
||||
|
||||
public static int openOpusFile(String str) {
|
||||
waitForContext();
|
||||
return nativeAudioOpenOpusFile(str);
|
||||
}
|
||||
|
||||
public static void pinBitmap(Bitmap bitmap) {
|
||||
waitForContext();
|
||||
nativePinBitmap(bitmap);
|
||||
}
|
||||
|
||||
public static void resizeBitmap(Bitmap bitmap, Bitmap bitmap2) {
|
||||
waitForContext();
|
||||
nativeResize(bitmap, bitmap2, Runtime.getRuntime().availableProcessors());
|
||||
}
|
||||
|
||||
private static String getProcMaps(String str) {
|
||||
try (InputStream inputStream = Runtime.getRuntime().exec("cat /proc/" + str + "/maps").getInputStream()) {
|
||||
return new Scanner(inputStream).useDelimiter("\\A").next();
|
||||
} catch (Exception e) {
|
||||
return "empty";
|
||||
}
|
||||
}
|
||||
|
||||
public static class EncoderHandler extends Handler {
|
||||
private Callback a;
|
||||
|
||||
public EncoderHandler(Looper looper) {
|
||||
super(looper);
|
||||
}
|
||||
|
||||
@Keep
|
||||
public static Object postEventFromNative(Object obj, int i, int i2, int i3) {
|
||||
EncoderHandler encoderHandler;
|
||||
if (obj != null && (encoderHandler = (EncoderHandler) ((WeakReference<?>) obj).get()) != null) {
|
||||
if (i == 2) {
|
||||
return encoderHandler.a.getLayerBitmap(i2, i3);
|
||||
}
|
||||
encoderHandler.sendMessage(encoderHandler.obtainMessage(i, i2, i3, null));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override // android.os.Handler
|
||||
public void handleMessage(Message message) {
|
||||
Callback callback = this.a;
|
||||
if (callback == null) {
|
||||
return;
|
||||
}
|
||||
int i = message.what;
|
||||
if (i == 0) {
|
||||
callback.onBytes(message.arg1);
|
||||
} else if (i != 1) {
|
||||
String str = MediaNative.a;
|
||||
Log.e(str, "Unknown message type " + message.what);
|
||||
} else {
|
||||
callback.onProgress(message.arg1);
|
||||
}
|
||||
}
|
||||
|
||||
public void setCallback(Callback callback) {
|
||||
this.a = callback;
|
||||
}
|
||||
|
||||
public interface Callback {
|
||||
@Nullable
|
||||
Bitmap getLayerBitmap(int i, int i2);
|
||||
|
||||
void onBytes(int i);
|
||||
|
||||
void onProgress(int i);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4976,30 +4976,29 @@ public final class R {
|
||||
public static final int ic_deepl_logo_icon = 0x7f080bcb; // 2131233739
|
||||
public static final int ic_google_translate_logo = 0x7f080bcc; // 2131233740
|
||||
public static final int ic_yandex_translate_icon = 0x7f080bd1; // 2131233745
|
||||
public static final int microsoft = 0x7f080bd2; // 2131233746
|
||||
public static final int $splash__0 = 0x7f080bd2; // 2131233746
|
||||
public static final int roundmsg = 0x7f080bd3; // 2131233747
|
||||
public static final int tgs_entry_background = 0x7f080bd4; // 2131233748
|
||||
public static final int yandex = 0x7f080bd7; // 2131233751
|
||||
public static final int $splash__0 = 0x7f080bd8; // 2131233752
|
||||
public static final int $splash__1 = 0x7f080bd9; // 2131233753
|
||||
public static final int $splash__10 = 0x7f080bda; // 2131233754
|
||||
public static final int $splash__11 = 0x7f080bdb; // 2131233755
|
||||
public static final int $splash__12 = 0x7f080bdc; // 2131233756
|
||||
public static final int $splash__13 = 0x7f080bdd; // 2131233757
|
||||
public static final int $splash__14 = 0x7f080bde; // 2131233758
|
||||
public static final int $splash__15 = 0x7f080bdf; // 2131233759
|
||||
public static final int $splash__2 = 0x7f080be0; // 2131233760
|
||||
public static final int $splash__3 = 0x7f080be1; // 2131233761
|
||||
public static final int $splash__4 = 0x7f080be2; // 2131233762
|
||||
public static final int $splash__5 = 0x7f080be3; // 2131233763
|
||||
public static final int $splash__6 = 0x7f080be4; // 2131233764
|
||||
public static final int $splash__7 = 0x7f080be5; // 2131233765
|
||||
public static final int $splash__8 = 0x7f080be6; // 2131233766
|
||||
public static final int $splash__9 = 0x7f080be7; // 2131233767
|
||||
public static final int $splash__1 = 0x7f080bd8; // 2131233752
|
||||
public static final int $splash__10 = 0x7f080bd9; // 2131233753
|
||||
public static final int $splash__11 = 0x7f080bda; // 2131233754
|
||||
public static final int $splash__12 = 0x7f080bdb; // 2131233755
|
||||
public static final int $splash__13 = 0x7f080bdc; // 2131233756
|
||||
public static final int $splash__14 = 0x7f080bdd; // 2131233757
|
||||
public static final int $splash__15 = 0x7f080bde; // 2131233758
|
||||
public static final int $splash__2 = 0x7f080bdf; // 2131233759
|
||||
public static final int $splash__3 = 0x7f080be0; // 2131233760
|
||||
public static final int $splash__4 = 0x7f080be1; // 2131233761
|
||||
public static final int $splash__5 = 0x7f080be2; // 2131233762
|
||||
public static final int $splash__6 = 0x7f080be3; // 2131233763
|
||||
public static final int $splash__7 = 0x7f080be4; // 2131233764
|
||||
public static final int $splash__8 = 0x7f080be5; // 2131233765
|
||||
public static final int $splash__9 = 0x7f080be6; // 2131233766
|
||||
public static final int checker_background = 0x7f080be8; // 2131233768
|
||||
public static final int custom_thumb_selector = 0x7f080be9; // 2131233769
|
||||
public static final int custom_track_selector = 0x7f080bea; // 2131233770
|
||||
public static final int splash = 0x7f080beb; // 2131233771
|
||||
public static final int splash = 0x7f080bec; // 2131233772
|
||||
public static final int abc_control_background_material = 0x7f080032; // 2131230770
|
||||
public static final int ic_action_close = 0x7f080322; // 2131231522
|
||||
public static final int ic_camera_outline_28_new = 0x7f0803a0; // 2131231648
|
||||
@@ -6797,6 +6796,9 @@ public final class R {
|
||||
public static final int ic_telegram_24 = 0x7f080bcf; // 2131233743
|
||||
public static final int ic_telegram_outline_28 = 0x7f080bd0; // 2131233744
|
||||
public static final int vtlogo = 0x7f080bd6; // 2131233750
|
||||
public static final int bing = 0x7f080be7; // 2131233767
|
||||
public static final int sauceNAO = 0x7f080beb; // 2131233771
|
||||
public static final int tracemoe = 0x7f080bed; // 2131233773
|
||||
public static final int bg_music_play_button_white = 0x7f08015e; // 2131231070
|
||||
public static final int bg_poll_bg_thumb = 0x7f080181; // 2131231105
|
||||
public static final int bg_stickers_suggestions_left = 0x7f0801ad; // 2131231149
|
||||
@@ -19592,67 +19594,70 @@ public final class R {
|
||||
public static final int calls_not_available = 0x7f12184a; // 2131892298
|
||||
public static final int cannot_write = 0x7f12184b; // 2131892299
|
||||
public static final int change_accent_color = 0x7f12184c; // 2131892300
|
||||
public static final int copydebuginfo_summ = 0x7f12184d; // 2131892301
|
||||
public static final int copydebuginfo_title = 0x7f12184e; // 2131892302
|
||||
public static final int copyownlink_summ = 0x7f12184f; // 2131892303
|
||||
public static final int copyownlink_title = 0x7f121850; // 2131892304
|
||||
public static final int crash_service_name = 0x7f121851; // 2131892305
|
||||
public static final int currentLanguage = 0x7f121852; // 2131892306
|
||||
public static final int current_theme = 0x7f121853; // 2131892307
|
||||
public static final int custom_links_warning = 0x7f121854; // 2131892308
|
||||
public static final int data = 0x7f121855; // 2131892309
|
||||
public static final int data_updated = 0x7f121856; // 2131892310
|
||||
public static final int datasettings_title = 0x7f121857; // 2131892311
|
||||
public static final int device_info = 0x7f121858; // 2131892312
|
||||
public static final int device_info_copied = 0x7f121859; // 2131892313
|
||||
public static final int dialogstats = 0x7f12185a; // 2131892314
|
||||
public static final int disable_analytics = 0x7f12185b; // 2131892315
|
||||
public static final int disable_analytics_summ = 0x7f12185c; // 2131892316
|
||||
public static final int downloading_update = 0x7f12185d; // 2131892317
|
||||
public static final int error_applying_accent = 0x7f12185e; // 2131892318
|
||||
public static final int error_no_text = 0x7f12185f; // 2131892319
|
||||
public static final int error_saving_file = 0x7f121860; // 2131892320
|
||||
public static final int failed_to_get_text = 0x7f121861; // 2131892321
|
||||
public static final int invalid_pack_link = 0x7f121862; // 2131892322
|
||||
public static final int invalidate_theme_cache_title = 0x7f121863; // 2131892323
|
||||
public static final int logColors_title = 0x7f121864; // 2131892324
|
||||
public static final int maxquality_summ = 0x7f121865; // 2131892325
|
||||
public static final int maxquality_title = 0x7f121866; // 2131892326
|
||||
public static final int monettheme_summ = 0x7f121867; // 2131892327
|
||||
public static final int monettheme_title = 0x7f121868; // 2131892328
|
||||
public static final int newsfeed_notif_summ = 0x7f121869; // 2131892329
|
||||
public static final int newsfeed_notif_title = 0x7f12186a; // 2131892330
|
||||
public static final int open_bot = 0x7f12186b; // 2131892331
|
||||
public static final int promotedstickers_title = 0x7f12186c; // 2131892332
|
||||
public static final int remove_encryption_key = 0x7f12186d; // 2131892333
|
||||
public static final int remove_from_ads_stories_whitelist = 0x7f12186e; // 2131892334
|
||||
public static final int reset_accounts = 0x7f12186f; // 2131892335
|
||||
public static final int reset_all_settings = 0x7f121870; // 2131892336
|
||||
public static final int restore_accounts = 0x7f121871; // 2131892337
|
||||
public static final int restore_settings = 0x7f121872; // 2131892338
|
||||
public static final int save_accounts = 0x7f121873; // 2131892339
|
||||
public static final int save_online_data = 0x7f121874; // 2131892340
|
||||
public static final int select_color = 0x7f121875; // 2131892341
|
||||
public static final int select_palette = 0x7f121876; // 2131892342
|
||||
public static final int sources = 0x7f121877; // 2131892343
|
||||
public static final int storiesGroupsAdBlock = 0x7f121878; // 2131892344
|
||||
public static final int storiesGroupsAdBlocksummary = 0x7f121879; // 2131892345
|
||||
public static final int systemtheme = 0x7f12187a; // 2131892346
|
||||
public static final int systemtheme_enabled = 0x7f12187b; // 2131892347
|
||||
public static final int systemtheme_summ = 0x7f12187c; // 2131892348
|
||||
public static final int updateverifdata_summ = 0x7f12187d; // 2131892349
|
||||
public static final int updateverifdata_title = 0x7f12187e; // 2131892350
|
||||
public static final int useCustomPrefsStyle_summ = 0x7f12187f; // 2131892351
|
||||
public static final int useCustomPrefsStyle_title = 0x7f121880; // 2131892352
|
||||
public static final int useGenius_summ = 0x7f121881; // 2131892353
|
||||
public static final int useGenius_title = 0x7f121882; // 2131892354
|
||||
public static final int useNewColorEngine_summ = 0x7f121883; // 2131892355
|
||||
public static final int useNewColorEngine_title = 0x7f121884; // 2131892356
|
||||
public static final int useOldAppVer_summ = 0x7f121885; // 2131892357
|
||||
public static final int useOldAppVer_title = 0x7f121886; // 2131892358
|
||||
public static final int vkx_integration_enabled_info = 0x7f121887; // 2131892359
|
||||
public static final int whitelisted_ad_groups_stories_title = 0x7f121888; // 2131892360
|
||||
public static final int writebar_ios_title = 0x7f121889; // 2131892361
|
||||
public static final int compression_types = 0x7f12184d; // 2131892301
|
||||
public static final int compression_types_selection = 0x7f12184e; // 2131892302
|
||||
public static final int copydebuginfo_summ = 0x7f12184f; // 2131892303
|
||||
public static final int copydebuginfo_title = 0x7f121850; // 2131892304
|
||||
public static final int copyownlink_summ = 0x7f121851; // 2131892305
|
||||
public static final int copyownlink_title = 0x7f121852; // 2131892306
|
||||
public static final int crash_service_name = 0x7f121853; // 2131892307
|
||||
public static final int currentLanguage = 0x7f121854; // 2131892308
|
||||
public static final int current_theme = 0x7f121855; // 2131892309
|
||||
public static final int custom_links_warning = 0x7f121856; // 2131892310
|
||||
public static final int data = 0x7f121857; // 2131892311
|
||||
public static final int data_updated = 0x7f121858; // 2131892312
|
||||
public static final int datasettings_title = 0x7f121859; // 2131892313
|
||||
public static final int device_info = 0x7f12185a; // 2131892314
|
||||
public static final int device_info_copied = 0x7f12185b; // 2131892315
|
||||
public static final int dialogstats = 0x7f12185c; // 2131892316
|
||||
public static final int disable_analytics = 0x7f12185d; // 2131892317
|
||||
public static final int disable_analytics_summ = 0x7f12185e; // 2131892318
|
||||
public static final int downloading_update = 0x7f12185f; // 2131892319
|
||||
public static final int error_applying_accent = 0x7f121860; // 2131892320
|
||||
public static final int error_no_text = 0x7f121861; // 2131892321
|
||||
public static final int error_saving_file = 0x7f121862; // 2131892322
|
||||
public static final int failed_to_get_text = 0x7f121863; // 2131892323
|
||||
public static final int invalid_pack_link = 0x7f121864; // 2131892324
|
||||
public static final int invalidate_theme_cache_title = 0x7f121865; // 2131892325
|
||||
public static final int logColors_title = 0x7f121866; // 2131892326
|
||||
public static final int maxquality_summ = 0x7f121867; // 2131892327
|
||||
public static final int maxquality_title = 0x7f121868; // 2131892328
|
||||
public static final int microgsett = 0x7f121869; // 2131892329
|
||||
public static final int monettheme_summ = 0x7f12186a; // 2131892330
|
||||
public static final int monettheme_title = 0x7f12186b; // 2131892331
|
||||
public static final int newsfeed_notif_summ = 0x7f12186c; // 2131892332
|
||||
public static final int newsfeed_notif_title = 0x7f12186d; // 2131892333
|
||||
public static final int open_bot = 0x7f12186e; // 2131892334
|
||||
public static final int promotedstickers_title = 0x7f12186f; // 2131892335
|
||||
public static final int remove_encryption_key = 0x7f121870; // 2131892336
|
||||
public static final int remove_from_ads_stories_whitelist = 0x7f121871; // 2131892337
|
||||
public static final int reset_accounts = 0x7f121872; // 2131892338
|
||||
public static final int reset_all_settings = 0x7f121873; // 2131892339
|
||||
public static final int restore_accounts = 0x7f121874; // 2131892340
|
||||
public static final int restore_settings = 0x7f121875; // 2131892341
|
||||
public static final int save_accounts = 0x7f121876; // 2131892342
|
||||
public static final int save_online_data = 0x7f121877; // 2131892343
|
||||
public static final int select_color = 0x7f121878; // 2131892344
|
||||
public static final int select_palette = 0x7f121879; // 2131892345
|
||||
public static final int sources = 0x7f12187a; // 2131892346
|
||||
public static final int storiesGroupsAdBlock = 0x7f12187b; // 2131892347
|
||||
public static final int storiesGroupsAdBlocksummary = 0x7f12187c; // 2131892348
|
||||
public static final int systemtheme = 0x7f12187d; // 2131892349
|
||||
public static final int systemtheme_enabled = 0x7f12187e; // 2131892350
|
||||
public static final int systemtheme_summ = 0x7f12187f; // 2131892351
|
||||
public static final int updateverifdata_summ = 0x7f121880; // 2131892352
|
||||
public static final int updateverifdata_title = 0x7f121881; // 2131892353
|
||||
public static final int useCustomPrefsStyle_summ = 0x7f121882; // 2131892354
|
||||
public static final int useCustomPrefsStyle_title = 0x7f121883; // 2131892355
|
||||
public static final int useGenius_summ = 0x7f121884; // 2131892356
|
||||
public static final int useGenius_title = 0x7f121885; // 2131892357
|
||||
public static final int useNewColorEngine_summ = 0x7f121886; // 2131892358
|
||||
public static final int useNewColorEngine_title = 0x7f121887; // 2131892359
|
||||
public static final int useOldAppVer_summ = 0x7f121888; // 2131892360
|
||||
public static final int useOldAppVer_title = 0x7f121889; // 2131892361
|
||||
public static final int vkx_integration_enabled_info = 0x7f12188a; // 2131892362
|
||||
public static final int whitelisted_ad_groups_stories_title = 0x7f12188b; // 2131892363
|
||||
public static final int writebar_ios_title = 0x7f12188c; // 2131892364
|
||||
}
|
||||
|
||||
public static final class style {
|
||||
|
||||
@@ -91,6 +91,7 @@ public class NewsfeedHook {
|
||||
public static boolean isPowerSaveMode() {
|
||||
var pw = (PowerManager) getGlobalContext().getSystemService(Context.POWER_SERVICE);
|
||||
|
||||
return !getBoolValue("force_disable_psm", false) && pw.isPowerSaveMode();
|
||||
// return !getBoolValue("force_disable_psm", false) && pw.isPowerSaveMode();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,16 +7,14 @@ import android.content.ClipboardManager;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.widget.Toast;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.core.content.FileProvider;
|
||||
import com.vk.core.dialogs.actionspopup.ActionsPopup;
|
||||
import com.vk.core.dialogs.alert.VkAlertDialog;
|
||||
import com.vk.core.ui.themes.VKThemeHelper;
|
||||
import com.vk.core.util.ContextExtKt;
|
||||
import com.vk.core.util.ToastUtils;
|
||||
import com.vk.dto.common.AttachmentWithMedia;
|
||||
import com.vk.dto.common.ImageSize;
|
||||
@@ -24,318 +22,155 @@ import com.vtosters.lite.R;
|
||||
import com.vtosters.lite.attachments.DocumentAttachment;
|
||||
import com.vtosters.lite.attachments.PhotoAttachment;
|
||||
import okhttp3.*;
|
||||
import okio.BufferedSink;
|
||||
import okio.Okio;
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
import ru.vtosters.hooks.other.Preferences;
|
||||
import ru.vtosters.lite.di.singleton.VtOkHttpClient;
|
||||
import ru.vtosters.lite.themes.utils.RecolorUtils;
|
||||
import ru.vtosters.lite.utils.AndroidUtils;
|
||||
import ru.vtosters.lite.utils.LifecycleUtils;
|
||||
import ru.vtosters.lite.utils.SearchEngine;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.List;
|
||||
|
||||
public class PhotoViewer {
|
||||
static OkHttpClient client = VtOkHttpClient.getInstance();
|
||||
|
||||
//region INSERTION INTO SMALI
|
||||
@SuppressLint("UseCompatLoadingForDrawables")
|
||||
public static void addMenuItems(AttachmentWithMedia attachment, ActionsPopup.b actionPopup, int i, boolean z) {
|
||||
actionPopup.a(
|
||||
R.string.copy,
|
||||
RecolorUtils.fixActionMenuIcons(R.drawable.ic_copy_outline_28),
|
||||
false,
|
||||
() -> {
|
||||
copyImage(attachment);
|
||||
return null;
|
||||
}
|
||||
).a(
|
||||
R.string.search_photo_content,
|
||||
RecolorUtils.fixActionMenuIcons(R.drawable.ic_menu_search_outline_28),
|
||||
false,
|
||||
() -> {
|
||||
searchImageWithUrl(attachment);
|
||||
return null;
|
||||
}
|
||||
).a(
|
||||
R.string.copy_photo_url_content,
|
||||
RecolorUtils.fixActionMenuIcons(R.drawable.ic_copy_outline_28),
|
||||
false,
|
||||
() -> {
|
||||
copyImageUrl(attachment);
|
||||
return null;
|
||||
}
|
||||
).a(
|
||||
R.string.open_original_photo_content,
|
||||
RecolorUtils.fixActionMenuIcons(R.drawable.ic_link_outline_28),
|
||||
false,
|
||||
() -> {
|
||||
openUrl(getImageUrlFromAttachment(attachment));
|
||||
return null;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
@SuppressLint("NonConstantResourceId")
|
||||
public static boolean interceptClick(AttachmentWithMedia attachment, MenuItem item, View view) {
|
||||
switch (item.getItemId()) {
|
||||
case R.id.copy_image -> {
|
||||
if (attachment instanceof PhotoAttachment) {
|
||||
copyImage(getUrlFromPhotoAttachment((PhotoAttachment) attachment), String.valueOf(attachment.getId()));
|
||||
} else if (attachment instanceof DocumentAttachment) {
|
||||
var documentAttachment = (DocumentAttachment) attachment;
|
||||
if (documentAttachment.J != null)
|
||||
try {
|
||||
copyImage(getUrlFromDocumentAttachment(documentAttachment), String.valueOf(attachment.getId()));
|
||||
} catch (Exception e) {
|
||||
ToastUtils.a(R.string.photo_get_error);
|
||||
}
|
||||
else
|
||||
ToastUtils.a(R.string.photo_get_error);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
case R.id.copy_photo_url -> {
|
||||
if (attachment instanceof PhotoAttachment) {
|
||||
copyPhotoUrl(getUrlFromPhotoAttachment((PhotoAttachment) attachment));
|
||||
} else if (attachment instanceof DocumentAttachment) {
|
||||
var documentAttachment = (DocumentAttachment) attachment;
|
||||
if (documentAttachment.J != null)
|
||||
try {
|
||||
copyPhotoUrl(getUrlFromDocumentAttachment(documentAttachment));
|
||||
} catch (Exception e) {
|
||||
ToastUtils.a(R.string.photo_get_error);
|
||||
}
|
||||
else
|
||||
ToastUtils.a(R.string.photo_get_error);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
case R.id.open_original_photo -> {
|
||||
if (attachment instanceof PhotoAttachment) {
|
||||
openUrl(getUrlFromPhotoAttachment((PhotoAttachment) attachment));
|
||||
} else if (attachment instanceof DocumentAttachment) {
|
||||
var documentAttachment = (DocumentAttachment) attachment;
|
||||
if (documentAttachment.J != null)
|
||||
try {
|
||||
openUrl(getUrlFromDocumentAttachment(documentAttachment));
|
||||
} catch (Exception e) {
|
||||
ToastUtils.a(R.string.photo_get_error);
|
||||
}
|
||||
else
|
||||
ToastUtils.a(R.string.photo_get_error);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
case R.id.copy_image -> copyImage(attachment);
|
||||
case R.id.search_photo -> searchImageWithUrl(attachment);
|
||||
case R.id.copy_photo_url -> copyImageUrl(attachment);
|
||||
case R.id.open_original_photo -> openUrl(getImageUrlFromAttachment(attachment));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
//endregion
|
||||
|
||||
@SuppressLint("UseCompatLoadingForDrawables")
|
||||
public static void addMenuItems(AttachmentWithMedia attachment, ActionsPopup.b actionPopup, int i, boolean z) {
|
||||
actionPopup.a(R.string.copy,
|
||||
ContextExtKt.b(AndroidUtils.getGlobalContext(), R.drawable.ic_copy_outline_28, VKThemeHelper.g(R.attr.header_tint)),
|
||||
false,
|
||||
() -> {
|
||||
if (attachment instanceof PhotoAttachment) {
|
||||
copyImage(getUrlFromPhotoAttachment((PhotoAttachment) attachment), String.valueOf(attachment.getId()));
|
||||
} else if (attachment instanceof DocumentAttachment) {
|
||||
var documentAttachment = (DocumentAttachment) attachment;
|
||||
if (documentAttachment.J != null)
|
||||
try {
|
||||
copyImage(getUrlFromDocumentAttachment(documentAttachment), String.valueOf(attachment.getId()));
|
||||
} catch (Exception e) {
|
||||
ToastUtils.a(R.string.photo_get_error);
|
||||
}
|
||||
else
|
||||
ToastUtils.a(R.string.photo_get_error);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
);
|
||||
actionPopup.a(R.string.search_photo_content,
|
||||
ContextExtKt.b(AndroidUtils.getGlobalContext(), R.drawable.ic_menu_search_outline_28, VKThemeHelper.g(R.attr.header_tint)),
|
||||
false,
|
||||
() -> {
|
||||
if (attachment instanceof PhotoAttachment) {
|
||||
searchDialog(LifecycleUtils.getCurrentActivity(), getUrlFromPhotoAttachment((PhotoAttachment) attachment));
|
||||
} else if (attachment instanceof DocumentAttachment) {
|
||||
var documentAttachment = (DocumentAttachment) attachment;
|
||||
if (documentAttachment.J != null)
|
||||
try {
|
||||
searchDialog(LifecycleUtils.getCurrentActivity(), getUrlFromDocumentAttachment(documentAttachment));
|
||||
} catch (Exception e) {
|
||||
ToastUtils.a(R.string.photo_get_error);
|
||||
}
|
||||
else
|
||||
ToastUtils.a(R.string.photo_get_error);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
);
|
||||
actionPopup.a(R.string.copy_photo_url_content,
|
||||
ContextExtKt.b(AndroidUtils.getGlobalContext(), R.drawable.ic_copy_outline_28, VKThemeHelper.g(R.attr.header_tint)),
|
||||
false,
|
||||
() -> {
|
||||
if (attachment instanceof PhotoAttachment) {
|
||||
copyPhotoUrl(getUrlFromPhotoAttachment((PhotoAttachment) attachment));
|
||||
} else if (attachment instanceof DocumentAttachment) {
|
||||
var documentAttachment = (DocumentAttachment) attachment;
|
||||
if (documentAttachment.J != null)
|
||||
try {
|
||||
copyPhotoUrl(getUrlFromDocumentAttachment(documentAttachment));
|
||||
} catch (Exception e) {
|
||||
ToastUtils.a(R.string.photo_get_error);
|
||||
}
|
||||
else
|
||||
ToastUtils.a(R.string.photo_get_error);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
);
|
||||
actionPopup.a(R.string.open_original_photo_content,
|
||||
ContextExtKt.b(AndroidUtils.getGlobalContext(), R.drawable.ic_link_outline_28, VKThemeHelper.g(R.attr.header_tint)),
|
||||
false,
|
||||
() -> {
|
||||
if (attachment instanceof PhotoAttachment) {
|
||||
openUrl(getUrlFromPhotoAttachment((PhotoAttachment) attachment));
|
||||
} else if (attachment instanceof DocumentAttachment) {
|
||||
var documentAttachment = (DocumentAttachment) attachment;
|
||||
if (documentAttachment.J != null)
|
||||
try {
|
||||
openUrl(getUrlFromDocumentAttachment(documentAttachment));
|
||||
} catch (Exception e) {
|
||||
ToastUtils.a(R.string.photo_get_error);
|
||||
}
|
||||
else
|
||||
ToastUtils.a(R.string.photo_get_error);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
private static String getUrlFromDocumentAttachment(DocumentAttachment attachment) {
|
||||
List<ImageSize> imageSizes = null;
|
||||
if (attachment.J != null) {
|
||||
imageSizes = attachment.J.t1();
|
||||
}
|
||||
return getUrlFromImageSizeList(imageSizes);
|
||||
}
|
||||
|
||||
private static String getUrlFromPhotoAttachment(PhotoAttachment attachment) {
|
||||
var imageSizes = attachment.D.Q.t1();
|
||||
return getUrlFromImageSizeList(imageSizes);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
private static String getUrlFromImageSizeList(List<ImageSize> imageSizes) {
|
||||
if (imageSizes.isEmpty())
|
||||
return null;
|
||||
var max = imageSizes.get(0);
|
||||
for (int i = 1; i < imageSizes.size(); ++i) {
|
||||
var size = imageSizes.get(i);
|
||||
if (max != null && max.t1() < size.t1()) {
|
||||
max = size;
|
||||
}
|
||||
}
|
||||
return max.url;
|
||||
}
|
||||
|
||||
private static void searchDialog(Context context, String url) {
|
||||
if (selectedEngine() == 0) {
|
||||
var items = new String[]{
|
||||
"Yandex", "Google", "Bing", "TraceMoe", "Ascii2d", "Saucenao"
|
||||
};
|
||||
|
||||
new VkAlertDialog.Builder(context)
|
||||
.setItems(items, (dl, i) -> {
|
||||
searchPhoto(i + 1, url);
|
||||
})
|
||||
.show();
|
||||
} else {
|
||||
searchPhoto(selectedEngine(), url);
|
||||
}
|
||||
}
|
||||
|
||||
private static void copyImage(String link, String name) {
|
||||
Request request = new Request.a().b(link).a();
|
||||
File file = new File(AndroidUtils.getGlobalContext().getExternalCacheDir(), name + ".jpg");
|
||||
|
||||
if (file.exists()) {
|
||||
copyImageToClipboard(file);
|
||||
return;
|
||||
}
|
||||
|
||||
new Thread() {
|
||||
@Override
|
||||
public void run() {
|
||||
try (Response response = client.a(request).execute()) {
|
||||
try (BufferedSink sink = Okio.a(Okio.b(file))) {
|
||||
sink.a(response.a().f());
|
||||
}
|
||||
|
||||
copyImageToClipboard(file);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}.start();
|
||||
}
|
||||
|
||||
private static void copyImageToClipboard(File file) {
|
||||
Uri path = FileProvider.getUriForFile(AndroidUtils.getGlobalContext(), "com.vtosters.lite.common.VKFileProvider", file);
|
||||
ClipData clip = ClipData.newUri(AndroidUtils.getGlobalContext().getContentResolver(), "Image", path);
|
||||
((ClipboardManager) AndroidUtils.getGlobalContext().getSystemService(Context.CLIPBOARD_SERVICE)).setPrimaryClip(clip);
|
||||
}
|
||||
|
||||
private static int selectedEngine() {
|
||||
return Preferences.getPreferences().getInt("search_engine", 0);
|
||||
}
|
||||
|
||||
private static void searchPhoto(int i, String url) {
|
||||
if (url == null || url.isEmpty()) {
|
||||
Log.d("PhotoViewer", "url is null or empty");
|
||||
return;
|
||||
}
|
||||
|
||||
switch (i) {
|
||||
case 1 -> searchWithYandex(url);
|
||||
case 2 -> searchWithGoogle(url);
|
||||
case 3 -> searchWithBing(url);
|
||||
case 4 -> searchWithTraceMoe(url);
|
||||
case 5 -> searchWithAscii2d(url);
|
||||
case 6 -> searchWithSaucenao(url);
|
||||
}
|
||||
}
|
||||
|
||||
private static void searchPhoto(String url) {
|
||||
searchPhoto(selectedEngine(), url);
|
||||
}
|
||||
|
||||
private static void searchWithYandex(String url) {
|
||||
var request = new Request.a()
|
||||
.b(String.format("https://yandex.ru/images-apphost/image-download?url=%s&images_avatars_size=preview&images_avatars_namespace=images-cbir",
|
||||
URLEncoder.encode(url)))
|
||||
private static void copyImage(AttachmentWithMedia attachment) {
|
||||
var req = new Request.a()
|
||||
.b(getImageUrlFromAttachment(attachment))
|
||||
.a();
|
||||
client.a(request).a(new Callback() {
|
||||
client.a(req).a(new Callback() {
|
||||
@Override
|
||||
public void a(Call call, IOException e) {
|
||||
Log.d("PhotoViewer", e.getMessage());
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void a(Call call, Response response) throws IOException {
|
||||
try {
|
||||
JSONObject payload = new JSONObject(response.a().g());
|
||||
var cbirId = payload.optInt("image_shard") + "/" + payload.optString("image_id");
|
||||
var imageUrl = String.format("https://avatars.mds.yandex.net/get-images-cbir/%s/orig", cbirId);
|
||||
var searchUrl = String.format("https://yandex.ru/images/search?rpt=imageview&url=%s&cbir_id=%s", imageUrl, cbirId);
|
||||
openUrl(searchUrl);
|
||||
} catch (JSONException e) {
|
||||
e.printStackTrace();
|
||||
public void a(Call call, Response response)
|
||||
throws IOException {
|
||||
var tmpImage = new File(AndroidUtils.getGlobalContext().getExternalCacheDir(), attachment.getId() + ".jpg");
|
||||
try (var resp = client.a(req).execute();
|
||||
var sink = Okio.a(Okio.b(tmpImage))) {
|
||||
sink.a(resp.a().f());
|
||||
var manager = (ClipboardManager) AndroidUtils.getGlobalContext().getSystemService(Context.CLIPBOARD_SERVICE);
|
||||
var uri = FileProvider.getUriForFile(
|
||||
AndroidUtils.getGlobalContext(),
|
||||
"com.vtosters.lite.common.VKFileProvider",
|
||||
tmpImage);
|
||||
var data = ClipData.newUri(
|
||||
AndroidUtils.getGlobalContext().getContentResolver(),
|
||||
"image",
|
||||
uri);
|
||||
manager.setPrimaryClip(data);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private static void searchWithGoogle(String url) {
|
||||
openUrl("https://www.google.com/searchbyimage?image_url=" + URLEncoder.encode(url) + "&client=app");
|
||||
private static void searchImageWithUrl(AttachmentWithMedia attachment) {
|
||||
String url = getImageUrlFromAttachment(attachment);
|
||||
if (TextUtils.isEmpty(url)) return;
|
||||
int selectedEngine = SearchEngine.getDefaultSearchEngine();
|
||||
if (selectedEngine < 0) {
|
||||
var items = new String[SearchEngine.values().length];
|
||||
for (int i = 0; i < SearchEngine.values().length; ++i)
|
||||
items[i] = SearchEngine.values()[i].mTitle;
|
||||
new VkAlertDialog.Builder(LifecycleUtils.getCurrentActivity())
|
||||
.setItems(items, (di, i) -> openUrl(SearchEngine.values()[i].buildSearchUrl(url)))
|
||||
.show();
|
||||
} else {
|
||||
openUrl(SearchEngine.values()[selectedEngine].buildSearchUrl(url));
|
||||
}
|
||||
}
|
||||
|
||||
private static void searchWithTraceMoe(String url) {
|
||||
openUrl("https://trace.moe/?url=" + URLEncoder.encode(url));
|
||||
}
|
||||
|
||||
private static void searchWithAscii2d(String url) {
|
||||
openUrl("https://ascii2d.net/search/url/" + URLEncoder.encode(url));
|
||||
}
|
||||
|
||||
private static void searchWithSaucenao(String url) {
|
||||
openUrl("https://saucenao.com/search.php?url=" + URLEncoder.encode(url));
|
||||
}
|
||||
|
||||
private static void searchWithBing(String url) {
|
||||
openUrl("https://www.bing.com/images/search?view=detailv2&iss=SBI&form=SBIIDP&sbisrc=UrlPaste&q=imgurl:"
|
||||
+ URLEncoder.encode(url));
|
||||
}
|
||||
|
||||
private static void copyPhotoUrl(String url) {
|
||||
if (url == null || url.isEmpty()) return;
|
||||
private static void copyImageUrl(AttachmentWithMedia attachment) {
|
||||
String url = getImageUrlFromAttachment(attachment);
|
||||
if (TextUtils.isEmpty(url)) return;
|
||||
ClipboardManager manager = (ClipboardManager) AndroidUtils.getGlobalContext().getSystemService(Context.CLIPBOARD_SERVICE);
|
||||
manager.setPrimaryClip(ClipData.newPlainText("vk_photo_url", url));
|
||||
Toast.makeText(AndroidUtils.getGlobalContext(), R.string.copied_to_clipboard, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
private static void openUrl(String url) {
|
||||
var uri = Uri.parse(url);
|
||||
var intent = new Intent(Intent.ACTION_VIEW, uri);
|
||||
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
if (TextUtils.isEmpty(url)) {
|
||||
Log.d("PhotoViewer", "url is null or empty");
|
||||
return;
|
||||
}
|
||||
var intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url))
|
||||
.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
AndroidUtils.getGlobalContext().startActivity(intent);
|
||||
}
|
||||
|
||||
private static String getImageUrlFromAttachment(AttachmentWithMedia attachment) {
|
||||
List<ImageSize> imageSizes;
|
||||
|
||||
if (attachment instanceof PhotoAttachment) {
|
||||
imageSizes = ((PhotoAttachment) attachment).D.Q.t1();
|
||||
} else if (attachment instanceof DocumentAttachment && ((DocumentAttachment) attachment).J != null) {
|
||||
imageSizes = ((DocumentAttachment) attachment).J.t1();
|
||||
} else {
|
||||
ToastUtils.a(R.string.photo_get_error);
|
||||
return "";
|
||||
}
|
||||
|
||||
if (imageSizes.isEmpty()) return "";
|
||||
|
||||
var max = imageSizes.get(0);
|
||||
for (int i = 1; i < imageSizes.size(); i++) {
|
||||
var tmp = imageSizes.get(i);
|
||||
if (max.t1() < tmp.t1()) max = tmp;
|
||||
}
|
||||
return max.url;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,25 +7,25 @@ import ru.vtosters.lite.utils.RenameTool;
|
||||
|
||||
public class RenameHook {
|
||||
public static void injectIntoJson(JSONObject obj) throws JSONException {
|
||||
int i = obj.getInt("id");
|
||||
if (RenameTool.updateRequested) {
|
||||
RenameTool.reloadDB();
|
||||
}
|
||||
|
||||
Pair<String, String> user = RenameTool.renamedUsers.get(i);
|
||||
if (user == null) return;
|
||||
obj.put(RenameTool.COLUMN_FIRSTNAME, user.first).put(RenameTool.COLUMN_LASTNAME, user.second);
|
||||
// int i = obj.getInt("id");
|
||||
// if (RenameTool.updateRequested) {
|
||||
// RenameTool.reloadDB();
|
||||
// }
|
||||
//
|
||||
// Pair<String, String> user = RenameTool.renamedUsers.get(i);
|
||||
// if (user == null) return;
|
||||
// obj.put(RenameTool.COLUMN_FIRSTNAME, user.first).put(RenameTool.COLUMN_LASTNAME, user.second);
|
||||
}
|
||||
|
||||
public static void injectIntoJsonGroup(JSONObject obj) throws JSONException {
|
||||
int i = obj.getInt("id");
|
||||
|
||||
if (RenameTool.updateRequested) {
|
||||
RenameTool.reloadDB();
|
||||
}
|
||||
|
||||
String user = RenameTool.renamedGroups.get(i);
|
||||
if (user == null) return;
|
||||
obj.put("name", user);
|
||||
// int i = obj.getInt("id");
|
||||
//
|
||||
// if (RenameTool.updateRequested) {
|
||||
// RenameTool.reloadDB();
|
||||
// }
|
||||
//
|
||||
// String user = RenameTool.renamedGroups.get(i);
|
||||
// if (user == null) return;
|
||||
// obj.put("name", user);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import android.content.pm.PackageManager;
|
||||
import android.os.Build;
|
||||
import android.os.StrictMode;
|
||||
import com.vk.medianative.MediaImageEncoder;
|
||||
import com.vk.medianative.MediaNative;
|
||||
import com.vtosters.lite.data.Users;
|
||||
import com.vtosters.lite.fragments.SettingsListFragment;
|
||||
import ru.vtosters.hooks.GmsHook;
|
||||
@@ -22,7 +23,9 @@ public class Preferences {
|
||||
|
||||
public static void init(Application application) throws Exception {
|
||||
StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
|
||||
StrictMode.setThreadPolicy(policy);
|
||||
StrictMode.setThreadPolicy(policy); // fix profiles hide hook
|
||||
|
||||
MediaNative.init(application);
|
||||
|
||||
GmsHook.fixGapps();
|
||||
ProxyUtils.setProxy();
|
||||
@@ -163,7 +166,7 @@ public class Preferences {
|
||||
}
|
||||
|
||||
public static boolean superapp() {
|
||||
return getBoolValue("superapp", true);
|
||||
return getBoolValue("superapp", true) && milkshake();
|
||||
}
|
||||
|
||||
public static boolean vkpay() {
|
||||
|
||||
@@ -9,8 +9,8 @@ import ru.vtosters.lite.utils.AndroidUtils;
|
||||
import ru.vtosters.lite.utils.LifecycleUtils;
|
||||
|
||||
public class BannerHook {
|
||||
public static JSONObject convBar(JSONObject orig) throws JSONException {
|
||||
return ImBanner.convBar(orig);
|
||||
public static JSONObject convBar(JSONObject orig) {
|
||||
return ImBanner.convertToBanner(orig);
|
||||
}
|
||||
|
||||
public static boolean showAlert() {
|
||||
|
||||
@@ -8,6 +8,7 @@ import com.vk.im.engine.utils.ImDialogsUtils;
|
||||
import okhttp3.Headers;
|
||||
import okhttp3.OkHttpClient;
|
||||
import ru.vtosters.hooks.other.ThemesUtils;
|
||||
import ru.vtosters.lite.concurrent.VTExecutors;
|
||||
import ru.vtosters.lite.net.Request;
|
||||
import ru.vtosters.lite.proxy.ProxyUtils;
|
||||
import ru.vtosters.lite.utils.AccountManagerUtils;
|
||||
@@ -43,7 +44,7 @@ public class Requests {
|
||||
}
|
||||
|
||||
public static void pinnedMsg(int dialogid, boolean needToBePinned) {
|
||||
Thread thread = new Thread(() -> {
|
||||
VTExecutors.getIoExecutor().execute(() -> {
|
||||
try {
|
||||
var request = new okhttp3.Request.a()
|
||||
.b("https://" + ProxyUtils.getApi() + "/method/" + (needToBePinned ? "messages.pinConversation" : "messages.unpinConversation") + "?peer_id=" + dialogid + "&access_token=" + AccountManagerUtils.getUserToken() + "&v=5.119")
|
||||
@@ -56,8 +57,6 @@ public class Requests {
|
||||
}
|
||||
});
|
||||
|
||||
thread.start();
|
||||
|
||||
AndroidUtils.sendToast(AndroidUtils.getString(com.vtosters.lite.R.string.pin_dialog) + " " + AndroidUtils.getString(needToBePinned ? com.vtosters.lite.R.string.dialog_pinned : com.vtosters.lite.R.string.dialog_unpinned));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,46 +5,63 @@ import org.json.JSONArray;
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
public class ImBanner {
|
||||
private static final String TAG = "ImBanner";
|
||||
|
||||
public static JSONObject convBar(JSONObject orig) throws JSONException {
|
||||
var user_id = orig.getJSONObject("peer").getInt("id");
|
||||
public static JSONObject convertToBanner(JSONObject original) {
|
||||
final String PEER = "peer";
|
||||
final String ID = "id";
|
||||
final String PICTURE = "picture";
|
||||
final String TEXT = "text";
|
||||
final String LINK = "link";
|
||||
final String LINK_TEXT = "link_text";
|
||||
final String NAME = "name";
|
||||
final String BUTTONS = "buttons";
|
||||
final String ICON = "icon";
|
||||
|
||||
if (!UsersList.hasBanner(user_id) || user_id == 0) {
|
||||
Optional<JSONObject> user = Optional.ofNullable(original.optJSONObject(PEER));
|
||||
int userId = user.map(u -> u.optInt(ID)).orElse(0);
|
||||
|
||||
if (userId == 0 || !UsersList.hasBanner(userId)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
JSONObject banner = Handler.getBanner(userId);
|
||||
|
||||
if (banner == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
try {
|
||||
var jsonBanner = Handler.getBanner(user_id);
|
||||
var pic = jsonBanner.optString("picture");
|
||||
var text = jsonBanner.getString("text");
|
||||
String picture = banner.optString(PICTURE);
|
||||
String text = banner.getString(TEXT);
|
||||
String link = banner.optString(LINK);
|
||||
String linkText = banner.optString(LINK_TEXT);
|
||||
|
||||
var link = jsonBanner.optString("link");
|
||||
var link_text = jsonBanner.optString("link_text");
|
||||
boolean hasIcon = !picture.isEmpty();
|
||||
boolean hasButton = !link.isEmpty();
|
||||
boolean isPicture = picture.endsWith(".png") || picture.endsWith(".jpg") || picture.endsWith(".jpeg") || picture.endsWith(".webp");
|
||||
|
||||
var hasIcon = !pic.isEmpty();
|
||||
var hasButton = !link.isEmpty();
|
||||
var isPicture = pic.endsWith(".png") || pic.endsWith(".jpg") || pic.endsWith(".jpeg") || pic.endsWith(".webp");
|
||||
JSONObject json = new JSONObject();
|
||||
|
||||
var json = new JSONObject();
|
||||
JSONObject buttonJson = new JSONObject();
|
||||
buttonJson.put("layout", "tertiary");
|
||||
buttonJson.put("text", linkText);
|
||||
buttonJson.put("type", "link");
|
||||
buttonJson.put("link", link);
|
||||
|
||||
var buttonsJson = new JSONObject();
|
||||
buttonsJson.put("layout", "tertiary");
|
||||
buttonsJson.put("text", link_text);
|
||||
buttonsJson.put("type", "link");
|
||||
buttonsJson.put("link", link);
|
||||
JSONArray buttons = new JSONArray(); // max 3 buttons in array
|
||||
|
||||
var buttons = new JSONArray(); // max 3 buttons in array
|
||||
if (hasButton) buttons.put(buttonJson);
|
||||
|
||||
if (hasButton) buttons.put(buttonsJson);
|
||||
|
||||
json.put("name", "group_admin_welcome");
|
||||
json.put("text", text);
|
||||
json.put("buttons", buttons);
|
||||
json.put(NAME, "group_admin_welcome");
|
||||
json.put(TEXT, text);
|
||||
json.put(BUTTONS, buttons);
|
||||
|
||||
if (hasIcon && isPicture) {
|
||||
json.put("icon", pic);
|
||||
json.put(ICON, picture);
|
||||
}
|
||||
|
||||
return json;
|
||||
|
||||
@@ -34,7 +34,9 @@ public class InterfaceFragment extends TrackedMaterialPreferenceToolbarFragment
|
||||
|
||||
return true;
|
||||
});
|
||||
findPreference("superapp").setOnPreferenceClickListener(preference -> {
|
||||
var superapp = findPreference("superapp");
|
||||
superapp.setVisible(Preferences.milkshake());
|
||||
superapp.setOnPreferenceClickListener(preference -> {
|
||||
LifecycleUtils.restartApplicationWithTimer();
|
||||
|
||||
return true;
|
||||
@@ -70,6 +72,8 @@ public class InterfaceFragment extends TrackedMaterialPreferenceToolbarFragment
|
||||
return true;
|
||||
});
|
||||
|
||||
findPreference("friendsblock").setVisible(Preferences.milkshake());
|
||||
|
||||
if (Preferences.getPreferences().getInt("pic_rounding", 0) == 0) {
|
||||
findPreference("customrounding").setSummary(requireContext().getString(R.string.disabled));
|
||||
} else {
|
||||
|
||||
@@ -17,9 +17,11 @@ import com.vtosters.lite.R;
|
||||
import okhttp3.Headers;
|
||||
import okhttp3.OkHttpClient;
|
||||
import okhttp3.Request;
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
import ru.vtosters.hooks.other.Preferences;
|
||||
import ru.vtosters.hooks.other.ThemesUtils;
|
||||
import ru.vtosters.lite.concurrent.VTExecutors;
|
||||
import ru.vtosters.lite.downloaders.AudioDownloader;
|
||||
import ru.vtosters.lite.downloaders.VideoDownloader;
|
||||
import ru.vtosters.lite.music.LastFMScrobbler;
|
||||
@@ -29,6 +31,7 @@ import ru.vtosters.lite.ui.adapters.ImagineArrayAdapter;
|
||||
import ru.vtosters.lite.utils.AccountManagerUtils;
|
||||
import ru.vtosters.lite.utils.AndroidUtils;
|
||||
import ru.vtosters.lite.utils.LifecycleUtils;
|
||||
import ru.vtosters.lite.utils.SearchEngine;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
@@ -133,26 +136,26 @@ public class MediaFragment extends TrackedMaterialPreferenceToolbarFragment {
|
||||
});
|
||||
|
||||
findPreference("select_photo_search_engine").setOnPreferenceClickListener(preference -> {
|
||||
var deficon = ThemesUtils.recolorDrawable(AndroidUtils.getResources().getDrawable(R.drawable.ic_picture_outline_28));
|
||||
var choiceicon = ThemesUtils.recolorDrawable(AndroidUtils.getResources().getDrawable(R.drawable.link_outline_28));
|
||||
var items = new ImagineArrayAdapter.ImagineArrayAdapterItem[SearchEngine.values().length + 1];
|
||||
items[0] = new ImagineArrayAdapter.ImagineArrayAdapterItem(
|
||||
ThemesUtils.recolorDrawable(AndroidUtils.getResources().getDrawable(R.drawable.link_outline_28)),
|
||||
AndroidUtils.getString("by_choice"));
|
||||
for (int i = 0; i < SearchEngine.values().length; ++i) {
|
||||
var engine = SearchEngine.values()[i];
|
||||
items[i + 1] = engine.mIconRes != R.drawable.ic_picture_outline_28
|
||||
? new ImagineArrayAdapter.ImagineArrayAdapterItem(engine.mIconRes, engine.mTitle)
|
||||
: new ImagineArrayAdapter.ImagineArrayAdapterItem(
|
||||
ThemesUtils.recolorDrawable(AndroidUtils.getResources().getDrawable(R.drawable.ic_picture_outline_28)),
|
||||
engine.mTitle);
|
||||
}
|
||||
|
||||
var items = Arrays.asList(
|
||||
new ImagineArrayAdapter.ImagineArrayAdapterItem(choiceicon, AndroidUtils.getString("by_choice")),
|
||||
new ImagineArrayAdapter.ImagineArrayAdapterItem(R.drawable.yandex, "Yandex"),
|
||||
new ImagineArrayAdapter.ImagineArrayAdapterItem(R.drawable.google, "Google"),
|
||||
new ImagineArrayAdapter.ImagineArrayAdapterItem(R.drawable.microsoft, "Bing"),
|
||||
new ImagineArrayAdapter.ImagineArrayAdapterItem(deficon, "TraceMoe"),
|
||||
new ImagineArrayAdapter.ImagineArrayAdapterItem(deficon, "Ascii2d"),
|
||||
new ImagineArrayAdapter.ImagineArrayAdapterItem(deficon, "Saucenao")
|
||||
);
|
||||
|
||||
var adapter = new ImagineArrayAdapter(requireContext(), items);
|
||||
adapter.setSelected(Preferences.getPreferences().getInt("search_engine", 0));
|
||||
var adapter = new ImagineArrayAdapter(requireContext(), Arrays.asList(items));
|
||||
adapter.setSelected(SearchEngine.getDefaultSearchEngine() + 1);
|
||||
|
||||
new VkAlertDialog.Builder(getActivity())
|
||||
.setAdapter(adapter, (dialog, which) -> {
|
||||
Preferences.getPreferences().edit().putInt("search_engine", which).apply();
|
||||
dialog.cancel();
|
||||
.setAdapter(adapter, (di, i) -> {
|
||||
SearchEngine.setDefaultSearchEngine(i != 0 ? i - 1 : -1);
|
||||
di.cancel();
|
||||
})
|
||||
.show();
|
||||
return true;
|
||||
@@ -239,32 +242,26 @@ public class MediaFragment extends TrackedMaterialPreferenceToolbarFragment {
|
||||
}
|
||||
|
||||
public void deleteVideoHistory() {
|
||||
Thread thread = new Thread(() -> {
|
||||
VTExecutors.getIoExecutor().execute(() -> {
|
||||
var request = new Request.a()
|
||||
.b("https://" + ProxyUtils.getApi() + "/method/" + "video.clearViewingHistoryRecords" + "?https=1" + "&access_token=" + AccountManagerUtils.getUserToken() + "&v=5.119")
|
||||
.a(Headers.a("User-Agent", Network.l.c().a(), "Content-Type", "application/x-www-form-urlencoded; charset=utf-8"))
|
||||
.a();
|
||||
|
||||
try {
|
||||
var request = new Request.a()
|
||||
.b("https://" + ProxyUtils.getApi() + "/method/" + "video.clearViewingHistoryRecords" + "?https=1" + "&access_token=" + AccountManagerUtils.getUserToken() + "&v=5.119")
|
||||
.a(Headers.a("User-Agent", Network.l.c().a(), "Content-Type", "application/x-www-form-urlencoded; charset=utf-8"))
|
||||
.a();
|
||||
var response = new JSONObject(new OkHttpClient().a(request).execute().a().g());
|
||||
|
||||
try {
|
||||
var response = new JSONObject(new OkHttpClient().a(request).execute().a().g());
|
||||
|
||||
if (response.optInt("response") == 1) {
|
||||
requireActivity().runOnUiThread(() -> AndroidUtils.sendToast(requireContext().getString(R.string.video_history_cleaned)));
|
||||
} else {
|
||||
requireActivity().runOnUiThread(() -> AndroidUtils.sendToast(requireContext().getString(R.string.delete_video_history_error)));
|
||||
}
|
||||
|
||||
Log.d("VideoHistory", response.toString());
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
if (response.optInt("response") == 1) {
|
||||
requireActivity().runOnUiThread(() -> AndroidUtils.sendToast(requireContext().getString(R.string.video_history_cleaned)));
|
||||
} else {
|
||||
requireActivity().runOnUiThread(() -> AndroidUtils.sendToast(requireContext().getString(R.string.delete_video_history_error)));
|
||||
}
|
||||
|
||||
Log.d("VideoHistory", response.toString());
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
});
|
||||
|
||||
thread.start();
|
||||
});;
|
||||
}
|
||||
|
||||
private void deleteVideoHistoryDialog(Context context) {
|
||||
|
||||
@@ -33,6 +33,7 @@ import ru.vtosters.hooks.other.ThemesUtils;
|
||||
import ru.vtosters.hooks.ui.SystemThemeChangerHook;
|
||||
import ru.vtosters.lite.BuildConfig;
|
||||
import ru.vtosters.lite.concurrent.VTExecutors;
|
||||
import ru.vtosters.lite.deviceinfo.OEMDetector;
|
||||
import ru.vtosters.lite.ssfs.Utils;
|
||||
import ru.vtosters.lite.ui.PreferenceFragmentUtils;
|
||||
import ru.vtosters.lite.ui.dialogs.OTADialog;
|
||||
@@ -487,7 +488,7 @@ public class VTSettings extends TrackedMaterialPreferenceToolbarFragment impleme
|
||||
}
|
||||
);
|
||||
|
||||
if (Build.VERSION.SDK_INT >= 33) {
|
||||
if (Build.VERSION.SDK_INT >= 33 && !OEMDetector.isMIUI()) {
|
||||
PreferenceFragmentUtils.addPreference(
|
||||
getPreferenceScreen(),
|
||||
"",
|
||||
@@ -571,7 +572,7 @@ public class VTSettings extends TrackedMaterialPreferenceToolbarFragment impleme
|
||||
}
|
||||
);
|
||||
|
||||
if (Preferences.isValidSignature() && BuildConfig.BUILD_TYPE.equals("release")) {
|
||||
if (Preferences.isValidSignature() && !BuildConfig.BUILD_TYPE.equals("dev")) {
|
||||
PreferenceFragmentUtils.addPreferenceCategory(getPreferenceScreen(), requireContext().getString(R.string.updates));
|
||||
|
||||
PreferenceFragmentUtils.addPreference(
|
||||
|
||||
@@ -65,10 +65,10 @@ public class MenuBuilder {
|
||||
return Unit.a;
|
||||
});
|
||||
|
||||
addItem(builder, AndroidUtils.getString(R.string.menu_change_name), () -> {
|
||||
RenameTool.createDialog(eup, ctx);
|
||||
return Unit.a;
|
||||
});
|
||||
// addItem(builder, AndroidUtils.getString(R.string.menu_change_name), () -> {
|
||||
// RenameTool.createDialog(eup, ctx);
|
||||
// return Unit.a;
|
||||
// });
|
||||
|
||||
} catch (IllegalAccessException | InvocationTargetException e) {
|
||||
e.printStackTrace();
|
||||
@@ -88,10 +88,10 @@ public class MenuBuilder {
|
||||
return Unit.a;
|
||||
});
|
||||
|
||||
addItem(builder, AndroidUtils.getString(R.string.menu_change_name), () -> {
|
||||
RenameTool.createDialogGroup(ecp, ctx);
|
||||
return Unit.a;
|
||||
});
|
||||
// addItem(builder, AndroidUtils.getString(R.string.menu_change_name), () -> {
|
||||
// RenameTool.createDialogGroup(ecp, ctx);
|
||||
// return Unit.a;
|
||||
// });
|
||||
|
||||
addItem(builder, AndroidUtils.getString(isPageWhitelistedFilter ? R.string.remove_from_filter_whitelist : R.string.add_to_filter_whitelist), () -> {
|
||||
setWhitelistedFilter(ecp, !isPageWhitelistedFilter);
|
||||
|
||||
@@ -27,19 +27,18 @@ import static ru.vtosters.hooks.other.ThemesUtils.getTextAttr;
|
||||
import static ru.vtosters.lite.utils.AndroidUtils.*;
|
||||
|
||||
public class RenameTool {
|
||||
private static final int DB_VERSION = 2;
|
||||
|
||||
private static final String COLUMN_NAME = "name";
|
||||
public static final String COLUMN_FIRSTNAME = "first_name";
|
||||
public static final String COLUMN_LASTNAME = "last_name";
|
||||
public static final SparseArray<Pair<String, String>> renamedUsers = new SparseArray<>();
|
||||
public static final SparseArray<String> renamedGroups = new SparseArray<>();
|
||||
private static final int DB_VERSION = 2;
|
||||
private static final String COLUMN_NAME = "name";
|
||||
private static final String COLUMN_VKID = "vk_id";
|
||||
private static final String DB_NAME = "vt_rename.db";
|
||||
private static final String TABLE_NAME = "renames";
|
||||
private static final String TABLE_NAME_GROUP = "renames_group";
|
||||
public static final SparseArray<Pair<String, String>> renamedUsers = new SparseArray<>();
|
||||
public static final SparseArray<String> renamedGroups = new SparseArray<>();
|
||||
private static RenameTool.DbHelper helperInstance;
|
||||
public static boolean updateRequested = true;
|
||||
private static RenameTool.DbHelper helperInstance;
|
||||
|
||||
protected static RenameTool.DbHelper getHelper() {
|
||||
if (helperInstance == null) {
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
package ru.vtosters.lite.utils;
|
||||
|
||||
import androidx.annotation.DrawableRes;
|
||||
import com.vtosters.lite.R;
|
||||
import ru.vtosters.hooks.other.Preferences;
|
||||
|
||||
import java.net.URLEncoder;
|
||||
|
||||
public enum SearchEngine {
|
||||
YANDEX(R.drawable.yandex,
|
||||
"Yandex",
|
||||
"https://yandex.com/images/search?rpt=imageview&url="),
|
||||
GOOGLE(R.drawable.google,
|
||||
"Google",
|
||||
"https://www.google.com/searchbyimage?client=app&image_url="),
|
||||
BING(R.drawable.bing,
|
||||
"Bing",
|
||||
"https://www.bing.com/images/search?view=detailv2&iss=SBI&form=SBIIDP&sbisrc=UrlPaste&q=imgurl:"),
|
||||
TRACEMOE(R.drawable.tracemoe,
|
||||
"trace.moe",
|
||||
"https://trace.moe/?url="),
|
||||
ASCII2D(R.drawable.ic_picture_outline_28,
|
||||
"Ascii2d",
|
||||
"https://ascii2d.net/search/url/"),
|
||||
SAUCENAO(R.drawable.sauceNAO,
|
||||
"SauceNAO",
|
||||
"https://saucenao.com/search.php?url=");
|
||||
|
||||
@DrawableRes
|
||||
public final int mIconRes;
|
||||
public final String mTitle;
|
||||
private final String mBaseUrl;
|
||||
|
||||
SearchEngine(@DrawableRes int iconRes, String title, String baseUrl) {
|
||||
this.mIconRes = iconRes;
|
||||
this.mTitle = title;
|
||||
this.mBaseUrl = baseUrl;
|
||||
}
|
||||
|
||||
public static int getDefaultSearchEngine() {
|
||||
return Preferences.getPreferences().getInt("search_engine", -1);
|
||||
}
|
||||
|
||||
public static void setDefaultSearchEngine(int i) {
|
||||
Preferences.getPreferences().edit().putInt("search_engine", i).apply();
|
||||
}
|
||||
|
||||
public String buildSearchUrl(String targetUrl) {
|
||||
return this.mBaseUrl + URLEncoder.encode(targetUrl);
|
||||
}
|
||||
}
|
||||
@@ -3,10 +3,6 @@ package ru.vtosters.lite.utils;
|
||||
import android.webkit.WebView;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.Reader;
|
||||
import java.io.StringWriter;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
||||
import static ru.vtosters.hooks.other.ThemesUtils.*;
|
||||
import static ru.vtosters.lite.utils.AndroidUtils.getGlobalContext;
|
||||
@@ -16,30 +12,27 @@ public class WebViewColoringUtils {
|
||||
public static String loadedCSS = "";
|
||||
public static String loadedCSSAmoled = "";
|
||||
|
||||
private static String load(String str) {
|
||||
private static String readCSS(String str) {
|
||||
try (var is = getGlobalContext().getAssets().open(str)) {
|
||||
return IOUtils.readAllLines(is);
|
||||
return IOUtils.readAllLines(is)
|
||||
.replace("%header_background%", hex(getHeaderBackground()))
|
||||
.replace("%background_content%", hex(getBackgroundContent()))
|
||||
.replace("%header_text%", hex(getHeaderText()))
|
||||
.replace("%accent%", hex(getAccentColor()))
|
||||
.replace("%background_page%", hex(getBackgroundPage()))
|
||||
.replace("%content_tint_background%", hex(getColorFromAttr(com.vtosters.lite.R.attr.content_tint_background)))
|
||||
.replace("%button_primary_background%", hex(getColorFromAttr(com.vtosters.lite.R.attr.button_primary_background)))
|
||||
.replace("%button_outline_foreground%", hex(getColorFromAttr(com.vtosters.lite.R.attr.button_outline_foreground)))
|
||||
.replace("%button_outline_border%", hex(getColorFromAttr(com.vtosters.lite.R.attr.button_outline_border)))
|
||||
.replace("%text_primary%", hex(getTextAttr()));
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
public static void load() {
|
||||
loadedCSS = load("vt_ui_accent.css")
|
||||
.replace("%header_background%", hex(getHeaderBackground()))
|
||||
.replace("%background_content%", hex(getBackgroundContent()))
|
||||
.replace("%header_text%", hex(getHeaderText()))
|
||||
.replace("%accent%", hex(getAccentColor()))
|
||||
.replace("%background_page%", hex(getBackgroundPage()))
|
||||
.replace("%content_tint_background%", hex(getColorFromAttr(com.vtosters.lite.R.attr.content_tint_background)))
|
||||
.replace("%button_primary_background%", hex(getColorFromAttr(com.vtosters.lite.R.attr.button_primary_background)))
|
||||
.replace("%button_outline_foreground%", hex(getColorFromAttr(com.vtosters.lite.R.attr.button_outline_foreground)))
|
||||
.replace("%button_outline_border%", hex(getColorFromAttr(com.vtosters.lite.R.attr.button_outline_border)))
|
||||
.replace("%text_primary%", hex(getTextAttr()));
|
||||
|
||||
|
||||
loadedCSSAmoled = load("vt_ui_oled.css");
|
||||
loadedCSS = readCSS("vt_ui_accent.css");
|
||||
loadedCSSAmoled = readCSS("vt_ui_oled.css");
|
||||
isLoaded = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
/* vkui.css V2 by iTaysonLab */
|
||||
/* vkui coloring V2 by iTaysonLab */
|
||||
/* rewrited by vtosters team */
|
||||
/* Generic VKUI */
|
||||
/* additional fixes for various VKUI */
|
||||
.Tooltip__content {
|
||||
background-color: %accent% !important;
|
||||
}
|
||||
|
||||
.vkuibright_light, [scheme=bright_light], body[scheme=bright_light] {
|
||||
.vkuibright_light, [scheme=bright_light], body[scheme=bright_light], .vkui--vkBase--light, .vkui--vkIOS--light, .vkui--vkCom--light {
|
||||
--accent: %accent% !important;
|
||||
--vkui--color_icon_accent: %accent% !important;
|
||||
--action_sheet_action_foreground: %accent% !important;
|
||||
--attach_picker_tab_active_background: %accent% !important;
|
||||
--attach_picker_tab_active_text: %accent% !important;
|
||||
@@ -29,22 +31,33 @@
|
||||
--landing_text_title: %accent% !important;
|
||||
--landing_secondary_button_foreground: %accent% !important;
|
||||
--link_alternate: %accent% !important;
|
||||
--vkui--color_text_link_themed: %accent% !important;
|
||||
--loader_track_value_fill: %accent% !important;
|
||||
--vkui--color_track_buffer: %accent% !important;
|
||||
--feed_recommended_friend_promo_background: %accent% !important;
|
||||
--tabbar_active_icon: %accent% !important;
|
||||
--tabbar_tablet_active_icon: %accent% !important;
|
||||
--text_link: %accent% !important;
|
||||
--text_name: %accent% !important;
|
||||
--vkui--color_text_link: %accent% !important;
|
||||
--vkui--color_text_name: %accent% !important;
|
||||
--writebar_icon: %accent% !important;
|
||||
--vkui--color_write_bar_icon: %accent% !important;
|
||||
--dynamic_blue: %accent% !important;
|
||||
/* backgrounds */
|
||||
--background_content: %background_content% !important;
|
||||
--vkui--color_background_content: %background_content% !important;
|
||||
--background_page: %background_page% !important;
|
||||
--vkui--color_background: %background_page% !important;
|
||||
--content_tint_background: %content_tint_background% !important;
|
||||
--vkui--color_background_secondary: %content_tint_background% !important;
|
||||
--loader_background: %background_page% !important;
|
||||
--header_background: %header_background% !important;
|
||||
--header_background_before_blur: %header_background% !important;
|
||||
--header_background_before_blur_alternate: %header_background% !important;
|
||||
--vkui--color_header_background: %header_background% !important;
|
||||
--vkui--color_header_background_before_blur: %header_background% !important;
|
||||
--vkui--color_header_background_before_blur_alternate: %header_background% !important;
|
||||
--header_alternate_background: %header_background% !important;
|
||||
|
||||
--header_text_alternate: %header_text% !important;
|
||||
@@ -52,12 +65,14 @@
|
||||
--header_text_secondary: %header_text% !important;
|
||||
--header_tint: %header_text% !important;
|
||||
--header_tint_alternate: %header_text% !important;
|
||||
--vkui--color_icon_accent_themed: %header_text% !important;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.vkuispace_gray, [scheme=space_gray], body[scheme=space_gray] {
|
||||
.vkuispace_gray, [scheme=space_gray], body[scheme=space_gray], .vkui--vkBase--dark, .vkui--vkIOS--dark, .vkui--vkCom--dark {
|
||||
--accent: %accent% !important;
|
||||
--vkui--color_icon_accent: %accent% !important;
|
||||
--action_sheet_action_foreground: %accent% !important;
|
||||
--attach_picker_tab_active_background: %accent% !important;
|
||||
--attach_picker_tab_active_text: %accent% !important;
|
||||
@@ -80,25 +95,36 @@
|
||||
--landing_text_title: %accent% !important;
|
||||
--landing_secondary_button_foreground: %accent% !important;
|
||||
--link_alternate: %accent% !important;
|
||||
--vkui--color_text_link_themed: %accent% !important;
|
||||
--loader_track_value_fill: %accent% !important;
|
||||
--vkui--color_track_buffer: %accent% !important;
|
||||
--feed_recommended_friend_promo_background: %accent% !important;
|
||||
--tabbar_active_icon: %accent% !important;
|
||||
--tabbar_tablet_active_icon: %accent% !important;
|
||||
--text_link: %accent% !important;
|
||||
--text_name: %accent% !important;
|
||||
--vkui--color_text_link: %accent% !important;
|
||||
--vkui--color_text_name: %accent% !important;
|
||||
--writebar_icon: %accent% !important;
|
||||
--vkui--color_write_bar_icon: %accent% !important;
|
||||
--dynamic_blue: %accent% !important;
|
||||
--background_content: %background_content% !important;
|
||||
--vkui--color_background_content: %background_content% !important;
|
||||
--background_page: %background_page% !important;
|
||||
--vkui--color_background: %background_page% !important;
|
||||
--content_tint_background: %content_tint_background% !important;
|
||||
--vkui--color_background_secondary: %content_tint_background% !important;
|
||||
--loader_background: %background_page% !important;
|
||||
--header_background: %header_background% !important;
|
||||
--header_background_before_blur: %header_background% !important;
|
||||
--header_background_before_blur_alternate: %header_background% !important;
|
||||
--vkui--color_header_background: %header_background% !important;
|
||||
--vkui--color_header_background_before_blur: %header_background% !important;
|
||||
--vkui--color_header_background_before_blur_alternate: %header_background% !important;
|
||||
--header_alternate_background: %header_background% !important;
|
||||
--header_tint: %header_text% !important;
|
||||
--header_tint_alternate: %header_text% !important;
|
||||
|
||||
--vkui--color_icon_accent_themed: %header_text% !important;
|
||||
--header_text_alternate: %header_text% !important;
|
||||
--header_text: %header_text% !important;
|
||||
--header_text_secondary: %header_text% !important;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/* vkui.css V2 by iTaysonLab */
|
||||
/* vkui coloring V2 by iTaysonLab */
|
||||
/* rewrited by vtosters team */
|
||||
/* Articles */
|
||||
body.article_body.article_dark {
|
||||
background-color: #000000 !important;
|
||||
@@ -19,7 +20,7 @@ body.article_body.article_dark {
|
||||
}
|
||||
|
||||
.article_dark .article>h1 {
|
||||
color: %textColorPrimary% !important;
|
||||
color: %text_primary% !important;
|
||||
}
|
||||
|
||||
.article__info_line {
|
||||
@@ -48,45 +49,60 @@ body.article_body.article_dark {
|
||||
}
|
||||
|
||||
/* Generic VKUI */
|
||||
.vkuispace_gray, [scheme=space_gray], body[scheme=space_gray] {
|
||||
.vkuispace_gray, [scheme=space_gray], body[scheme=space_gray], .vkui--vkBase--dark, .vkui--vkIOS--dark, .vkui--vkCom--dark {
|
||||
/* light background */
|
||||
--attach_picker_tab_active_icon: #000000 !important;
|
||||
--background_content: #000000 !important;
|
||||
--vkui--color_background_content: %background_content% !important;
|
||||
--button_bot_shadow: #000000 !important;
|
||||
--button_primary_foreground: #000000 !important;
|
||||
--content_tint_background: #000000 !important;
|
||||
--vkui--color_background_secondary: %content_tint_background% !important;
|
||||
--counter_secondary_text: #000000 !important;
|
||||
--loader_background: #000000 !important;
|
||||
--overlay_status_background: #000000 !important;
|
||||
--header_background: #000000 !important;
|
||||
--header_alternate_background: #000000 !important;
|
||||
--header_alternate_background: #000000 !important;
|
||||
--vkui--color_header_background: #000000 !important;
|
||||
--separator_alternate: #000000 !important;
|
||||
--segmented_control_bar_background: #000000 !important;
|
||||
--search_bar_background: #000000 !important;
|
||||
/* background */
|
||||
--background_page: #000000 !important;
|
||||
--vkui--color_background: #000000 !important;
|
||||
--header_background_before_blur: #000000 !important;
|
||||
--header_background_before_blur_alternate: #000000 !important;
|
||||
--vkui--color_header_background_before_blur: #000000 !important;
|
||||
--vkui--color_header_background_before_blur_alternate: #000000 !important;
|
||||
/* lighter BG (text fields) */
|
||||
--attach_picker_tab_inactive_background: #121212 !important;
|
||||
--background_keyboard: #121212 !important;
|
||||
--background_suggestions: #121212 !important;
|
||||
--vkui--color_background_modal: #121212 !important;
|
||||
--field_background: #121212 !important;
|
||||
--im_bubble_incoming: #121212 !important;
|
||||
--input_border: #121212 !important;
|
||||
--vkui--color_write_bar_input_background: #121212 !important;
|
||||
--modal_card_background: #121212 !important;
|
||||
--separator_common: #121212 !important;
|
||||
--vkui--color_separator_primary: #121212 !important;
|
||||
--snippet_background: #121212 !important;
|
||||
--android_active_color: #121212 !important;
|
||||
--switch_ios_off_border: #121212 !important;
|
||||
/* third BG (buttons) */
|
||||
--button_secondary_background: #212121 !important;
|
||||
--vkui--color_background_secondary_alpha: #212121 !important;
|
||||
--header_search_field_background: #212121 !important;
|
||||
--icon_tertiary: #212121 !important;
|
||||
--vkui--color_icon_tertiary: #212121 !important;
|
||||
--im_bubble_outgoing: #212121 !important;
|
||||
--input_background: #212121 !important;
|
||||
--vkui--color_write_bar_input_background: #212121 !important;
|
||||
--loader_track_fill: #212121 !important;
|
||||
--vkui--color_track_background: #212121 !important;
|
||||
--search_bar_field_background: #212121 !important;
|
||||
--vkui--color_search_field_background: #212121 !important;
|
||||
--selection_off_icon: #212121 !important;
|
||||
--panel_tab_active_background: #212121 !important;
|
||||
}
|
||||
|
||||
|
After Width: | Height: | Size: 4.9 KiB |
|
After Width: | Height: | Size: 3.1 KiB |
|
After Width: | Height: | Size: 2.7 KiB |
|
After Width: | Height: | Size: 2.9 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 7.3 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 6.3 KiB |
|
After Width: | Height: | Size: 7.0 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 8.3 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 3.1 KiB |
@@ -6327,8 +6327,8 @@
|
||||
<string name="globalUsersOnline_summ">Можа выклікаць доўгія загрузкі раздзелаў і вялікае спажыванне трафіку \n\nНе
|
||||
рэкамендуецца ўключаць дадзеную функцыю
|
||||
</string>
|
||||
<string name="savemsgsett_title">Захоўваць налады паведамленняў</string>
|
||||
<string name="savemsgsett_summ">Захоўваць становішча тумблераў у наладах паведамленняў</string>
|
||||
<string name="savemsgsett_title">Захоўваць параметры адпраўкі паведамленняў</string>
|
||||
<string name="savemsgsett_summ">Захоўваць выбраныя параметры статусу выходных паведамленняў як знікненне паведамленняў і бясшумная адпраўка</string>
|
||||
<string name="screenshotdetect_title">Адключыць дэтэкт скрыншотаў</string>
|
||||
<string name="screenshotdetect_summ">Адключыць апавяшчэнне аб тым, што вы зрабілі скрыншот</string>
|
||||
<string name="hideDeviceInfo_title">Адключыць адпраўку метрыкі</string>
|
||||
|
||||
@@ -5649,8 +5649,8 @@
|
||||
<string name="onlinefix_title">Обходить онлайн</string>
|
||||
<string name="globalUsersOnline_title">Глобальный обход онлайна</string>
|
||||
<string name="globalUsersOnline_summ">Может вызывать долгие загрузки разделов и большое потребление трафика \n\nНе рекомендуется включать данную функцию</string>
|
||||
<string name="savemsgsett_title">Сохранять настройки сообщений</string>
|
||||
<string name="savemsgsett_summ">Сохранять положение тумблеров в настройках сообщений</string>
|
||||
<string name="savemsgsett_title">Сохранять параметры отправки сообщений</string>
|
||||
<string name="savemsgsett_summ">Сохранять выбранные параметры статуса исходящих сообщений как исчезновение сообщений и бесшумная отправка</string>
|
||||
<string name="screenshotdetect_title">Отключить детект скриншотов</string>
|
||||
<string name="screenshotdetect_summ">Отключить уведомление о том, что вы сделали скриншот</string>
|
||||
<string name="hideDeviceInfo_title">Отключить отправку метрики</string>
|
||||
|
||||
@@ -5576,8 +5576,8 @@
|
||||
<string name="onlinefix_title">Обходити онлайн</string>
|
||||
<string name="globalUsersOnline_title">Глобальний обхід онлайну</string>
|
||||
<string name="globalUsersOnline_summ">Може викликати тривале завантаження розділів і велике споживання трафіку \n\nНе рекомендується включати цю функцію</string>
|
||||
<string name="savemsgsett_title">Зберігати налаштування повідомлень</string>
|
||||
<string name="savemsgsett_summ">Зберігати положення тумблерів у налаштуваннях повідомлень</string>
|
||||
<string name="savemsgsett_title">Зберігати параметри відправки повідомлень</string>
|
||||
<string name="savemsgsett_summ">Зберігати вибрані параметри статусу вихідних повідомлень як зникнення повідомлень і безшумна відправка</string>
|
||||
<string name="screenshotdetect_title">Вимкнути виявлення скріншотів</string>
|
||||
<string name="screenshotdetect_summ">Відключити повідомлення про те, що ви зробили скриншот</string>
|
||||
<string name="hideDeviceInfo_title">Вимкнути відправку метрики</string>
|
||||
|
||||
@@ -212,6 +212,11 @@
|
||||
<public type="array" name="targetlang_value" id="0x7f030074" />
|
||||
<public type="array" name="undel_value" id="0x7f030075" />
|
||||
<public type="array" name="wallpaper_change_dialog" id="0x7f030076" />
|
||||
<public type="array" name="accent_select_type" id="0x7f030077" />
|
||||
<public type="array" name="compression" id="0x7f030078" />
|
||||
<public type="array" name="compression_value" id="0x7f030079" />
|
||||
<public type="array" name="theme_type_name" id="0x7f03007a" />
|
||||
<public type="array" name="theme_type_name_checkbox" id="0x7f03007b" />
|
||||
<public type="attr" name="BMSB_error_text_color" id="0x7f040000" />
|
||||
<public type="attr" name="BuyMusicSubscriptionButtonStyle" id="0x7f040001" />
|
||||
<public type="attr" name="PIAlphaNormal" id="0x7f040002" />
|
||||
@@ -2122,6 +2127,7 @@
|
||||
<public type="attr" name="zOrderOnTop" id="0x7f040773" />
|
||||
<public type="attr" name="im_ic_msgdl" id="0x7f040774" />
|
||||
<public type="attr" name="im_ic_msgreload" id="0x7f040775" />
|
||||
<public type="attr" name="im_ic_stats" id="0x7f040776" />
|
||||
<public type="bool" name="abc_action_bar_embed_tabs" id="0x7f050000" />
|
||||
<public type="bool" name="abc_allow_stacked_button_bar" id="0x7f050001" />
|
||||
<public type="bool" name="abc_config_actionMenuItemAllCaps" id="0x7f050002" />
|
||||
@@ -2138,6 +2144,7 @@
|
||||
<public type="bool" name="spb_default_progressiveStart_activated" id="0x7f05000d" />
|
||||
<public type="bool" name="spb_default_reversed" id="0x7f05000e" />
|
||||
<public type="bool" name="vk_is_tablet" id="0x7f05000f" />
|
||||
<public type="bool" name="com_samsung_android_icon_container_has_icon_container" id="0x7f050010" />
|
||||
<public type="color" name="abc_background_cache_hint_selector_material_dark" id="0x7f060000" />
|
||||
<public type="color" name="abc_background_cache_hint_selector_material_light" id="0x7f060001" />
|
||||
<public type="color" name="abc_btn_colored_borderless_text_material" id="0x7f060002" />
|
||||
@@ -2944,6 +2951,7 @@
|
||||
<public type="color" name="yellow_sunflower" id="0x7f060324" />
|
||||
<public type="color" name="iclauncher" id="0x7f060325" />
|
||||
<public type="color" name="abc_color_highlight_material" id="0x7f060004" />
|
||||
<public type="color" name="alpha05" id="0x7f060326" />
|
||||
<public type="dimen" name="_post_side_padding" id="0x7f070000" />
|
||||
<public type="dimen" name="abc_action_bar_content_inset_material" id="0x7f070001" />
|
||||
<public type="dimen" name="abc_action_bar_content_inset_with_nav" id="0x7f070002" />
|
||||
@@ -4944,10 +4952,29 @@
|
||||
<public type="drawable" name="ic_deepl_logo_icon" id="0x7f080bcb" />
|
||||
<public type="drawable" name="ic_google_translate_logo" id="0x7f080bcc" />
|
||||
<public type="drawable" name="ic_yandex_translate_icon" id="0x7f080bd1" />
|
||||
<public type="drawable" name="microsoft" id="0x7f080bd2" />
|
||||
<public type="drawable" name="$splash__0" id="0x7f080bd2" />
|
||||
<public type="drawable" name="roundmsg" id="0x7f080bd3" />
|
||||
<public type="drawable" name="tgs_entry_background" id="0x7f080bd4" />
|
||||
<public type="drawable" name="yandex" id="0x7f080bd7" />
|
||||
<public type="drawable" name="$splash__1" id="0x7f080bd8" />
|
||||
<public type="drawable" name="$splash__10" id="0x7f080bd9" />
|
||||
<public type="drawable" name="$splash__11" id="0x7f080bda" />
|
||||
<public type="drawable" name="$splash__12" id="0x7f080bdb" />
|
||||
<public type="drawable" name="$splash__13" id="0x7f080bdc" />
|
||||
<public type="drawable" name="$splash__14" id="0x7f080bdd" />
|
||||
<public type="drawable" name="$splash__15" id="0x7f080bde" />
|
||||
<public type="drawable" name="$splash__2" id="0x7f080bdf" />
|
||||
<public type="drawable" name="$splash__3" id="0x7f080be0" />
|
||||
<public type="drawable" name="$splash__4" id="0x7f080be1" />
|
||||
<public type="drawable" name="$splash__5" id="0x7f080be2" />
|
||||
<public type="drawable" name="$splash__6" id="0x7f080be3" />
|
||||
<public type="drawable" name="$splash__7" id="0x7f080be4" />
|
||||
<public type="drawable" name="$splash__8" id="0x7f080be5" />
|
||||
<public type="drawable" name="$splash__9" id="0x7f080be6" />
|
||||
<public type="drawable" name="checker_background" id="0x7f080be8" />
|
||||
<public type="drawable" name="custom_thumb_selector" id="0x7f080be9" />
|
||||
<public type="drawable" name="custom_track_selector" id="0x7f080bea" />
|
||||
<public type="drawable" name="splash" id="0x7f080bec" />
|
||||
<public type="drawable" name="abc_control_background_material" id="0x7f080032" />
|
||||
<public type="drawable" name="ic_action_close" id="0x7f080322" />
|
||||
<public type="drawable" name="ic_camera_outline_28_new" id="0x7f0803a0" />
|
||||
@@ -6745,6 +6772,9 @@
|
||||
<public type="drawable" name="ic_telegram_24" id="0x7f080bcf" />
|
||||
<public type="drawable" name="ic_telegram_outline_28" id="0x7f080bd0" />
|
||||
<public type="drawable" name="vtlogo" id="0x7f080bd6" />
|
||||
<public type="drawable" name="bing" id="0x7f080be7" />
|
||||
<public type="drawable" name="sauceNAO" id="0x7f080beb" />
|
||||
<public type="drawable" name="tracemoe" id="0x7f080bed" />
|
||||
<public type="drawable" name="bg_music_play_button_white" id="0x7f08015e" />
|
||||
<public type="drawable" name="bg_poll_bg_thumb" id="0x7f080181" />
|
||||
<public type="drawable" name="bg_stickers_suggestions_left" id="0x7f0801ad" />
|
||||
@@ -6867,10 +6897,6 @@
|
||||
<public type="font" name="vk_sans_text_light" id="0x7f09001a" />
|
||||
<public type="font" name="vk_sans_text_medium" id="0x7f09001b" />
|
||||
<public type="font" name="vk_sans_text_regular" id="0x7f09001c" />
|
||||
<public name="color_preview" id="0x7f0a1021" type="id" />
|
||||
<public name="color_name" id="0x7f0a1022" type="id" />
|
||||
<public name="color_value" id="0x7f0a1023" type="id" />
|
||||
<public name="color_preview_border" id="0x7f0a1024" type="id" />
|
||||
<public type="id" name="ALT" id="0x7f0a0000" />
|
||||
<public type="id" name="CIRCLE" id="0x7f0a0001" />
|
||||
<public type="id" name="CTRL" id="0x7f0a0002" />
|
||||
@@ -11000,6 +11026,12 @@
|
||||
<public type="id" name="savedmsg" id="0x7f0a101e" />
|
||||
<public type="id" name="search_photo" id="0x7f0a101f" />
|
||||
<public type="id" name="text_hex_wrapper" id="0x7f0a1020" />
|
||||
<public type="id" name="color_preview" id="0x7f0a1021" />
|
||||
<public type="id" name="color_name" id="0x7f0a1022" />
|
||||
<public type="id" name="color_value" id="0x7f0a1023" />
|
||||
<public type="id" name="color_preview_border" id="0x7f0a1024" />
|
||||
<public type="id" name="account_backup_view" id="0x7f0a1025" />
|
||||
<public type="id" name="copy_image" id="0x7f0a1026" />
|
||||
<public type="integer" name="abc_config_activityDefaultDur" id="0x7f0b0000" />
|
||||
<public type="integer" name="abc_config_activityShortDur" id="0x7f0b0001" />
|
||||
<public type="integer" name="angle_rtl_180" id="0x7f0b0002" />
|
||||
@@ -12811,6 +12843,7 @@
|
||||
<public type="layout" name="tgs_entry" id="0x7f0d06de" />
|
||||
<public type="layout" name="wppreview" id="0x7f0d06df" />
|
||||
<public type="layout" name="write_bar_i" id="0x7f0d06e0" />
|
||||
<public type="layout" name="color_picker_item" id="0x7f0d06e1" />
|
||||
<public type="menu" name="add" id="0x7f0e0000" />
|
||||
<public type="menu" name="attach_item" id="0x7f0e0001" />
|
||||
<public type="menu" name="audio" id="0x7f0e0002" />
|
||||
@@ -12923,6 +12956,30 @@
|
||||
<public type="mipmap" name="vt_changeable_foreground" id="0x7f0f0044" />
|
||||
<public type="mipmap" name="vt_launcher" id="0x7f0f0045" />
|
||||
<public type="mipmap" name="vt_party_foreground" id="0x7f0f0047" />
|
||||
<public type="mipmap" name="ic_launcher_balloon_pink" id="0x7f0f0048" />
|
||||
<public type="mipmap" name="ic_launcher_balloon_pink_background" id="0x7f0f0049" />
|
||||
<public type="mipmap" name="ic_launcher_balloon_pink_foreground" id="0x7f0f004a" />
|
||||
<public type="mipmap" name="ic_launcher_bubble_gum" id="0x7f0f004b" />
|
||||
<public type="mipmap" name="ic_launcher_bubble_gum_background" id="0x7f0f004c" />
|
||||
<public type="mipmap" name="ic_launcher_bubble_gum_foreground" id="0x7f0f004d" />
|
||||
<public type="mipmap" name="ic_launcher_comics" id="0x7f0f004e" />
|
||||
<public type="mipmap" name="ic_launcher_comics_background" id="0x7f0f004f" />
|
||||
<public type="mipmap" name="ic_launcher_comics_foreground" id="0x7f0f0050" />
|
||||
<public type="mipmap" name="ic_launcher_flowers" id="0x7f0f0051" />
|
||||
<public type="mipmap" name="ic_launcher_flowers_background" id="0x7f0f0052" />
|
||||
<public type="mipmap" name="ic_launcher_flowers_foreground" id="0x7f0f0053" />
|
||||
<public type="mipmap" name="ic_launcher_metal_dark" id="0x7f0f0054" />
|
||||
<public type="mipmap" name="ic_launcher_metal_dark_background" id="0x7f0f0055" />
|
||||
<public type="mipmap" name="ic_launcher_metal_dark_foreground" id="0x7f0f0056" />
|
||||
<public type="mipmap" name="ic_launcher_pin_blue" id="0x7f0f0057" />
|
||||
<public type="mipmap" name="ic_launcher_pin_blue_background" id="0x7f0f0058" />
|
||||
<public type="mipmap" name="ic_launcher_pin_blue_foreground" id="0x7f0f0059" />
|
||||
<public type="mipmap" name="ic_launcher_rabbit" id="0x7f0f005a" />
|
||||
<public type="mipmap" name="ic_launcher_rabbit_background" id="0x7f0f005b" />
|
||||
<public type="mipmap" name="ic_launcher_rabbit_foreground" id="0x7f0f005c" />
|
||||
<public type="mipmap" name="ic_launcher_shine" id="0x7f0f005d" />
|
||||
<public type="mipmap" name="ic_launcher_shine_background" id="0x7f0f005e" />
|
||||
<public type="mipmap" name="ic_launcher_shine_foreground" id="0x7f0f005f" />
|
||||
<public type="mipmap" name="vt_adaptive_launcher_foneground" id="0x7f0f0043" />
|
||||
<public type="mipmap" name="vt_launcher_round" id="0x7f0f0046" />
|
||||
<public type="mipmap" name="ic_logo_facebook_28" id="0x7f0f0003" />
|
||||
@@ -19465,6 +19522,88 @@
|
||||
<public type="string" name="whitelisted_filters_groups_title" id="0x7f121838" />
|
||||
<public type="string" name="why_news_not_updated_summ" id="0x7f121839" />
|
||||
<public type="string" name="why_news_not_updated_title" id="0x7f12183a" />
|
||||
<public type="string" name="accent_color_summ" id="0x7f12183b" />
|
||||
<public type="string" name="accent_color_title" id="0x7f12183c" />
|
||||
<public type="string" name="accents" id="0x7f12183d" />
|
||||
<public type="string" name="accounts_saved_by_path" id="0x7f12183e" />
|
||||
<public type="string" name="add_to_ads_stories_whitelist" id="0x7f12183f" />
|
||||
<public type="string" name="amoledtheme_summ" id="0x7f121840" />
|
||||
<public type="string" name="amoledtheme_title" id="0x7f121841" />
|
||||
<public type="string" name="appLanguage" id="0x7f121842" />
|
||||
<public type="string" name="app_open_by_default_settings" id="0x7f121843" />
|
||||
<public type="string" name="applying_accent" id="0x7f121844" />
|
||||
<public type="string" name="audio_deleted_from_cache" id="0x7f121845" />
|
||||
<public type="string" name="blockminiapps_summ" id="0x7f121846" />
|
||||
<public type="string" name="blockminiapps_title" id="0x7f121847" />
|
||||
<public type="string" name="businessDisabler_title" id="0x7f121848" />
|
||||
<public type="string" name="by_choice" id="0x7f121849" />
|
||||
<public type="string" name="calls_not_available" id="0x7f12184a" />
|
||||
<public type="string" name="cannot_write" id="0x7f12184b" />
|
||||
<public type="string" name="change_accent_color" id="0x7f12184c" />
|
||||
<public type="string" name="compression_types" id="0x7f12184d" />
|
||||
<public type="string" name="compression_types_selection" id="0x7f12184e" />
|
||||
<public type="string" name="copydebuginfo_summ" id="0x7f12184f" />
|
||||
<public type="string" name="copydebuginfo_title" id="0x7f121850" />
|
||||
<public type="string" name="copyownlink_summ" id="0x7f121851" />
|
||||
<public type="string" name="copyownlink_title" id="0x7f121852" />
|
||||
<public type="string" name="crash_service_name" id="0x7f121853" />
|
||||
<public type="string" name="currentLanguage" id="0x7f121854" />
|
||||
<public type="string" name="current_theme" id="0x7f121855" />
|
||||
<public type="string" name="custom_links_warning" id="0x7f121856" />
|
||||
<public type="string" name="data" id="0x7f121857" />
|
||||
<public type="string" name="data_updated" id="0x7f121858" />
|
||||
<public type="string" name="datasettings_title" id="0x7f121859" />
|
||||
<public type="string" name="device_info" id="0x7f12185a" />
|
||||
<public type="string" name="device_info_copied" id="0x7f12185b" />
|
||||
<public type="string" name="dialogstats" id="0x7f12185c" />
|
||||
<public type="string" name="disable_analytics" id="0x7f12185d" />
|
||||
<public type="string" name="disable_analytics_summ" id="0x7f12185e" />
|
||||
<public type="string" name="downloading_update" id="0x7f12185f" />
|
||||
<public type="string" name="error_applying_accent" id="0x7f121860" />
|
||||
<public type="string" name="error_no_text" id="0x7f121861" />
|
||||
<public type="string" name="error_saving_file" id="0x7f121862" />
|
||||
<public type="string" name="failed_to_get_text" id="0x7f121863" />
|
||||
<public type="string" name="invalid_pack_link" id="0x7f121864" />
|
||||
<public type="string" name="invalidate_theme_cache_title" id="0x7f121865" />
|
||||
<public type="string" name="logColors_title" id="0x7f121866" />
|
||||
<public type="string" name="maxquality_summ" id="0x7f121867" />
|
||||
<public type="string" name="maxquality_title" id="0x7f121868" />
|
||||
<public type="string" name="microgsett" id="0x7f121869" />
|
||||
<public type="string" name="monettheme_summ" id="0x7f12186a" />
|
||||
<public type="string" name="monettheme_title" id="0x7f12186b" />
|
||||
<public type="string" name="newsfeed_notif_summ" id="0x7f12186c" />
|
||||
<public type="string" name="newsfeed_notif_title" id="0x7f12186d" />
|
||||
<public type="string" name="open_bot" id="0x7f12186e" />
|
||||
<public type="string" name="promotedstickers_title" id="0x7f12186f" />
|
||||
<public type="string" name="remove_encryption_key" id="0x7f121870" />
|
||||
<public type="string" name="remove_from_ads_stories_whitelist" id="0x7f121871" />
|
||||
<public type="string" name="reset_accounts" id="0x7f121872" />
|
||||
<public type="string" name="reset_all_settings" id="0x7f121873" />
|
||||
<public type="string" name="restore_accounts" id="0x7f121874" />
|
||||
<public type="string" name="restore_settings" id="0x7f121875" />
|
||||
<public type="string" name="save_accounts" id="0x7f121876" />
|
||||
<public type="string" name="save_online_data" id="0x7f121877" />
|
||||
<public type="string" name="select_color" id="0x7f121878" />
|
||||
<public type="string" name="select_palette" id="0x7f121879" />
|
||||
<public type="string" name="sources" id="0x7f12187a" />
|
||||
<public type="string" name="storiesGroupsAdBlock" id="0x7f12187b" />
|
||||
<public type="string" name="storiesGroupsAdBlocksummary" id="0x7f12187c" />
|
||||
<public type="string" name="systemtheme" id="0x7f12187d" />
|
||||
<public type="string" name="systemtheme_enabled" id="0x7f12187e" />
|
||||
<public type="string" name="systemtheme_summ" id="0x7f12187f" />
|
||||
<public type="string" name="updateverifdata_summ" id="0x7f121880" />
|
||||
<public type="string" name="updateverifdata_title" id="0x7f121881" />
|
||||
<public type="string" name="useCustomPrefsStyle_summ" id="0x7f121882" />
|
||||
<public type="string" name="useCustomPrefsStyle_title" id="0x7f121883" />
|
||||
<public type="string" name="useGenius_summ" id="0x7f121884" />
|
||||
<public type="string" name="useGenius_title" id="0x7f121885" />
|
||||
<public type="string" name="useNewColorEngine_summ" id="0x7f121886" />
|
||||
<public type="string" name="useNewColorEngine_title" id="0x7f121887" />
|
||||
<public type="string" name="useOldAppVer_summ" id="0x7f121888" />
|
||||
<public type="string" name="useOldAppVer_title" id="0x7f121889" />
|
||||
<public type="string" name="vkx_integration_enabled_info" id="0x7f12188a" />
|
||||
<public type="string" name="whitelisted_ad_groups_stories_title" id="0x7f12188b" />
|
||||
<public type="string" name="writebar_ios_title" id="0x7f12188c" />
|
||||
<public type="style" name="ActionBarGrayTheme" id="0x7f130000" />
|
||||
<public type="style" name="ActionBarProgress" id="0x7f130001" />
|
||||
<public type="style" name="ActionBarSpinner" id="0x7f130002" />
|
||||
@@ -20606,6 +20745,24 @@
|
||||
<public type="style" name="Base.V26.Widget.AppCompat.Toolbar" id="0x7f1300a1" />
|
||||
<public type="style" name="Base.V28.Theme.AppCompat" id="0x7f1300a2" />
|
||||
<public type="style" name="Base.V28.Theme.AppCompat.Light" id="0x7f1300a3" />
|
||||
<public type="style" name="Vk.Theme.VkApp.amoled_monet_generated" id="0x7f130475" />
|
||||
<public type="style" name="Vk.Theme.VkApp.amoled_monet_old_generated" id="0x7f130476" />
|
||||
<public type="style" name="Vk.Theme.VkApp.bright_light_monet_generated" id="0x7f130477" />
|
||||
<public type="style" name="Vk.Theme.VkApp.client_dark_monet_generated" id="0x7f130478" />
|
||||
<public type="style" name="Vk.Theme.VkApp.client_light_monet_generated" id="0x7f130479" />
|
||||
<public type="style" name="Vk.Theme.VkApp.space_gray_monet_generated" id="0x7f13047a" />
|
||||
<public type="style" name="VkAmoledMonetStyle" id="0x7f13047b" />
|
||||
<public type="style" name="VkAmoledMonetTheme" id="0x7f13047c" />
|
||||
<public type="style" name="VkDarkMonetStyle" id="0x7f13047d" />
|
||||
<public type="style" name="VkDarkMonetTheme" id="0x7f13047e" />
|
||||
<public type="style" name="VkLightMonetStyle" id="0x7f13047f" />
|
||||
<public type="style" name="VkLightMonetTheme" id="0x7f130480" />
|
||||
<public type="style" name="VkMilkAmoledMonetStyle" id="0x7f130481" />
|
||||
<public type="style" name="VkMilkAmoledMonetTheme" id="0x7f130482" />
|
||||
<public type="style" name="VkMilkDarkMonetStyle" id="0x7f130483" />
|
||||
<public type="style" name="VkMilkDarkMonetTheme" id="0x7f130484" />
|
||||
<public type="style" name="VkMilkLightMonetStyle" id="0x7f130485" />
|
||||
<public type="style" name="VkMilkLightMonetTheme" id="0x7f130486" />
|
||||
<public type="xml" name="account_preferences" id="0x7f150000" />
|
||||
<public type="xml" name="authenticator" id="0x7f150001" />
|
||||
<public type="xml" name="contacts_custom_type" id="0x7f150002" />
|
||||
@@ -20637,4 +20794,5 @@
|
||||
<public type="xml" name="preferences_proxy" id="0x7f15001c" />
|
||||
<public type="xml" name="preferences_tgs" id="0x7f15001d" />
|
||||
<public type="xml" name="preferences_themes" id="0x7f15001e" />
|
||||
<public type="xml" name="locales_config" id="0x7f15001f" />
|
||||
</resources>
|
||||
@@ -5783,8 +5783,8 @@ You need to restart the application to apply proxy settings"</string>
|
||||
<string name="onlinefix_title">Bypass online indicator</string>
|
||||
<string name="globalUsersOnline_title">Global online bypass</string>
|
||||
<string name="globalUsersOnline_summ">May cause slow partition loading and high traffic consumption \n\nIt is not recommended to enable this feature</string>
|
||||
<string name="savemsgsett_title">Save message settings</string>
|
||||
<string name="savemsgsett_summ">Save the position of the toggle switches in the message settings</string>
|
||||
<string name="savemsgsett_title">Save message sending parameters</string>
|
||||
<string name="savemsgsett_summ">Save selected outgoing message status parameters like message disappearing and silent sending</string>
|
||||
<string name="screenshotdetect_title">Disable screenshot detection</string>
|
||||
<string name="screenshotdetect_summ">Turn off the notification that you took a screenshot</string>
|
||||
<string name="hideDeviceInfo_title">Disable sending metric</string>
|
||||
|
||||
@@ -89,6 +89,11 @@
|
||||
<Preference
|
||||
android:key="whitelisted_filters_groups"
|
||||
android:title="@string/whitelisted_filters_groups_title"/>
|
||||
<com.vtosters.lite.ui.MaterialSwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="blockminiapps"
|
||||
android:summary="@string/blockminiapps_summ"
|
||||
android:title="@string/blockminiapps_title"/>
|
||||
</PreferenceCategory>
|
||||
<PreferenceCategory android:title="@string/sources">
|
||||
<EditTextPreference
|
||||
@@ -141,20 +146,15 @@
|
||||
<Preference
|
||||
android:key="newsfeedlistmanager_reset"
|
||||
android:title="@string/newsfeedlistmanager_reset_title"/>
|
||||
<com.vtosters.lite.ui.MaterialSwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="force_disable_psm"
|
||||
android:summary="@string/force_disable_psm_summ"
|
||||
android:title="@string/force_disable_psm_title"/>
|
||||
<!-- <com.vtosters.lite.ui.MaterialSwitchPreference-->
|
||||
<!-- android:defaultValue="false"-->
|
||||
<!-- android:key="force_disable_psm"-->
|
||||
<!-- android:summary="@string/force_disable_psm_summ"-->
|
||||
<!-- android:title="@string/force_disable_psm_title"/>-->
|
||||
<com.vtosters.lite.ui.MaterialSwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="feedcache"
|
||||
android:summary="@string/feed_other_cache_summary"
|
||||
android:title="@string/vtlfeedcache"/>
|
||||
<com.vtosters.lite.ui.MaterialSwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="blockminiapps"
|
||||
android:summary="@string/blockminiapps_summ"
|
||||
android:title="@string/blockminiapps_title"/>
|
||||
</PreferenceCategory>
|
||||
</PreferenceScreen>
|
||||
|
||||
@@ -43,9 +43,9 @@
|
||||
# .line 4
|
||||
# array-length v1, p1
|
||||
#
|
||||
# const/4 v2, 0x0
|
||||
#
|
||||
# const/4 v3, 0x0
|
||||
const/4 v2, 0x0
|
||||
|
||||
const/4 v3, 0x0
|
||||
#
|
||||
# :goto_0
|
||||
# if-ge v3, v1, :cond_0
|
||||
|
||||
@@ -778,42 +778,42 @@
|
||||
}
|
||||
.end annotation
|
||||
|
||||
.line 2
|
||||
invoke-static {}, Lcom/vk/dto/discover/DiscoverItem$Template;->values()[Lcom/vk/dto/discover/DiscoverItem$Template;
|
||||
# .line 2
|
||||
# invoke-static {}, Lcom/vk/dto/discover/DiscoverItem$Template;->values()[Lcom/vk/dto/discover/DiscoverItem$Template;
|
||||
|
||||
move-result-object v0
|
||||
# move-result-object v0
|
||||
|
||||
.line 3
|
||||
new-instance v1, Ljava/util/ArrayList;
|
||||
# .line 3
|
||||
# new-instance v1, Ljava/util/ArrayList;
|
||||
|
||||
array-length v2, v0
|
||||
# array-length v2, v0
|
||||
|
||||
invoke-direct {v1, v2}, Ljava/util/ArrayList;-><init>(I)V
|
||||
# invoke-direct {v1, v2}, Ljava/util/ArrayList;-><init>(I)V
|
||||
|
||||
.line 4
|
||||
array-length v2, v0
|
||||
# .line 4
|
||||
# array-length v2, v0
|
||||
|
||||
const/4 v3, 0x0
|
||||
|
||||
const/4 v4, 0x0
|
||||
|
||||
:goto_0
|
||||
if-ge v4, v2, :cond_0
|
||||
# :goto_0
|
||||
# if-ge v4, v2, :cond_0
|
||||
|
||||
aget-object v5, v0, v4
|
||||
# aget-object v5, v0, v4
|
||||
|
||||
.line 5
|
||||
invoke-virtual {v5}, Lcom/vk/dto/discover/DiscoverItem$Template;->b()Ljava/lang/String;
|
||||
# .line 5
|
||||
# invoke-virtual {v5}, Lcom/vk/dto/discover/DiscoverItem$Template;->b()Ljava/lang/String;
|
||||
|
||||
move-result-object v5
|
||||
# move-result-object v5
|
||||
|
||||
invoke-interface {v1, v5}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
|
||||
# invoke-interface {v1, v5}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
|
||||
|
||||
add-int/lit8 v4, v4, 0x1
|
||||
# add-int/lit8 v4, v4, 0x1
|
||||
|
||||
goto :goto_0
|
||||
# goto :goto_0
|
||||
|
||||
:cond_0
|
||||
# :cond_0
|
||||
|
||||
invoke-static {}, Lru/vtosters/hooks/DiscoverTemplates;->getTemplates()Ljava/util/ArrayList;
|
||||
|
||||
|
||||
@@ -234,20 +234,6 @@
|
||||
|
||||
.line 6
|
||||
iget v2, p0, Lcom/vk/im/engine/internal/api_commands/messages/MessagesGetConversationsApiCmd;->a:I
|
||||
|
||||
const-string v3, "major_sort_id"
|
||||
|
||||
const-string v4, "1023"
|
||||
|
||||
const v5, 0x7fffffff
|
||||
|
||||
if-eq v5, v2, :cond_4
|
||||
|
||||
const-string v4, "0"
|
||||
|
||||
.line 6
|
||||
:cond_4
|
||||
invoke-virtual {v1, v3, v4}, Lcom/vk/api/internal/MethodCall$a;->a(Ljava/lang/String;Ljava/lang/String;)Lcom/vk/api/internal/MethodCall$a;
|
||||
|
||||
invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
||||
|
||||
@@ -303,11 +289,6 @@
|
||||
|
||||
invoke-virtual {v1, v0}, Lcom/vk/api/internal/MethodCall$a;->b(Z)Lcom/vk/api/internal/MethodCall$a;
|
||||
|
||||
const-string v2, "5.131"
|
||||
|
||||
.line 10
|
||||
invoke-virtual {v1, v2}, Lcom/vk/api/internal/MethodCall$a;->b(Ljava/lang/String;)Lcom/vk/api/internal/MethodCall$a;
|
||||
|
||||
.line 13
|
||||
invoke-virtual {v1}, Lcom/vk/api/internal/MethodCall$a;->a()Lcom/vk/api/internal/MethodCall;
|
||||
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
.class public interface abstract Lcom/vk/medianative/MediaNative$EncoderHandler$Callback;
|
||||
.super Ljava/lang/Object;
|
||||
.source "MediaNative.java"
|
||||
|
||||
|
||||
# annotations
|
||||
.annotation system Ldalvik/annotation/EnclosingClass;
|
||||
value = Lcom/vk/medianative/MediaNative$EncoderHandler;
|
||||
.end annotation
|
||||
|
||||
.annotation system Ldalvik/annotation/InnerClass;
|
||||
accessFlags = 0x609
|
||||
name = "Callback"
|
||||
.end annotation
|
||||
|
||||
|
||||
# virtual methods
|
||||
.method public abstract getLayerBitmap(II)Landroid/graphics/Bitmap;
|
||||
.annotation build Landroidx/annotation/Nullable;
|
||||
.end annotation
|
||||
.end method
|
||||
|
||||
.method public abstract onBytes(I)V
|
||||
.end method
|
||||
|
||||
.method public abstract onProgress(I)V
|
||||
.end method
|
||||
@@ -1,157 +0,0 @@
|
||||
.class public Lcom/vk/medianative/MediaNative$EncoderHandler;
|
||||
.super Landroid/os/Handler;
|
||||
.source "MediaNative.java"
|
||||
|
||||
|
||||
# annotations
|
||||
.annotation system Ldalvik/annotation/EnclosingClass;
|
||||
value = Lcom/vk/medianative/MediaNative;
|
||||
.end annotation
|
||||
|
||||
.annotation system Ldalvik/annotation/InnerClass;
|
||||
accessFlags = 0x9
|
||||
name = "EncoderHandler"
|
||||
.end annotation
|
||||
|
||||
.annotation system Ldalvik/annotation/MemberClasses;
|
||||
value = {
|
||||
Lcom/vk/medianative/MediaNative$EncoderHandler$Callback;
|
||||
}
|
||||
.end annotation
|
||||
|
||||
|
||||
# instance fields
|
||||
.field private a:Lcom/vk/medianative/MediaNative$EncoderHandler$Callback;
|
||||
|
||||
|
||||
# direct methods
|
||||
.method constructor <init>(Landroid/os/Looper;)V
|
||||
.locals 0
|
||||
|
||||
.line 1
|
||||
invoke-direct {p0, p1}, Landroid/os/Handler;-><init>(Landroid/os/Looper;)V
|
||||
|
||||
return-void
|
||||
.end method
|
||||
|
||||
.method public static postEventFromNative(Ljava/lang/Object;III)Ljava/lang/Object;
|
||||
.locals 2
|
||||
.annotation build Landroidx/annotation/Keep;
|
||||
.end annotation
|
||||
|
||||
const/4 v0, 0x0
|
||||
|
||||
if-nez p0, :cond_0
|
||||
|
||||
return-object v0
|
||||
|
||||
.line 1
|
||||
:cond_0
|
||||
check-cast p0, Ljava/lang/ref/WeakReference;
|
||||
|
||||
invoke-virtual {p0}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;
|
||||
|
||||
move-result-object p0
|
||||
|
||||
check-cast p0, Lcom/vk/medianative/MediaNative$EncoderHandler;
|
||||
|
||||
if-eqz p0, :cond_2
|
||||
|
||||
const/4 v1, 0x2
|
||||
|
||||
if-ne p1, v1, :cond_1
|
||||
|
||||
.line 2
|
||||
iget-object p0, p0, Lcom/vk/medianative/MediaNative$EncoderHandler;->a:Lcom/vk/medianative/MediaNative$EncoderHandler$Callback;
|
||||
|
||||
invoke-interface {p0, p2, p3}, Lcom/vk/medianative/MediaNative$EncoderHandler$Callback;->getLayerBitmap(II)Landroid/graphics/Bitmap;
|
||||
|
||||
move-result-object p0
|
||||
|
||||
return-object p0
|
||||
|
||||
.line 3
|
||||
:cond_1
|
||||
invoke-virtual {p0, p1, p2, p3, v0}, Landroid/os/Handler;->obtainMessage(IIILjava/lang/Object;)Landroid/os/Message;
|
||||
|
||||
move-result-object p1
|
||||
|
||||
.line 4
|
||||
invoke-virtual {p0, p1}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z
|
||||
|
||||
:cond_2
|
||||
return-object v0
|
||||
.end method
|
||||
|
||||
|
||||
# virtual methods
|
||||
.method public handleMessage(Landroid/os/Message;)V
|
||||
.locals 3
|
||||
|
||||
.line 1
|
||||
iget-object v0, p0, Lcom/vk/medianative/MediaNative$EncoderHandler;->a:Lcom/vk/medianative/MediaNative$EncoderHandler$Callback;
|
||||
|
||||
if-nez v0, :cond_0
|
||||
|
||||
return-void
|
||||
|
||||
.line 2
|
||||
:cond_0
|
||||
iget v1, p1, Landroid/os/Message;->what:I
|
||||
|
||||
if-eqz v1, :cond_2
|
||||
|
||||
const/4 v2, 0x1
|
||||
|
||||
if-eq v1, v2, :cond_1
|
||||
|
||||
.line 3
|
||||
invoke-static {}, Lcom/vk/medianative/MediaNative;->a()Ljava/lang/String;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
new-instance v1, Ljava/lang/StringBuilder;
|
||||
|
||||
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
||||
|
||||
const-string v2, "Unknown message type "
|
||||
|
||||
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
||||
|
||||
iget p1, p1, Landroid/os/Message;->what:I
|
||||
|
||||
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
||||
|
||||
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
||||
|
||||
move-result-object p1
|
||||
|
||||
invoke-static {v0, p1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
|
||||
|
||||
return-void
|
||||
|
||||
.line 4
|
||||
:cond_1
|
||||
iget p1, p1, Landroid/os/Message;->arg1:I
|
||||
|
||||
invoke-interface {v0, p1}, Lcom/vk/medianative/MediaNative$EncoderHandler$Callback;->onProgress(I)V
|
||||
|
||||
return-void
|
||||
|
||||
.line 5
|
||||
:cond_2
|
||||
iget p1, p1, Landroid/os/Message;->arg1:I
|
||||
|
||||
invoke-interface {v0, p1}, Lcom/vk/medianative/MediaNative$EncoderHandler$Callback;->onBytes(I)V
|
||||
|
||||
return-void
|
||||
.end method
|
||||
|
||||
.method public setCallback(Lcom/vk/medianative/MediaNative$EncoderHandler$Callback;)V
|
||||
.locals 0
|
||||
|
||||
.line 1
|
||||
iput-object p1, p0, Lcom/vk/medianative/MediaNative$EncoderHandler;->a:Lcom/vk/medianative/MediaNative$EncoderHandler$Callback;
|
||||
|
||||
return-void
|
||||
.end method
|
||||
@@ -758,7 +758,7 @@
|
||||
.line 3
|
||||
sget-object v0, Lcom/vk/core/util/AppContextHolder;->a:Landroid/content/Context;
|
||||
|
||||
invoke-static {v0}, Lcom/vk/medianative/MediaNative;->init(Landroid/content/Context;)V
|
||||
# invoke-static {v0}, Lcom/vk/medianative/MediaNative;->init(Landroid/content/Context;)V
|
||||
|
||||
.line 4
|
||||
sget-object v0, Lcom/vk/libvideo/storage/VideoPositionStorage;->e:Lcom/vk/libvideo/storage/VideoPositionStorage$c;
|
||||
|
||||
@@ -3941,6 +3941,8 @@
|
||||
|
||||
move-result v0
|
||||
|
||||
const v0, 0x1 # disable calls in nonmilk
|
||||
|
||||
if-nez v0, :cond_8
|
||||
|
||||
const v0, 0x7f0e0029
|
||||
|
||||
@@ -777,94 +777,96 @@
|
||||
.method private static loadLibraries(Landroid/content/Context;)Z
|
||||
.locals 6
|
||||
|
||||
.line 1
|
||||
sget-boolean p0, Lru/mail/voip2/VoipImpl2;->_nativeLibsLoaded:Z
|
||||
# .line 1
|
||||
# sget-boolean p0, Lru/mail/voip2/VoipImpl2;->_nativeLibsLoaded:Z
|
||||
|
||||
const/4 v0, 0x1
|
||||
# const/4 v0, 0x1
|
||||
|
||||
if-eqz p0, :cond_0
|
||||
# if-eqz p0, :cond_0
|
||||
|
||||
return v0
|
||||
# return v0
|
||||
|
||||
.line 2
|
||||
:cond_0
|
||||
sget p0, Landroid/os/Build$VERSION;->SDK_INT:I
|
||||
# .line 2
|
||||
# :cond_0
|
||||
# sget p0, Landroid/os/Build$VERSION;->SDK_INT:I
|
||||
|
||||
const/16 v1, 0x15
|
||||
# const/16 v1, 0x15
|
||||
|
||||
const-string v2, "arm64"
|
||||
# const-string v2, "arm64"
|
||||
|
||||
const/4 v3, 0x0
|
||||
# const/4 v3, 0x0
|
||||
|
||||
if-lt p0, v1, :cond_3
|
||||
# if-lt p0, v1, :cond_3
|
||||
|
||||
.line 3
|
||||
sget-object p0, Landroid/os/Build;->SUPPORTED_64_BIT_ABIS:[Ljava/lang/String;
|
||||
# .line 3
|
||||
# sget-object p0, Landroid/os/Build;->SUPPORTED_64_BIT_ABIS:[Ljava/lang/String;
|
||||
|
||||
array-length v1, p0
|
||||
# array-length v1, p0
|
||||
|
||||
const/4 v4, 0x0
|
||||
# const/4 v4, 0x0
|
||||
|
||||
:goto_0
|
||||
if-ge v4, v1, :cond_2
|
||||
# :goto_0
|
||||
# if-ge v4, v1, :cond_2
|
||||
|
||||
aget-object v5, p0, v4
|
||||
# aget-object v5, p0, v4
|
||||
|
||||
.line 4
|
||||
invoke-virtual {v5, v2}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
|
||||
# .line 4
|
||||
# invoke-virtual {v5, v2}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
|
||||
|
||||
move-result v5
|
||||
# move-result v5
|
||||
|
||||
if-eqz v5, :cond_1
|
||||
# if-eqz v5, :cond_1
|
||||
|
||||
const/4 p0, 0x0
|
||||
# const/4 p0, 0x0
|
||||
|
||||
goto :goto_1
|
||||
# goto :goto_1
|
||||
|
||||
:cond_1
|
||||
add-int/lit8 v4, v4, 0x1
|
||||
# :cond_1
|
||||
# add-int/lit8 v4, v4, 0x1
|
||||
|
||||
goto :goto_0
|
||||
# goto :goto_0
|
||||
|
||||
:cond_2
|
||||
const/4 p0, 0x0
|
||||
# :cond_2
|
||||
# const/4 p0, 0x0
|
||||
|
||||
goto :goto_1
|
||||
# goto :goto_1
|
||||
|
||||
.line 5
|
||||
:cond_3
|
||||
sget-object p0, Landroid/os/Build;->CPU_ABI:Ljava/lang/String;
|
||||
# .line 5
|
||||
# :cond_3
|
||||
# sget-object p0, Landroid/os/Build;->CPU_ABI:Ljava/lang/String;
|
||||
|
||||
invoke-virtual {p0, v2}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
|
||||
# invoke-virtual {p0, v2}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
|
||||
|
||||
move-result p0
|
||||
# move-result p0
|
||||
|
||||
:goto_1
|
||||
if-eqz p0, :cond_4
|
||||
# :goto_1
|
||||
# if-eqz p0, :cond_4
|
||||
|
||||
const-string p0, "voip_armv7-a-neon"
|
||||
# const-string p0, "voip_armv7-a-neon"
|
||||
|
||||
goto :goto_2
|
||||
# goto :goto_2
|
||||
|
||||
:cond_4
|
||||
const-string p0, "voip_armv7-a-neon"
|
||||
# :cond_4
|
||||
# const-string p0, "voip_armv7-a-neon"
|
||||
|
||||
.line 6
|
||||
:goto_2
|
||||
:try_start_0
|
||||
invoke-static {p0}, Ljava/lang/System;->loadLibrary(Ljava/lang/String;)V
|
||||
# .line 6
|
||||
# :goto_2
|
||||
# :try_start_0
|
||||
# invoke-static {p0}, Ljava/lang/System;->loadLibrary(Ljava/lang/String;)V
|
||||
|
||||
.line 7
|
||||
sput-boolean v0, Lru/mail/voip2/VoipImpl2;->_nativeLibsLoaded:Z
|
||||
:try_end_0
|
||||
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
||||
# .line 7
|
||||
# sput-boolean v0, Lru/mail/voip2/VoipImpl2;->_nativeLibsLoaded:Z
|
||||
# :try_end_0
|
||||
# .catchall {:try_start_0 .. :try_end_0} :catchall_0
|
||||
|
||||
goto :goto_3
|
||||
# goto :goto_3
|
||||
|
||||
:catchall_0
|
||||
# :catchall_0
|
||||
# const/4 v0, 0x0
|
||||
|
||||
# :goto_3
|
||||
const/4 v0, 0x0
|
||||
|
||||
:goto_3
|
||||
return v0
|
||||
.end method
|
||||
|
||||
|
||||