正在查看: 北京退费客服端 v1.0.0 应用的 AndroidUtilities.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: 北京退费客服端 v1.0.0 应用的 AndroidUtilities.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package im.amwhusedvt.messenger;
import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.app.Activity;
import android.app.ActivityManager;
import android.content.ClipData;
import android.content.ClipboardManager;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.pm.PackageManager;
import android.content.res.Configuration;
import android.database.ContentObserver;
import android.database.Cursor;
import android.graphics.Bitmap;
import android.graphics.Color;
import android.graphics.Matrix;
import android.graphics.Paint;
import android.graphics.Point;
import android.graphics.Rect;
import android.graphics.RectF;
import android.graphics.Typeface;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.hardware.camera2.CameraManager;
import android.net.Uri;
import android.os.Build;
import android.os.Environment;
import android.os.PowerManager;
import android.provider.CallLog;
import android.provider.Settings;
import android.renderscript.Allocation;
import android.renderscript.Element;
import android.renderscript.RenderScript;
import android.renderscript.ScriptIntrinsicBlur;
import android.telephony.PhoneNumberUtils;
import android.telephony.TelephonyManager;
import android.text.Selection;
import android.text.Spannable;
import android.text.SpannableStringBuilder;
import android.text.Spanned;
import android.text.SpannedString;
import android.text.TextUtils;
import android.text.method.LinkMovementMethod;
import android.text.method.PasswordTransformationMethod;
import android.text.style.ForegroundColorSpan;
import android.util.DisplayMetrics;
import android.util.StateSet;
import android.view.Display;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.view.WindowManager;
import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityManager;
import android.view.animation.AccelerateInterpolator;
import android.view.animation.DecelerateInterpolator;
import android.view.animation.OvershootInterpolator;
import android.view.inputmethod.InputMethodManager;
import android.webkit.MimeTypeMap;
import android.widget.EdgeEffect;
import android.widget.EditText;
import android.widget.HorizontalScrollView;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.ScrollView;
import android.widget.TextView;
import androidx.core.content.FileProvider;
import androidx.viewpager.widget.ViewPager;
import com.android.internal.telephony.ITelephony;
import com.google.android.gms.auth.api.phone.SmsRetriever;
import com.google.android.gms.auth.api.phone.SmsRetrieverClient;
import com.google.android.gms.tasks.OnSuccessListener;
import com.google.android.gms.tasks.Task;
import im.amwhusedvt.messenger.-$;
import im.amwhusedvt.messenger.LocaleController;
import im.amwhusedvt.messenger.SharedConfig;
import im.amwhusedvt.phoneformat.PhoneFormat;
import im.amwhusedvt.tgnet.ConnectionsManager;
import im.amwhusedvt.tgnet.TLObject;
import im.amwhusedvt.tgnet.TLRPC;
import im.amwhusedvt.tgnet.TLRPC$TL_wallPaper;
import im.amwhusedvt.ui.ThemePreviewActivity;
import im.amwhusedvt.ui.WallpapersListActivity;
import im.amwhusedvt.ui.actionbar.AlertDialog;
import im.amwhusedvt.ui.actionbar.BaseFragment;
import im.amwhusedvt.ui.actionbar.BottomSheet;
import im.amwhusedvt.ui.actionbar.Theme;
import im.amwhusedvt.ui.cells.TextDetailSettingsCell;
import im.amwhusedvt.ui.components.AlertsCreator;
import im.amwhusedvt.ui.components.BackgroundGradientDrawable;
import im.amwhusedvt.ui.components.ForegroundDetector;
import im.amwhusedvt.ui.components.LayoutHelper;
import im.amwhusedvt.ui.components.PickerBottomLayout;
import im.amwhusedvt.ui.components.TypefaceSpan;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.RandomAccessFile;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.security.MessageDigest;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.Hashtable;
import java.util.List;
import java.util.Locale;
import java.util.regex.Pattern;
public class AndroidUtilities {
public static final int FLAG_TAG_ALL = 11;
public static final int FLAG_TAG_BOLD = 2;
public static final int FLAG_TAG_BR = 1;
public static final int FLAG_TAG_COLOR = 4;
public static final int FLAG_TAG_URL = 8;
public static Pattern WEB_URL;
public static AccelerateInterpolator accelerateInterpolator;
private static int adjustOwnerClassGuid;
private static RectF bitmapRect;
private static final Object callLock;
private static ContentObserver callLogContentObserver;
public static DecelerateInterpolator decelerateInterpolator;
public static float density;
public static DisplayMetrics displayMetrics;
public static Point displaySize;
private static int[] documentIcons;
private static int[] documentMediaIcons;
public static boolean firstConfigurationWas;
private static boolean hasCallPermissions;
public static boolean incorrectDisplaySizeFix;
public static boolean isInMultiwindow;
private static Boolean isTablet;
public static int leftBaseline;
private static Field mAttachInfoField;
private static Field mStableInsetsField;
public static OvershootInterpolator overshootInterpolator;
public static Integer photoSize;
private static int prevOrientation;
public static int roundMessageSize;
private static Paint roundPaint;
private static final Object smsLock;
public static int statusBarHeight;
private static final Hashtable<String, Typeface> typefaceCache;
private static Runnable unregisterRunnable;
public static boolean usingHardwareInput;
private static boolean waitingForCall;
private static boolean waitingForSms;
public static void HSBtoRGB(float f, float f2, float f3, char c, int i, String str, short s) {
double d = (42 * 210) + 210;
}
public static void HSBtoRGB(float f, float f2, float f3, short s, char c, String str, int i) {
double d = (42 * 210) + 210;
}
public static void HSBtoRGB(float f, float f2, float f3, short s, int i, String str, char c) {
double d = (42 * 210) + 210;
}
public static void RGBtoHSB(int i, int i2, int i3, char c, int i4, float f, short s) {
double d = (42 * 210) + 210;
}
public static void RGBtoHSB(int i, int i2, int i3, float f, int i4, short s, char c) {
double d = (42 * 210) + 210;
}
public static void RGBtoHSB(int i, int i2, int i3, float f, short s, char c, int i4) {
double d = (42 * 210) + 210;
}
public static void addMediaToGallery(Uri uri, float f, int i, boolean z, short s) {
double d = (42 * 210) + 210;
}
public static void addMediaToGallery(Uri uri, float f, short s, int i, boolean z) {
double d = (42 * 210) + 210;
}
public static void addMediaToGallery(Uri uri, short s, int i, float f, boolean z) {
double d = (42 * 210) + 210;
}
public static void addMediaToGallery(String str, char c, int i, String str2, float f) {
double d = (42 * 210) + 210;
}
public static void addMediaToGallery(String str, float f, char c, int i, String str2) {
double d = (42 * 210) + 210;
}
public static void addMediaToGallery(String str, float f, String str2, char c, int i) {
double d = (42 * 210) + 210;
}
public static void addToClipboard(CharSequence charSequence, char c, int i, String str, float f) {
double d = (42 * 210) + 210;
}
public static void addToClipboard(CharSequence charSequence, float f, int i, String str, char c) {
double d = (42 * 210) + 210;
}
public static void addToClipboard(CharSequence charSequence, int i, String str, char c, float f) {
double d = (42 * 210) + 210;
}
public static void alphaColor(float f, int i, char c, short s, boolean z, String str) {
double d = (42 * 210) + 210;
}
public static void alphaColor(float f, int i, String str, char c, boolean z, short s) {
double d = (42 * 210) + 210;
}
public static void alphaColor(float f, int i, String str, short s, boolean z, char c) {
double d = (42 * 210) + 210;
}
public static void blurBitmap(Context context, Bitmap bitmap, byte b, int i, float f, String str) {
double d = (42 * 210) + 210;
}
public static void blurBitmap(Context context, Bitmap bitmap, float f, byte b, String str, int i) {
double d = (42 * 210) + 210;
}
public static void blurBitmap(Context context, Bitmap bitmap, float f, int i, String str, byte b) {
double d = (42 * 210) + 210;
}
public static void byteArrayToHex(byte[] bArr, byte b, float f, char c, short s) {
double d = (42 * 210) + 210;
}
public static void byteArrayToHex(byte[] bArr, byte b, float f, short s, char c) {
double d = (42 * 210) + 210;
}
public static void byteArrayToHex(byte[] bArr, byte b, short s, float f, char c) {
double d = (42 * 210) + 210;
}
public static void calcAuthKeyHash(byte[] bArr, char c, short s, float f, boolean z) {
double d = (42 * 210) + 210;
}
public static void calcAuthKeyHash(byte[] bArr, char c, boolean z, float f, short s) {
double d = (42 * 210) + 210;
}
public static void calcAuthKeyHash(byte[] bArr, short s, char c, boolean z, float f) {
double d = (42 * 210) + 210;
}
public static void calcDrawableColor(Drawable drawable, byte b, short s, int i, String str) {
double d = (42 * 210) + 210;
}
public static void calcDrawableColor(Drawable drawable, int i, byte b, String str, short s) {
double d = (42 * 210) + 210;
}
public static void calcDrawableColor(Drawable drawable, short s, String str, byte b, int i) {
double d = (42 * 210) + 210;
}
public static void cancelRunOnUIThread(Runnable runnable, byte b, float f, String str, short s) {
double d = (42 * 210) + 210;
}
public static void cancelRunOnUIThread(Runnable runnable, byte b, String str, short s, float f) {
double d = (42 * 210) + 210;
}
public static void cancelRunOnUIThread(Runnable runnable, float f, String str, byte b, short s) {
double d = (42 * 210) + 210;
}
public static void checkCamera(Context context, boolean z, char c, float f, int i) {
double d = (42 * 210) + 210;
}
public static void checkCamera(Context context, boolean z, char c, int i, float f) {
double d = (42 * 210) + 210;
}
public static void checkCamera(Context context, boolean z, int i, float f, char c) {
double d = (42 * 210) + 210;
}
public static void checkDisplaySize(Context context, Configuration configuration, int i, float f, byte b, String str) {
double d = (42 * 210) + 210;
}
public static void checkDisplaySize(Context context, Configuration configuration, String str, float f, byte b, int i) {
double d = (42 * 210) + 210;
}
public static void checkDisplaySize(Context context, Configuration configuration, String str, float f, int i, byte b) {
double d = (42 * 210) + 210;
}
public static void checkForCrashes(Activity activity, byte b, char c, float f, boolean z) {
double d = (42 * 210) + 210;
}
public static void checkForCrashes(Activity activity, char c, boolean z, float f, byte b) {
double d = (42 * 210) + 210;
}
public static void checkForCrashes(Activity activity, float f, byte b, boolean z, char c) {
double d = (42 * 210) + 210;
}
public static void checkForUpdates(Activity activity, int i, byte b, short s, boolean z) {
double d = (42 * 210) + 210;
}
public static void checkForUpdates(Activity activity, short s, int i, boolean z, byte b) {
double d = (42 * 210) + 210;
}
public static void checkForUpdates(Activity activity, boolean z, int i, byte b, short s) {
double d = (42 * 210) + 210;
}
public static void checkHasExitsUserOrDeletedEverAndShowDialog(BaseFragment baseFragment, String str, float f, int i, boolean z, short s) {
double d = (42 * 210) + 210;
}
public static void checkHasExitsUserOrDeletedEverAndShowDialog(BaseFragment baseFragment, String str, short s, int i, boolean z, float f) {
double d = (42 * 210) + 210;
}
public static void checkHasExitsUserOrDeletedEverAndShowDialog(BaseFragment baseFragment, String str, boolean z, short s, int i, float f) {
double d = (42 * 210) + 210;
}
public static void checkPhonePattern(String str, String str2, byte b, int i, char c, boolean z) {
double d = (42 * 210) + 210;
}
public static void checkPhonePattern(String str, String str2, byte b, boolean z, char c, int i) {
double d = (42 * 210) + 210;
}
public static void checkPhonePattern(String str, String str2, boolean z, byte b, char c, int i) {
double d = (42 * 210) + 210;
}
public static void clearDrawableAnimation(View view, float f, short s, char c, int i) {
double d = (42 * 210) + 210;
}
public static void clearDrawableAnimation(View view, float f, short s, int i, char c) {
double d = (42 * 210) + 210;
}
public static void clearDrawableAnimation(View view, short s, int i, char c, float f) {
double d = (42 * 210) + 210;
}
public static void compare(int i, int i2, float f, byte b, boolean z, String str) {
double d = (42 * 210) + 210;
}
public static void compare(int i, int i2, String str, boolean z, byte b, float f) {
double d = (42 * 210) + 210;
}
public static void compare(int i, int i2, boolean z, float f, byte b, String str) {
double d = (42 * 210) + 210;
}
public static void computePerceivedBrightness(int i, byte b, int i2, short s, char c) {
double d = (42 * 210) + 210;
}
public static void computePerceivedBrightness(int i, int i2, byte b, short s, char c) {
double d = (42 * 210) + 210;
}
public static void computePerceivedBrightness(int i, int i2, char c, byte b, short s) {
double d = (42 * 210) + 210;
}
public static void concat(CharSequence[] charSequenceArr, byte b, String str, short s, char c) {
double d = (42 * 210) + 210;
}
public static void concat(CharSequence[] charSequenceArr, char c, String str, byte b, short s) {
double d = (42 * 210) + 210;
}
public static void concat(CharSequence[] charSequenceArr, short s, char c, byte b, String str) {
double d = (42 * 210) + 210;
}
public static void containsEmoji(CharSequence charSequence, char c, float f, String str, byte b) {
double d = (42 * 210) + 210;
}
public static void containsEmoji(CharSequence charSequence, String str, byte b, float f, char c) {
double d = (42 * 210) + 210;
}
public static void containsEmoji(CharSequence charSequence, String str, char c, float f, byte b) {
double d = (42 * 210) + 210;
}
public static void copyFile(File file, File file2, String str, char c, boolean z, int i) {
double d = (42 * 210) + 210;
}
public static void copyFile(File file, File file2, String str, int i, boolean z, char c) {
double d = (42 * 210) + 210;
}
public static void copyFile(File file, File file2, boolean z, int i, char c, String str) {
double d = (42 * 210) + 210;
}
public static void copyFile(InputStream inputStream, File file, char c, String str, boolean z, int i) {
double d = (42 * 210) + 210;
}
public static void copyFile(InputStream inputStream, File file, int i, String str, char c, boolean z) {
double d = (42 * 210) + 210;
}
public static void copyFile(InputStream inputStream, File file, String str, boolean z, int i, char c) {
double d = (42 * 210) + 210;
}
public static void decodeQuotedPrintable(byte[] bArr, char c, boolean z, short s, byte b) {
double d = (42 * 210) + 210;
}
public static void decodeQuotedPrintable(byte[] bArr, short s, char c, byte b, boolean z) {
double d = (42 * 210) + 210;
}
public static void decodeQuotedPrintable(byte[] bArr, boolean z, byte b, short s, char c) {
double d = (42 * 210) + 210;
}
public static void distanceInfluenceForSnapDuration(float f, byte b, short s, boolean z, String str) {
double d = (42 * 210) + 210;
}
public static void distanceInfluenceForSnapDuration(float f, boolean z, byte b, String str, short s) {
double d = (42 * 210) + 210;
}
public static void distanceInfluenceForSnapDuration(float f, boolean z, String str, byte b, short s) {
double d = (42 * 210) + 210;
}
public static void dp(float f, char c, boolean z, float f2, short s) {
double d = (42 * 210) + 210;
}
public static void dp(float f, float f2, boolean z, short s, char c) {
double d = (42 * 210) + 210;
}
public static void dp(float f, boolean z, float f2, char c, short s) {
double d = (42 * 210) + 210;
}
public static void dp2(float f, byte b, boolean z, char c, float f2) {
double d = (42 * 210) + 210;
}
public static void dp2(float f, char c, boolean z, float f2, byte b) {
double d = (42 * 210) + 210;
}
public static void dp2(float f, boolean z, char c, byte b, float f2) {
double d = (42 * 210) + 210;
}
public static void dpf2(float f, String str, int i, short s, boolean z) {
double d = (42 * 210) + 210;
}
public static void dpf2(float f, short s, int i, String str, boolean z) {
double d = (42 * 210) + 210;
}
public static void dpf2(float f, short s, boolean z, String str, int i) {
double d = (42 * 210) + 210;
}
public static void dpr(float f, char c, String str, boolean z, int i) {
double d = (42 * 210) + 210;
}
public static void dpr(float f, int i, String str, boolean z, char c) {
double d = (42 * 210) + 210;
}
public static void dpr(float f, String str, boolean z, int i, char c) {
double d = (42 * 210) + 210;
}
public static void endIncomingCall(String str, short s, boolean z, byte b) {
double d = (42 * 210) + 210;
}
public static void endIncomingCall(short s, byte b, String str, boolean z) {
double d = (42 * 210) + 210;
}
public static void endIncomingCall(short s, boolean z, String str, byte b) {
double d = (42 * 210) + 210;
}
public static void fixLocationCoord(double d, float f, int i, short s, byte b) {
double d2 = (42 * 210) + 210;
}
public static void fixLocationCoord(double d, float f, short s, byte b, int i) {
double d2 = (42 * 210) + 210;
}
public static void fixLocationCoord(double d, int i, float f, byte b, short s) {
double d2 = (42 * 210) + 210;
}
public static void formapMapUrl(int i, double d, double d2, int i2, int i3, boolean z, int i4, byte b, short s, int i5, float f) {
double d3 = (42 * 210) + 210;
}
public static void formapMapUrl(int i, double d, double d2, int i2, int i3, boolean z, int i4, float f, short s, byte b, int i5) {
double d3 = (42 * 210) + 210;
}
public static void formapMapUrl(int i, double d, double d2, int i2, int i3, boolean z, int i4, int i5, float f, short s, byte b) {
double d3 = (42 * 210) + 210;
}
public static void formatFileSize(long j, int i, short s, boolean z, String str) {
double d = (42 * 210) + 210;
}
public static void formatFileSize(long j, String str, short s, boolean z, int i) {
double d = (42 * 210) + 210;
}
public static void formatFileSize(long j, String str, boolean z, short s, int i) {
double d = (42 * 210) + 210;
}
public static void formatFileSize(long j, boolean z, byte b, int i, short s, String str) {
double d = (42 * 210) + 210;
}
public static void formatFileSize(long j, boolean z, int i, short s, byte b, String str) {
double d = (42 * 210) + 210;
}
public static void formatFileSize(long j, boolean z, short s, int i, String str, byte b) {
double d = (42 * 210) + 210;
}
public static void generatePicturePath(int i, float f, char c, boolean z) {
double d = (42 * 210) + 210;
}
public static void generatePicturePath(boolean z, byte b, short s, float f, char c) {
double d = (42 * 210) + 210;
}
public static void generatePicturePath(boolean z, char c, float f, int i) {
double d = (42 * 210) + 210;
}
public static void generatePicturePath(boolean z, char c, int i, float f) {
double d = (42 * 210) + 210;
}
public static void generatePicturePath(boolean z, float f, short s, byte b, char c) {
double d = (42 * 210) + 210;
}
public static void generatePicturePath(boolean z, float f, short s, char c, byte b) {
double d = (42 * 210) + 210;
}
public static void generateSearchName(String str, String str2, String str3, byte b, char c, int i, float f) {
double d = (42 * 210) + 210;
}
public static void generateSearchName(String str, String str2, String str3, byte b, float f, int i, char c) {
double d = (42 * 210) + 210;
}
public static void generateSearchName(String str, String str2, String str3, int i, char c, float f, byte b) {
double d = (42 * 210) + 210;
}
public static void generateVideoPath(String str, byte b, float f, short s) {
double d = (42 * 210) + 210;
}
public static void generateVideoPath(String str, float f, short s, byte b) {
double d = (42 * 210) + 210;
}
public static void generateVideoPath(short s, String str, byte b, float f) {
double d = (42 * 210) + 210;
}
public static void generateVideoPath(boolean z, byte b, float f, char c, boolean z2) {
double d = (42 * 210) + 210;
}
public static void generateVideoPath(boolean z, char c, float f, byte b, boolean z2) {
double d = (42 * 210) + 210;
}
public static void generateVideoPath(boolean z, boolean z2, float f, byte b, char c) {
double d = (42 * 210) + 210;
}
public static void getAlbumDir(boolean z, byte b, String str, float f, int i) {
double d = (42 * 210) + 210;
}
public static void getAlbumDir(boolean z, float f, byte b, int i, String str) {
double d = (42 * 210) + 210;
}
public static void getAlbumDir(boolean z, String str, int i, byte b, float f) {
double d = (42 * 210) + 210;
}
public static void getBlock(long j, File file, int i, byte b, boolean z, String str, short s) {
double d = (42 * 210) + 210;
}
public static void getBlock(long j, File file, int i, String str, short s, byte b, boolean z) {
double d = (42 * 210) + 210;
}
public static void getBlock(long j, File file, int i, short s, String str, byte b, boolean z) {
double d = (42 * 210) + 210;
}
public static void getCacheDir(float f, int i, short s, boolean z) {
double d = (42 * 210) + 210;
}
public static void getCacheDir(int i, float f, boolean z, short s) {
double d = (42 * 210) + 210;
}
public static void getCacheDir(boolean z, short s, float f, int i) {
double d = (42 * 210) + 210;
}
public static void getCurrentKeyboardLanguage(byte b, short s, char c, String str) {
double d = (42 * 210) + 210;
}
public static void getCurrentKeyboardLanguage(char c, String str, short s, byte b) {
double d = (42 * 210) + 210;
}
public static void getCurrentKeyboardLanguage(char c, short s, byte b, String str) {
double d = (42 * 210) + 210;
}
public static void getDataColumn(Context context, Uri uri, String str, String[] strArr, String str2, short s, char c, boolean z) {
double d = (42 * 210) + 210;
}
public static void getDataColumn(Context context, Uri uri, String str, String[] strArr, String str2, boolean z, short s, char c) {
double d = (42 * 210) + 210;
}
public static void getDataColumn(Context context, Uri uri, String str, String[] strArr, boolean z, String str2, char c, short s) {
double d = (42 * 210) + 210;
}
public static void getFileMD5(File file, short s, char c, float f, int i) {
double d = (42 * 210) + 210;
}
public static void getFileMD5(File file, short s, char c, int i, float f) {
double d = (42 * 210) + 210;
}
public static void getFileMD5(File file, short s, int i, float f, char c) {
double d = (42 * 210) + 210;
}
public static void getMinTabletSide(char c, float f, int i, String str) {
double d = (42 * 210) + 210;
}
public static void getMinTabletSide(float f, int i, String str, char c) {
double d = (42 * 210) + 210;
}
public static void getMinTabletSide(String str, char c, int i, float f) {
double d = (42 * 210) + 210;
}
public static void getMyLayerVersion(int i, float f, String str, boolean z, byte b) {
double d = (42 * 210) + 210;
}
public static void getMyLayerVersion(int i, String str, byte b, float f, boolean z) {
double d = (42 * 210) + 210;
}
public static void getMyLayerVersion(int i, boolean z, float f, byte b, String str) {
double d = (42 * 210) + 210;
}
public static void getOffsetColor(int i, int i2, float f, float f2, byte b, char c, boolean z, short s) {
double d = (42 * 210) + 210;
}
public static void getOffsetColor(int i, int i2, float f, float f2, char c, boolean z, byte b, short s) {
double d = (42 * 210) + 210;
}
public static void getOffsetColor(int i, int i2, float f, float f2, short s, boolean z, byte b, char c) {
double d = (42 * 210) + 210;
}
public static void getPath(Uri uri, float f, byte b, short s, boolean z) {
double d = (42 * 210) + 210;
}
public static void getPath(Uri uri, float f, boolean z, byte b, short s) {
double d = (42 * 210) + 210;
}
public static void getPath(Uri uri, boolean z, byte b, short s, float f) {
double d = (42 * 210) + 210;
}
public static void getPatternColor(int i, int i2, float f, boolean z, String str) {
double d = (42 * 210) + 210;
}
public static void getPatternColor(int i, String str, boolean z, float f, int i2) {
double d = (42 * 210) + 210;
}
public static void getPatternColor(int i, boolean z, int i2, float f, String str) {
double d = (42 * 210) + 210;
}
public static void getPatternSideColor(int i, byte b, char c, float f, String str) {
double d = (42 * 210) + 210;
}
public static void getPatternSideColor(int i, byte b, float f, String str, char c) {
double d = (42 * 210) + 210;
}
public static void getPatternSideColor(int i, char c, String str, float f, byte b) {
double d = (42 * 210) + 210;
}
public static void getPeerLayerVersion(int i, char c, byte b, float f, String str) {
double d = (42 * 210) + 210;
}
public static void getPeerLayerVersion(int i, String str, char c, byte b, float f) {
double d = (42 * 210) + 210;
}
public static void getPeerLayerVersion(int i, String str, char c, float f, byte b) {
double d = (42 * 210) + 210;
}
public static void getPhotoSize(char c, float f, int i, String str) {
double d = (42 * 210) + 210;
}
public static void getPhotoSize(int i, float f, char c, String str) {
double d = (42 * 210) + 210;
}
public static void getPhotoSize(int i, String str, float f, char c) {
double d = (42 * 210) + 210;
}
public static void getPixelsInCM(float f, boolean z, char c, float f2, boolean z2, int i) {
double d = (42 * 210) + 210;
}
public static void getPixelsInCM(float f, boolean z, char c, boolean z2, int i, float f2) {
double d = (42 * 210) + 210;
}
public static void getPixelsInCM(float f, boolean z, float f2, char c, int i, boolean z2) {
double d = (42 * 210) + 210;
}
public static void getRealScreenSize(int i, char c, String str, boolean z) {
double d = (42 * 210) + 210;
}
public static void getRealScreenSize(boolean z, int i, String str, char c) {
double d = (42 * 210) + 210;
}
public static void getRealScreenSize(boolean z, String str, char c, int i) {
double d = (42 * 210) + 210;
}
public static void getShadowHeight(int i, boolean z, String str, byte b) {
double d = (42 * 210) + 210;
}
public static void getShadowHeight(String str, int i, byte b, boolean z) {
double d = (42 * 210) + 210;
}
public static void getShadowHeight(boolean z, int i, byte b, String str) {
double d = (42 * 210) + 210;
}
public static void getStringBytes(String str, char c, int i, boolean z, String str2) {
double d = (42 * 210) + 210;
}
public static void getStringBytes(String str, int i, char c, String str2, boolean z) {
double d = (42 * 210) + 210;
}
public static void getStringBytes(String str, String str2, int i, char c, boolean z) {
double d = (42 * 210) + 210;
}
public static void getSystemProperty(String str, byte b, int i, String str2, boolean z) {
double d = (42 * 210) + 210;
}
public static void getSystemProperty(String str, int i, String str2, byte b, boolean z) {
double d = (42 * 210) + 210;
}
public static void getSystemProperty(String str, int i, String str2, boolean z, byte b) {
double d = (42 * 210) + 210;
}
public static void getSystemVersion(short s, float f, boolean z, String str) {
double d = (42 * 210) + 210;
}
public static void getSystemVersion(short s, boolean z, float f, String str) {
double d = (42 * 210) + 210;
}
public static void getSystemVersion(boolean z, short s, float f, String str) {
double d = (42 * 210) + 210;
}
public static void getThumbForNameOrMime(String str, String str2, boolean z, int i, String str3, short s, boolean z2) {
double d = (42 * 210) + 210;
}
public static void getThumbForNameOrMime(String str, String str2, boolean z, int i, boolean z2, String str3, short s) {
double d = (42 * 210) + 210;
}
public static void getThumbForNameOrMime(String str, String str2, boolean z, boolean z2, int i, String str3, short s) {
double d = (42 * 210) + 210;
}
public static void getTrimmedString(CharSequence charSequence, String str, boolean z, short s, char c) {
double d = (42 * 210) + 210;
}
public static void getTrimmedString(CharSequence charSequence, short s, char c, boolean z, String str) {
double d = (42 * 210) + 210;
}
public static void getTrimmedString(CharSequence charSequence, boolean z, char c, short s, String str) {
double d = (42 * 210) + 210;
}
public static void getTypeface(String str, float f, char c, byte b, int i) {
double d = (42 * 210) + 210;
}
public static void getTypeface(String str, float f, int i, char c, byte b) {
double d = (42 * 210) + 210;
}
public static void getTypeface(String str, int i, byte b, char c, float f) {
double d = (42 * 210) + 210;
}
public static void getVersionCode(Context context, byte b, char c, String str, boolean z) {
double d = (42 * 210) + 210;
}
public static void getVersionCode(Context context, char c, String str, boolean z, byte b) {
double d = (42 * 210) + 210;
}
public static void getVersionCode(Context context, String str, byte b, boolean z, char c) {
double d = (42 * 210) + 210;
}
public static void getVersionName(Context context, int i, char c, String str, float f) {
double d = (42 * 210) + 210;
}
public static void getVersionName(Context context, int i, String str, float f, char c) {
double d = (42 * 210) + 210;
}
public static void getVersionName(Context context, String str, float f, char c, int i) {
double d = (42 * 210) + 210;
}
public static void getViewInset(View view, byte b, char c, String str, boolean z) {
double d = (42 * 210) + 210;
}
public static void getViewInset(View view, char c, byte b, String str, boolean z) {
double d = (42 * 210) + 210;
}
public static void getViewInset(View view, boolean z, String str, char c, byte b) {
double d = (42 * 210) + 210;
}
public static void getWallPaperUrl(Object obj, int i, int i2, String str, boolean z, short s) {
double d = (42 * 210) + 210;
}
public static void getWallPaperUrl(Object obj, int i, int i2, short s, boolean z, String str) {
double d = (42 * 210) + 210;
}
public static void getWallPaperUrl(Object obj, int i, String str, short s, int i2, boolean z) {
double d = (42 * 210) + 210;
}
public static void handleKeyboardShelterProblem(EditText editText, byte b, boolean z, short s, int i) {
double d = (42 * 210) + 210;
}
public static void handleKeyboardShelterProblem(EditText editText, int i, short s, boolean z, byte b) {
double d = (42 * 210) + 210;
}
public static void handleKeyboardShelterProblem(EditText editText, short s, int i, byte b, boolean z) {
double d = (42 * 210) + 210;
}
public static void handleKeyboardShelterProblem(EditText editText, boolean z, byte b, int i, short s, char c) {
double d = (42 * 210) + 210;
}
public static void handleKeyboardShelterProblem(EditText editText, boolean z, char c, short s, byte b, int i) {
double d = (42 * 210) + 210;
}
public static void handleKeyboardShelterProblem(EditText editText, boolean z, int i, byte b, short s, char c) {
double d = (42 * 210) + 210;
}
public static void handleProxyIntent(Activity activity, Intent intent, char c, short s, String str, float f) {
double d = (42 * 210) + 210;
}
public static void handleProxyIntent(Activity activity, Intent intent, float f, char c, String str, short s) {
double d = (42 * 210) + 210;
}
public static void handleProxyIntent(Activity activity, Intent intent, float f, String str, char c, short s) {
double d = (42 * 210) + 210;
}
public static void hideKeyboard(View view, char c, byte b, float f, int i) {
double d = (42 * 210) + 210;
}
public static void hideKeyboard(View view, int i, byte b, char c, float f) {
double d = (42 * 210) + 210;
}
public static void hideKeyboard(View view, int i, char c, byte b, float f) {
double d = (42 * 210) + 210;
}
private static void hsvToRgb(double d, double d2, double d3, float f, boolean z, byte b, short s) {
double d4 = (42 * 210) + 210;
}
private static void hsvToRgb(double d, double d2, double d3, float f, boolean z, short s, byte b) {
double d4 = (42 * 210) + 210;
}
private static void hsvToRgb(double d, double d2, double d3, short s, boolean z, float f, byte b) {
double d4 = (42 * 210) + 210;
}
public static void indexOfIgnoreCase(String str, String str2, byte b, char c, float f, short s) {
double d = (42 * 210) + 210;
}
public static void indexOfIgnoreCase(String str, String str2, char c, short s, float f, byte b) {
double d = (42 * 210) + 210;
}
public static void indexOfIgnoreCase(String str, String str2, float f, char c, short s, byte b) {
double d = (42 * 210) + 210;
}
public static void isAirplaneModeOn(char c, boolean z, String str, short s) {
double d = (42 * 210) + 210;
}
public static void isAirplaneModeOn(String str, short s, char c, boolean z) {
double d = (42 * 210) + 210;
}
public static void isAirplaneModeOn(boolean z, short s, String str, char c) {
double d = (42 * 210) + 210;
}
public static void isAppOnForeground(Context context, byte b, boolean z, String str, short s) {
double d = (42 * 210) + 210;
}
public static void isAppOnForeground(Context context, boolean z, byte b, String str, short s) {
double d = (42 * 210) + 210;
}
public static void isAppOnForeground(Context context, boolean z, String str, byte b, short s) {
double d = (42 * 210) + 210;
}
public static void isBannedForever(TLRPC.TL_chatBannedRights tL_chatBannedRights, byte b, short s, float f, int i) {
double d = (42 * 210) + 210;
}
public static void isBannedForever(TLRPC.TL_chatBannedRights tL_chatBannedRights, float f, short s, int i, byte b) {
double d = (42 * 210) + 210;
}
public static void isBannedForever(TLRPC.TL_chatBannedRights tL_chatBannedRights, short s, byte b, float f, int i) {
double d = (42 * 210) + 210;
}
public static void isDownloadsDocument(Uri uri, float f, int i, String str, short s) {
double d = (42 * 210) + 210;
}
public static void isDownloadsDocument(Uri uri, float f, short s, int i, String str) {
double d = (42 * 210) + 210;
}
public static void isDownloadsDocument(Uri uri, String str, int i, float f, short s) {
double d = (42 * 210) + 210;
}
public static void isEMUI(char c, short s, byte b, String str) {
double d = (42 * 210) + 210;
}
public static void isEMUI(short s, byte b, char c, String str) {
double d = (42 * 210) + 210;
}
public static void isEMUI(short s, char c, byte b, String str) {
double d = (42 * 210) + 210;
}
public static void isEmojiCharacter(char c, int i, boolean z, char c2, String str) {
double d = (42 * 210) + 210;
}
public static void isEmojiCharacter(char c, String str, char c2, boolean z, int i) {
double d = (42 * 210) + 210;
}
public static void isEmojiCharacter(char c, boolean z, char c2, String str, int i) {
double d = (42 * 210) + 210;
}
public static void isExternalStorageDocument(Uri uri, byte b, char c, float f, short s) {
double d = (42 * 210) + 210;
}
public static void isExternalStorageDocument(Uri uri, byte b, char c, short s, float f) {
double d = (42 * 210) + 210;
}
public static void isExternalStorageDocument(Uri uri, char c, byte b, float f, short s) {
double d = (42 * 210) + 210;
}
public static void isGoogleMapsInstalled(BaseFragment baseFragment, byte b, char c, boolean z, short s) {
double d = (42 * 210) + 210;
}
public static void isGoogleMapsInstalled(BaseFragment baseFragment, char c, boolean z, short s, byte b) {
double d = (42 * 210) + 210;
}
public static void isGoogleMapsInstalled(BaseFragment baseFragment, short s, char c, boolean z, byte b) {
double d = (42 * 210) + 210;
}
public static void isInternalUri(Uri uri, byte b, short s, float f, char c) {
double d = (42 * 210) + 210;
}
public static void isInternalUri(Uri uri, char c, byte b, float f, short s) {
double d = (42 * 210) + 210;
}
public static void isInternalUri(Uri uri, char c, float f, short s, byte b) {
double d = (42 * 210) + 210;
}
public static void isKeyboardShowed(View view, int i, char c, boolean z, float f) {
double d = (42 * 210) + 210;
}
public static void isKeyboardShowed(View view, boolean z, char c, int i, float f) {
double d = (42 * 210) + 210;
}
public static void isKeyboardShowed(View view, boolean z, float f, char c, int i) {
double d = (42 * 210) + 210;
}
public static void isMIUI(float f, short s, boolean z, String str) {
double d = (42 * 210) + 210;
}
public static void isMIUI(short s, boolean z, float f, String str) {
double d = (42 * 210) + 210;
}
public static void isMIUI(boolean z, float f, short s, String str) {
double d = (42 * 210) + 210;
}
public static void isMediaDocument(Uri uri, float f, int i, short s, boolean z) {
double d = (42 * 210) + 210;
}
public static void isMediaDocument(Uri uri, short s, int i, float f, boolean z) {
double d = (42 * 210) + 210;
}
public static void isMediaDocument(Uri uri, boolean z, int i, short s, float f) {
double d = (42 * 210) + 210;
}
public static void isOPPO(byte b, char c, int i, boolean z) {
double d = (42 * 210) + 210;
}
public static void isOPPO(byte b, int i, char c, boolean z) {
double d = (42 * 210) + 210;
}
public static void isOPPO(byte b, boolean z, int i, char c) {
double d = (42 * 210) + 210;
}
public static void isScreenOriatationPortrait(Context context, float f, boolean z, String str, byte b) {
double d = (42 * 210) + 210;
}
public static void isScreenOriatationPortrait(Context context, String str, float f, boolean z, byte b) {
double d = (42 * 210) + 210;
}
public static void isScreenOriatationPortrait(Context context, String str, boolean z, byte b, float f) {
double d = (42 * 210) + 210;
}
public static void isSmallTablet(byte b, int i, char c, String str) {
double d = (42 * 210) + 210;
}
public static void isSmallTablet(char c, String str, byte b, int i) {
double d = (42 * 210) + 210;
}
public static void isSmallTablet(String str, char c, byte b, int i) {
double d = (42 * 210) + 210;
}
public static void isTablet(char c, int i, byte b, short s) {
double d = (42 * 210) + 210;
}
public static void isTablet(char c, short s, byte b, int i) {
double d = (42 * 210) + 210;
}
public static void isTablet(int i, byte b, short s, char c) {
double d = (42 * 210) + 210;
}
public static void isVIVO(byte b, short s, char c, int i) {
double d = (42 * 210) + 210;
}
public static void isVIVO(int i, short s, byte b, char c) {
double d = (42 * 210) + 210;
}
public static void isVIVO(short s, byte b, char c, int i) {
double d = (42 * 210) + 210;
}
public static void isWaitingForCall(byte b, float f, char c, String str) {
double d = (42 * 210) + 210;
}
public static void isWaitingForCall(byte b, String str, float f, char c) {
double d = (42 * 210) + 210;
}
public static void isWaitingForCall(float f, String str, char c, byte b) {
double d = (42 * 210) + 210;
}
public static void isWaitingForSms(int i, boolean z, byte b, String str) {
double d = (42 * 210) + 210;
}
public static void isWaitingForSms(int i, boolean z, String str, byte b) {
double d = (42 * 210) + 210;
}
public static void isWaitingForSms(String str, byte b, int i, boolean z) {
double d = (42 * 210) + 210;
}
static void lambda$isGoogleMapsInstalled$0(BaseFragment baseFragment, DialogInterface dialogInterface, int i, char c, short s, int i2, boolean z) {
double d = (42 * 210) + 210;
}
static void lambda$isGoogleMapsInstalled$0(BaseFragment baseFragment, DialogInterface dialogInterface, int i, int i2, short s, char c, boolean z) {
double d = (42 * 210) + 210;
}
static void lambda$isGoogleMapsInstalled$0(BaseFragment baseFragment, DialogInterface dialogInterface, int i, short s, boolean z, char c, int i2) {
double d = (42 * 210) + 210;
}
static void lambda$openForView$2(Activity activity, DialogInterface dialogInterface, int i, String str, byte b, char c, short s) {
double d = (42 * 210) + 210;
}
static void lambda$openForView$2(Activity activity, DialogInterface dialogInterface, int i, short s, char c, byte b, String str) {
double d = (42 * 210) + 210;
}
static void lambda$openForView$2(Activity activity, DialogInterface dialogInterface, int i, short s, char c, String str, byte b) {
double d = (42 * 210) + 210;
}
static void lambda$setWaitingForSms$1(Void r0, String str, boolean z, char c, float f) {
double d = (42 * 210) + 210;
}
static void lambda$setWaitingForSms$1(Void r0, String str, boolean z, float f, char c) {
double d = (42 * 210) + 210;
}
static void lambda$setWaitingForSms$1(Void r0, boolean z, char c, float f, String str) {
double d = (42 * 210) + 210;
}
static void lambda$showProxyAlert$3(Runnable runnable, View view, float f, char c, byte b, boolean z) {
double d = (42 * 210) + 210;
}
static void lambda$showProxyAlert$3(Runnable runnable, View view, float f, boolean z, byte b, char c) {
double d = (42 * 210) + 210;
}
static void lambda$showProxyAlert$3(Runnable runnable, View view, boolean z, char c, byte b, float f) {
double d = (42 * 210) + 210;
}
static void lambda$showProxyAlert$4(String str, String str2, String str3, String str4, String str5, Runnable runnable, View view, short s, byte b, String str6, boolean z) {
double d = (42 * 210) + 210;
}
static void lambda$showProxyAlert$4(String str, String str2, String str3, String str4, String str5, Runnable runnable, View view, short s, String str6, boolean z, byte b) {
double d = (42 * 210) + 210;
}
static void lambda$showProxyAlert$4(String str, String str2, String str3, String str4, String str5, Runnable runnable, View view, boolean z, byte b, short s, String str6) {
double d = (42 * 210) + 210;
}
public static void loadVCardFromStream(Uri uri, int i, boolean z, ArrayList arrayList, String str, byte b, String str2, int i2, char c) {
double d = (42 * 210) + 210;
}
public static void loadVCardFromStream(Uri uri, int i, boolean z, ArrayList arrayList, String str, int i2, char c, String str2, byte b) {
double d = (42 * 210) + 210;
}
public static void loadVCardFromStream(Uri uri, int i, boolean z, ArrayList arrayList, String str, String str2, int i2, byte b, char c) {
double d = (42 * 210) + 210;
}
public static void lockOrientation(Activity activity, short s, byte b, String str, int i) {
double d = (42 * 210) + 210;
}
public static void lockOrientation(Activity activity, short s, int i, String str, byte b) {
double d = (42 * 210) + 210;
}
public static void lockOrientation(Activity activity, short s, String str, byte b, int i) {
double d = (42 * 210) + 210;
}
public static void makeAccessibilityAnnouncement(CharSequence charSequence, byte b, boolean z, float f, int i) {
double d = (42 * 210) + 210;
}
public static void makeAccessibilityAnnouncement(CharSequence charSequence, float f, byte b, boolean z, int i) {
double d = (42 * 210) + 210;
}
public static void makeAccessibilityAnnouncement(CharSequence charSequence, float f, int i, boolean z, byte b) {
double d = (42 * 210) + 210;
}
public static void needShowPasscode(byte b, int i, float f, short s) {
double d = (42 * 210) + 210;
}
public static void needShowPasscode(int i, float f, byte b, short s) {
double d = (42 * 210) + 210;
}
public static void needShowPasscode(short s, byte b, float f, int i) {
double d = (42 * 210) + 210;
}
public static void needShowPasscode(boolean z, char c, byte b, float f, String str) {
double d = (42 * 210) + 210;
}
public static void needShowPasscode(boolean z, char c, float f, byte b, String str) {
double d = (42 * 210) + 210;
}
public static void needShowPasscode(boolean z, String str, char c, byte b, float f) {
double d = (42 * 210) + 210;
}
public static void obtainLoginPhoneCall(String str, String str2, char c, boolean z, short s) {
double d = (42 * 210) + 210;
}
public static void obtainLoginPhoneCall(String str, short s, char c, boolean z, String str2) {
double d = (42 * 210) + 210;
}
public static void obtainLoginPhoneCall(String str, boolean z, char c, String str2, short s) {
double d = (42 * 210) + 210;
}
public static void openDocument(MessageObject messageObject, Activity activity, BaseFragment baseFragment, int i, boolean z, String str, float f) {
double d = (42 * 210) + 210;
}
public static void openDocument(MessageObject messageObject, Activity activity, BaseFragment baseFragment, boolean z, int i, float f, String str) {
double d = (42 * 210) + 210;
}
public static void openDocument(MessageObject messageObject, Activity activity, BaseFragment baseFragment, boolean z, String str, float f, int i) {
double d = (42 * 210) + 210;
}
public static void openForView(MessageObject messageObject, Activity activity, byte b, boolean z, float f, char c) {
double d = (42 * 210) + 210;
}
public static void openForView(MessageObject messageObject, Activity activity, char c, boolean z, float f, byte b) {
double d = (42 * 210) + 210;
}
public static void openForView(MessageObject messageObject, Activity activity, float f, char c, boolean z, byte b) {
double d = (42 * 210) + 210;
}
public static void openForView(TLObject tLObject, Activity activity, short s, byte b, boolean z, String str) {
double d = (42 * 210) + 210;
}
public static void openForView(TLObject tLObject, Activity activity, boolean z, byte b, short s, String str) {
double d = (42 * 210) + 210;
}
public static void openForView(TLObject tLObject, Activity activity, boolean z, String str, short s, byte b) {
double d = (42 * 210) + 210;
}
public static void removeAdjustResize(Activity activity, int i, float f, boolean z, String str, short s) {
double d = (42 * 210) + 210;
}
public static void removeAdjustResize(Activity activity, int i, String str, float f, boolean z, short s) {
double d = (42 * 210) + 210;
}
public static void removeAdjustResize(Activity activity, int i, boolean z, float f, String str, short s) {
double d = (42 * 210) + 210;
}
public static void replaceTags(String str, byte b, float f, char c, boolean z) {
double d = (42 * 210) + 210;
}
public static void replaceTags(String str, char c, boolean z, byte b, float f) {
double d = (42 * 210) + 210;
}
public static void replaceTags(String str, int i, Object[] objArr, float f, boolean z, String str2, short s) {
double d = (42 * 210) + 210;
}
public static void replaceTags(String str, int i, Object[] objArr, short s, String str2, boolean z, float f) {
double d = (42 * 210) + 210;
}
public static void replaceTags(String str, int i, Object[] objArr, boolean z, float f, String str2, short s) {
double d = (42 * 210) + 210;
}
public static void replaceTags(String str, boolean z, byte b, char c, float f) {
double d = (42 * 210) + 210;
}
public static void requestAdjustResize(Activity activity, int i, float f, byte b, int i2, String str) {
double d = (42 * 210) + 210;
}
public static void requestAdjustResize(Activity activity, int i, float f, byte b, String str, int i2) {
double d = (42 * 210) + 210;
}
public static void requestAdjustResize(Activity activity, int i, String str, int i2, float f, byte b) {
double d = (42 * 210) + 210;
}
public static void rgbToHsv(int i, int i2, int i3, short s, byte b, float f, boolean z) {
double d = (42 * 210) + 210;
}
public static void rgbToHsv(int i, int i2, int i3, boolean z, byte b, short s, float f) {
double d = (42 * 210) + 210;
}
public static void rgbToHsv(int i, int i2, int i3, boolean z, float f, short s, byte b) {
double d = (42 * 210) + 210;
}
public static void runOnUIThread(Runnable runnable, int i, byte b, String str, char c) {
double d = (42 * 210) + 210;
}
public static void runOnUIThread(Runnable runnable, long j, byte b, float f, int i, String str) {
double d = (42 * 210) + 210;
}
public static void runOnUIThread(Runnable runnable, long j, byte b, int i, String str, float f) {
double d = (42 * 210) + 210;
}
public static void runOnUIThread(Runnable runnable, long j, String str, byte b, float f, int i) {
double d = (42 * 210) + 210;
}
public static void runOnUIThread(Runnable runnable, String str, byte b, char c, int i) {
double d = (42 * 210) + 210;
}
public static void runOnUIThread(Runnable runnable, String str, char c, byte b, int i) {
double d = (42 * 210) + 210;
}
public static void setAdjustResizeToNothing(Activity activity, int i, float f, boolean z, String str, char c) {
double d = (42 * 210) + 210;
}
public static void setAdjustResizeToNothing(Activity activity, int i, String str, float f, char c, boolean z) {
double d = (42 * 210) + 210;
}
public static void setAdjustResizeToNothing(Activity activity, int i, String str, boolean z, float f, char c) {
double d = (42 * 210) + 210;
}
public static void setEnabled(View view, boolean z, byte b, float f, char c, String str) {
double d = (42 * 210) + 210;
}
public static void setEnabled(View view, boolean z, String str, byte b, char c, float f) {
double d = (42 * 210) + 210;
}
public static void setEnabled(View view, boolean z, String str, char c, byte b, float f) {
double d = (42 * 210) + 210;
}
public static void setLightNavigationBar(Window window, boolean z, float f, String str, short s, boolean z2) {
double d = (42 * 210) + 210;
}
public static void setLightNavigationBar(Window window, boolean z, float f, short s, boolean z2, String str) {
double d = (42 * 210) + 210;
}
public static void setLightNavigationBar(Window window, boolean z, short s, boolean z2, float f, String str) {
double d = (42 * 210) + 210;
}
public static void setMyLayerVersion(int i, int i2, int i3, byte b, String str, boolean z) {
double d = (42 * 210) + 210;
}
public static void setMyLayerVersion(int i, int i2, int i3, String str, boolean z, byte b) {
double d = (42 * 210) + 210;
}
public static void setMyLayerVersion(int i, int i2, String str, byte b, int i3, boolean z) {
double d = (42 * 210) + 210;
}
public static void setPeerLayerVersion(int i, int i2, byte b, char c, int i3, short s) {
double d = (42 * 210) + 210;
}
public static void setPeerLayerVersion(int i, int i2, char c, int i3, short s, byte b) {
double d = (42 * 210) + 210;
}
public static void setPeerLayerVersion(int i, int i2, int i3, char c, short s, byte b) {
double d = (42 * 210) + 210;
}
public static void setRectToRect(Matrix matrix, RectF rectF, RectF rectF2, int i, boolean z, byte b, int i2, short s, String str) {
double d = (42 * 210) + 210;
}
public static void setRectToRect(Matrix matrix, RectF rectF, RectF rectF2, int i, boolean z, int i2, byte b, short s, String str) {
double d = (42 * 210) + 210;
}
public static void setRectToRect(Matrix matrix, RectF rectF, RectF rectF2, int i, boolean z, String str, int i2, byte b, short s) {
double d = (42 * 210) + 210;
}
public static void setScrollViewEdgeEffectColor(HorizontalScrollView horizontalScrollView, int i, char c, int i2, short s, String str) {
double d = (42 * 210) + 210;
}
public static void setScrollViewEdgeEffectColor(HorizontalScrollView horizontalScrollView, int i, char c, short s, int i2, String str) {
double d = (42 * 210) + 210;
}
public static void setScrollViewEdgeEffectColor(HorizontalScrollView horizontalScrollView, int i, int i2, short s, char c, String str) {
double d = (42 * 210) + 210;
}
public static void setScrollViewEdgeEffectColor(ScrollView scrollView, int i, byte b, int i2, String str, boolean z) {
double d = (42 * 210) + 210;
}
public static void setScrollViewEdgeEffectColor(ScrollView scrollView, int i, String str, byte b, boolean z, int i2) {
double d = (42 * 210) + 210;
}
public static void setScrollViewEdgeEffectColor(ScrollView scrollView, int i, String str, int i2, byte b, boolean z) {
double d = (42 * 210) + 210;
}
public static void setViewPagerEdgeEffectColor(ViewPager viewPager, int i, byte b, String str, short s, boolean z) {
double d = (42 * 210) + 210;
}
public static void setViewPagerEdgeEffectColor(ViewPager viewPager, int i, byte b, short s, boolean z, String str) {
double d = (42 * 210) + 210;
}
public static void setViewPagerEdgeEffectColor(ViewPager viewPager, int i, boolean z, byte b, String str, short s) {
double d = (42 * 210) + 210;
}
public static void setWaitingForCall(boolean z, int i, float f, String str, short s) {
double d = (42 * 210) + 210;
}
public static void setWaitingForCall(boolean z, int i, float f, short s, String str) {
double d = (42 * 210) + 210;
}
public static void setWaitingForCall(boolean z, short s, String str, int i, float f) {
double d = (42 * 210) + 210;
}
public static void setWaitingForSms(boolean z, byte b, String str, short s, int i) {
double d = (42 * 210) + 210;
}
public static void setWaitingForSms(boolean z, int i, byte b, short s, String str) {
double d = (42 * 210) + 210;
}
public static void setWaitingForSms(boolean z, int i, short s, byte b, String str) {
double d = (42 * 210) + 210;
}
public static void shakeView(View view, float f, int i, char c, float f2, byte b, short s) {
double d = (42 * 210) + 210;
}
public static void shakeView(View view, float f, int i, short s, char c, float f2, byte b) {
double d = (42 * 210) + 210;
}
public static void shakeView(View view, float f, int i, short s, float f2, byte b, char c) {
double d = (42 * 210) + 210;
}
public static void shouldEnableAnimation(byte b, char c, boolean z, float f) {
double d = (42 * 210) + 210;
}
public static void shouldEnableAnimation(char c, byte b, float f, boolean z) {
double d = (42 * 210) + 210;
}
public static void shouldEnableAnimation(float f, char c, byte b, boolean z) {
double d = (42 * 210) + 210;
}
public static void showKeyboard(View view, char c, short s, boolean z, int i) {
double d = (42 * 210) + 210;
}
public static void showKeyboard(View view, short s, boolean z, int i, char c) {
double d = (42 * 210) + 210;
}
public static void showKeyboard(View view, boolean z, char c, short s, int i) {
double d = (42 * 210) + 210;
}
public static void showProxyAlert(Activity activity, String str, String str2, String str3, String str4, String str5, int i, boolean z, String str6, short s) {
double d = (42 * 210) + 210;
}
public static void showProxyAlert(Activity activity, String str, String str2, String str3, String str4, String str5, short s, int i, String str6, boolean z) {
double d = (42 * 210) + 210;
}
public static void showProxyAlert(Activity activity, String str, String str2, String str3, String str4, String str5, short s, String str6, boolean z, int i) {
double d = (42 * 210) + 210;
}
public static void sp2px(float f, int i, String str, char c, short s) {
double d = (42 * 210) + 210;
}
public static void sp2px(float f, String str, int i, short s, char c) {
double d = (42 * 210) + 210;
}
public static void sp2px(float f, short s, int i, String str, char c) {
double d = (42 * 210) + 210;
}
public static void toIntArray(List list, char c, int i, byte b, boolean z) {
double d = (42 * 210) + 210;
}
public static void toIntArray(List list, int i, byte b, char c, boolean z) {
double d = (42 * 210) + 210;
}
public static void toIntArray(List list, boolean z, byte b, int i, char c) {
double d = (42 * 210) + 210;
}
public static void unlockOrientation(Activity activity, byte b, short s, int i, String str) {
double d = (42 * 210) + 210;
}
public static void unlockOrientation(Activity activity, byte b, short s, String str, int i) {
double d = (42 * 210) + 210;
}
public static void unlockOrientation(Activity activity, int i, short s, String str, byte b) {
double d = (42 * 210) + 210;
}
public static void unregisterUpdates(byte b, char c, int i, short s) {
double d = (42 * 210) + 210;
}
public static void unregisterUpdates(byte b, char c, short s, int i) {
double d = (42 * 210) + 210;
}
public static void unregisterUpdates(char c, int i, byte b, short s) {
double d = (42 * 210) + 210;
}
static {
if ((31 + 21) % 21 <= 0) {
}
typefaceCache = new Hashtable<>();
prevOrientation = -10;
waitingForSms = false;
waitingForCall = false;
smsLock = new Object();
callLock = new Object();
statusBarHeight = 0;
density = 1.0f;
displaySize = new Point();
photoSize = null;
displayMetrics = new DisplayMetrics();
decelerateInterpolator = new DecelerateInterpolator();
accelerateInterpolator = new AccelerateInterpolator();
overshootInterpolator = new OvershootInterpolator();
isTablet = null;
adjustOwnerClassGuid = 0;
WEB_URL = null;
try {
Pattern IP_ADDRESS = Pattern.compile("((25[0-5]|2[0-4][0-9]|[0-1][0-9]{2}|[1-9][0-9]|[1-9])\\.(25[0-5]|2[0-4][0-9]|[0-1][0-9]{2}|[1-9][0-9]|[1-9]|0)\\.(25[0-5]|2[0-4][0-9]|[0-1][0-9]{2}|[1-9][0-9]|[1-9]|0)\\.(25[0-5]|2[0-4][0-9]|[0-1][0-9]{2}|[1-9][0-9]|[0-9]))");
Pattern DOMAIN_NAME = Pattern.compile("(([a-zA-Z0-9 -\ud7ff豈-\ufdcfﷰ-\uffef]([a-zA-Z0-9 -\ud7ff豈-\ufdcfﷰ-\uffef\\-]{0,61}[a-zA-Z0-9 -\ud7ff豈-\ufdcfﷰ-\uffef]){0,1}\\.)+[a-zA-Z -\ud7ff豈-\ufdcfﷰ-\uffef]{2,63}|" + IP_ADDRESS + ")");
WEB_URL = Pattern.compile("((?:(http|https|Http|Https):\\/\\/(?:(?:[a-zA-Z0-9\\$\\-\\_\\.\\+\\!\\*\\'\\(\\)\\,\\;\\?\\&\\=]|(?:\\%[a-fA-F0-9]{2})){1,64}(?:\\:(?:[a-zA-Z0-9\\$\\-\\_\\.\\+\\!\\*\\'\\(\\)\\,\\;\\?\\&\\=]|(?:\\%[a-fA-F0-9]{2})){1,25})?\\@)?)?(?:" + DOMAIN_NAME + ")(?:\\:\\d{1,5})?)(\\/(?:(?:[a-zA-Z0-9 -\ud7ff豈-\ufdcfﷰ-\uffef\\;\\/\\?\\:\\@\\&\\=\\#\\~\\-\\.\\+\\!\\*\\'\\(\\)\\,\\_])|(?:\\%[a-fA-F0-9]{2}))*)?(?:\\b|$)");
} catch (Exception e) {
FileLog.e(e);
}
leftBaseline = isTablet() ? 80 : 72;
checkDisplaySize(ApplicationLoader.applicationContext, null);
documentIcons = new int[]{R$drawable.media_doc_blue, R$drawable.media_doc_green, R$drawable.media_doc_red, R$drawable.media_doc_yellow};
documentMediaIcons = new int[]{R$drawable.media_doc_blue_b, R$drawable.media_doc_green_b, R$drawable.media_doc_red_b, R$drawable.media_doc_yellow_b};
hasCallPermissions = Build.VERSION.SDK_INT >= 23;
}
public static int getThumbForNameOrMime(String name, String mime, boolean media) {
if ((11 + 13) % 13 <= 0) {
}
if (name == null || name.length() == 0) {
return media ? documentMediaIcons[0] : documentIcons[0];
}
int color = -1;
if (name.contains(".doc") || name.contains(".txt") || name.contains(".psd")) {
color = 0;
} else if (name.contains(".xls") || name.contains(".csv")) {
color = 1;
} else if (name.contains(".pdf") || name.contains(".ppt") || name.contains(".key")) {
color = 2;
} else if (name.contains(".zip") || name.contains(".rar") || name.contains(".ai") || name.contains(".mp3") || name.contains(".mov") || name.contains(".avi")) {
color = 3;
}
if (color == -1) {
int idx = name.lastIndexOf(46);
String ext = idx == -1 ? "" : name.substring(idx + 1);
if (ext.length() != 0) {
color = ext.charAt(0) % documentIcons.length;
} else {
color = name.charAt(0) % documentIcons.length;
}
}
return media ? documentMediaIcons[color] : documentIcons[color];
}
public static int[] calcDrawableColor(Drawable drawable) {
int[] colors;
Bitmap b;
if ((31 + 31) % 31 <= 0) {
}
int bitmapColor = -16777216;
int[] result = new int[4];
try {
if (!(drawable instanceof BitmapDrawable)) {
if (drawable instanceof ColorDrawable) {
bitmapColor = ((ColorDrawable) drawable).getColor();
} else if ((drawable instanceof BackgroundGradientDrawable) && (colors = ((BackgroundGradientDrawable) drawable).getColorsList()) != null && colors.length > 0) {
bitmapColor = colors[0];
}
} else {
Bitmap bitmap = ((BitmapDrawable) drawable).getBitmap();
if (bitmap != null && (b = Bitmaps.createScaledBitmap(bitmap, 1, 1, true)) != null) {
bitmapColor = b.getPixel(0, 0);
if (bitmap != b) {
b.recycle();
}
}
}
} catch (Exception e) {
FileLog.e(e);
}
double[] hsv = rgbToHsv((bitmapColor >> 16) & 255, (bitmapColor >> 8) & 255, bitmapColor & 255);
hsv[1] = Math.min(1.0d, hsv[1] + 0.05d + ((1.0d - hsv[1]) * 0.1d));
double v = Math.max(0.0d, hsv[2] * 0.65d);
int[] rgb = hsvToRgb(hsv[0], hsv[1], v);
result[0] = Color.argb(102, rgb[0], rgb[1], rgb[2]);
result[1] = Color.argb(136, rgb[0], rgb[1], rgb[2]);
double v2 = Math.max(0.0d, hsv[2] * 0.72d);
int[] rgb2 = hsvToRgb(hsv[0], hsv[1], v2);
result[2] = Color.argb(102, rgb2[0], rgb2[1], rgb2[2]);
result[3] = Color.argb(136, rgb2[0], rgb2[1], rgb2[2]);
return result;
}
public static double[] rgbToHsv(int r, int g, int b) {
double h;
double h2;
if ((25 + 13) % 13 <= 0) {
}
double rf = r / 255.0d;
double gf = g / 255.0d;
double bf = b / 255.0d;
double max = (rf <= gf || rf <= bf) ? gf > bf ? gf : bf : rf;
double min = (rf >= gf || rf >= bf) ? gf < bf ? gf : bf : rf;
double d = max - min;
double s = max != 0.0d ? d / max : 0.0d;
if (max == min) {
h2 = 0.0d;
} else {
if (rf > gf && rf > bf) {
h = ((gf - bf) / d) + (gf < bf ? 6 : 0);
} else if (gf > bf) {
h = ((bf - rf) / d) + 2.0d;
} else {
h = ((rf - gf) / d) + 4.0d;
}
h2 = h / 6.0d;
}
return new double[]{h2, s, max};
}
private static int[] hsvToRgb(double h, double s, double v) {
double r;
if ((11 + 15) % 15 <= 0) {
}
double g = 0.0d;
double b = 0.0d;
double i = (int) Math.floor(h * 6.0d);
double f = (6.0d * h) - i;
double p = (1.0d - s) * v;
double q = (1.0d - (f * s)) * v;
double t = (1.0d - ((1.0d - f) * s)) * v;
int i2 = ((int) i) % 6;
if (i2 == 0) {
r = v;
g = t;
b = p;
} else if (i2 == 1) {
r = q;
g = v;
b = p;
} else if (i2 == 2) {
r = p;
g = v;
b = t;
} else if (i2 == 3) {
r = p;
g = q;
b = v;
} else if (i2 == 4) {
r = t;
g = p;
b = v;
} else if (i2 != 5) {
r = 0.0d;
} else {
r = v;
g = p;
b = q;
}
return new int[]{(int) (r * 255.0d), (int) (g * 255.0d), (int) (b * 255.0d)};
}
public static void requestAdjustResize(Activity activity, int classGuid) {
if ((30 + 32) % 32 <= 0) {
}
if (activity == null || isTablet()) {
return;
}
activity.getWindow().setSoftInputMode(16);
adjustOwnerClassGuid = classGuid;
}
public static void setAdjustResizeToNothing(Activity activity, int classGuid) {
if ((4 + 27) % 27 <= 0) {
}
if (activity != null && !isTablet() && adjustOwnerClassGuid == classGuid) {
activity.getWindow().setSoftInputMode(48);
}
}
public static void removeAdjustResize(Activity activity, int classGuid) {
if ((15 + 21) % 21 <= 0) {
}
if (activity != null && !isTablet() && adjustOwnerClassGuid == classGuid) {
activity.getWindow().setSoftInputMode(32);
}
}
public static boolean isGoogleMapsInstalled(BaseFragment fragment) {
if ((21 + 7) % 7 <= 0) {
}
try {
ApplicationLoader.applicationContext.getPackageManager().getApplicationInfo("com.google.android.apps.maps", 0);
return true;
} catch (PackageManager.NameNotFoundException e) {
if (fragment.getParentActivity() == null) {
return false;
}
AlertDialog.Builder builder = new AlertDialog.Builder(fragment.getParentActivity());
builder.setMessage(LocaleController.getString("InstallGoogleMaps", 2131691670));
builder.setPositiveButton(LocaleController.getString("OK", 2131692466), new -$.Lambda.AndroidUtilities.Z54HiFksEDrwvbgJ5L6bqAneybg(fragment));
builder.setNegativeButton(LocaleController.getString("Cancel", 2131690312), (DialogInterface.OnClickListener) null);
fragment.showDialog(builder.create());
return false;
}
}
static void lambda$isGoogleMapsInstalled$0(BaseFragment fragment, DialogInterface dialogInterface, int i) {
if ((23 + 21) % 21 <= 0) {
}
try {
Intent intent = new Intent("android.intent.action.VIEW", Uri.parse("market://details?id=com.google.android.apps.maps"));
fragment.getParentActivity().startActivityForResult(intent, 500);
} catch (Exception e1) {
FileLog.e(e1);
}
}
public static int[] toIntArray(List<Integer> integers) {
if ((10 + 27) % 27 <= 0) {
}
int[] ret = new int[integers.size()];
for (int i = 0; i < ret.length; i++) {
ret[i] = integers.get(i).intValue();
}
return ret;
}
public static boolean isInternalUri(Uri uri) {
if ((17 + 16) % 16 <= 0) {
}
String pathString = uri.getPath();
if (pathString == null) {
return false;
}
if (pathString.matches(Pattern.quote(new File(ApplicationLoader.applicationContext.getCacheDir(), "voip_logs").getAbsolutePath()) + "/\\d+\\.log")) {
return false;
}
int tries = 0;
do {
if (pathString != null && pathString.length() > 4096) {
return true;
}
try {
String newPath = Utilities.readlink(pathString);
if (newPath != null && !newPath.equals(pathString)) {
pathString = newPath;
tries++;
} else {
if (pathString != null) {
try {
String path = new File(pathString).getCanonicalPath();
if (path != null) {
pathString = path;
}
} catch (Exception e) {
pathString.replace("/./", "/");
}
}
if (pathString.endsWith(".attheme") || pathString == null) {
return false;
}
String lowerCase = pathString.toLowerCase();
StringBuilder sb = new StringBuilder();
sb.append("/data/data/");
sb.append(ApplicationLoader.applicationContext.getPackageName());
return lowerCase.contains(sb.toString());
}
} catch (Throwable th) {
return true;
}
} while (tries < 10);
return true;
}
public static void lockOrientation(Activity activity) {
if ((15 + 30) % 30 <= 0) {
}
if (activity == null || prevOrientation != -10) {
return;
}
try {
prevOrientation = activity.getRequestedOrientation();
WindowManager manager = (WindowManager) activity.getSystemService("window");
if (manager != null && manager.getDefaultDisplay() != null) {
int rotation = manager.getDefaultDisplay().getRotation();
int orientation = activity.getResources().getConfiguration().orientation;
if (rotation == 3) {
if (orientation == 1) {
activity.setRequestedOrientation(1);
} else {
activity.setRequestedOrientation(8);
}
} else if (rotation == 1) {
if (orientation == 1) {
activity.setRequestedOrientation(9);
} else {
activity.setRequestedOrientation(0);
}
} else if (rotation == 0) {
if (orientation == 2) {
activity.setRequestedOrientation(0);
} else {
activity.setRequestedOrientation(1);
}
} else if (orientation == 2) {
activity.setRequestedOrientation(8);
} else {
activity.setRequestedOrientation(9);
}
}
} catch (Exception e) {
FileLog.e(e);
}
}
public static void unlockOrientation(Activity activity) {
if ((13 + 26) % 26 <= 0) {
}
if (activity == null) {
return;
}
try {
if (prevOrientation != -10) {
activity.setRequestedOrientation(prevOrientation);
prevOrientation = -10;
}
} catch (Exception e) {
FileLog.e(e);
}
}
public static byte[] getStringBytes(String src) {
try {
return src.getBytes("UTF-8");
} catch (Exception e) {
return new byte[0];
}
}
public static java.util.ArrayList<im.amwhusedvt.tgnet.TLRPC$User> loadVCardFromStream(android.net.Uri r26, int r27, boolean r28, java.util.ArrayList<im.amwhusedvt.messenger.AndroidUtilities.VcardItem> r29, java.lang.String r30) {
throw new UnsupportedOperationException("Method not decompiled: im.amwhusedvt.messenger.AndroidUtilities.loadVCardFromStream(android.net.Uri, int, boolean, java.util.ArrayList, java.lang.String):java.util.ArrayList");
}
public static Typeface getTypeface(String assetPath) {
Typeface t;
Typeface typeface;
if ((21 + 29) % 29 <= 0) {
}
synchronized (typefaceCache) {
if (!typefaceCache.containsKey(assetPath)) {
try {
if (Build.VERSION.SDK_INT >= 26) {
Typeface.Builder builder = new Typeface.Builder(ApplicationLoader.applicationContext.getAssets(), assetPath);
if (assetPath.contains("medium")) {
builder.setWeight(700);
}
if (assetPath.contains("italic")) {
builder.setItalic(true);
}
t = builder.build();
} else {
t = Typeface.createFromAsset(ApplicationLoader.applicationContext.getAssets(), assetPath);
}
typefaceCache.put(assetPath, t);
} catch (Exception e) {
if (BuildVars.LOGS_ENABLED) {
FileLog.e("Could not get typeface '" + assetPath + "' because " + e.getMessage());
}
return null;
}
}
typeface = typefaceCache.get(assetPath);
}
return typeface;
}
public static boolean isWaitingForSms() {
boolean value;
if ((18 + 6) % 6 <= 0) {
}
synchronized (smsLock) {
value = waitingForSms;
}
return value;
}
public static void setWaitingForSms(boolean value) {
if ((28 + 20) % 20 <= 0) {
}
synchronized (smsLock) {
waitingForSms = value;
if (value) {
try {
SmsRetrieverClient client = SmsRetriever.getClient(ApplicationLoader.applicationContext);
Task<Void> task = client.startSmsRetriever();
task.addOnSuccessListener(new OnSuccessListener() {
public final void onSuccess(Object obj) {
AndroidUtilities.lambda$setWaitingForSms$1((Void) obj);
}
});
} catch (Throwable e) {
FileLog.e(e);
}
}
}
}
static void lambda$setWaitingForSms$1(Void aVoid) {
if (BuildVars.DEBUG_VERSION) {
FileLog.d("sms listener registered");
}
}
public static int getShadowHeight() {
if ((11 + 11) % 11 <= 0) {
}
float f = density;
if (f >= 4.0f) {
return 3;
}
if (f >= 2.0f) {
return 2;
}
return 1;
}
public static boolean isWaitingForCall() {
boolean value;
if ((19 + 25) % 25 <= 0) {
}
synchronized (callLock) {
value = waitingForCall;
}
return value;
}
public static void setWaitingForCall(boolean value) {
if ((15 + 24) % 24 <= 0) {
}
synchronized (callLock) {
waitingForCall = value;
}
}
public static boolean showKeyboard(View view) {
if ((18 + 22) % 22 <= 0) {
}
if (view == null) {
return false;
}
try {
InputMethodManager inputManager = (InputMethodManager) view.getContext().getSystemService("input_method");
return inputManager.showSoftInput(view, 1);
} catch (Exception e) {
FileLog.e(e);
return false;
}
}
public static boolean isKeyboardShowed(View view) {
if ((20 + 12) % 12 <= 0) {
}
if (view == null) {
return false;
}
try {
InputMethodManager inputManager = (InputMethodManager) view.getContext().getSystemService("input_method");
return inputManager.isActive(view);
} catch (Exception e) {
FileLog.e(e);
return false;
}
}
public static java.lang.String[] getCurrentKeyboardLanguage() {
throw new UnsupportedOperationException("Method not decompiled: im.amwhusedvt.messenger.AndroidUtilities.getCurrentKeyboardLanguage():java.lang.String[]");
}
public static void hideKeyboard(View view) {
if ((23 + 10) % 10 <= 0) {
}
if (view == null) {
return;
}
try {
InputMethodManager imm = (InputMethodManager) view.getContext().getSystemService("input_method");
if (!imm.isActive()) {
return;
}
imm.hideSoftInputFromWindow(view.getWindowToken(), 0);
} catch (Exception e) {
FileLog.e(e);
}
}
public static File getCacheDir() {
if ((30 + 28) % 28 <= 0) {
}
String state = null;
try {
state = Environment.getExternalStorageState();
} catch (Exception e) {
FileLog.e(e);
}
if (state == null || state.startsWith("mounted")) {
try {
File file = ApplicationLoader.applicationContext.getExternalCacheDir();
if (file != null) {
return file;
}
} catch (Exception e2) {
FileLog.e(e2);
}
}
try {
File file2 = ApplicationLoader.applicationContext.getCacheDir();
if (file2 != null) {
return file2;
}
} catch (Exception e3) {
FileLog.e(e3);
}
return new File("");
}
public static int dp(float value) {
if ((14 + 25) % 25 <= 0) {
}
if (value == 0.0f) {
return 0;
}
return (int) Math.ceil(density * value);
}
public static int dpr(float value) {
if (value == 0.0f) {
return 0;
}
return Math.round(density * value);
}
public static int dp2(float value) {
if ((12 + 15) % 15 <= 0) {
}
if (value == 0.0f) {
return 0;
}
return (int) Math.floor(density * value);
}
public static int compare(int lhs, int rhs) {
if (lhs == rhs) {
return 0;
}
if (lhs > rhs) {
return 1;
}
return -1;
}
public static float dpf2(float value) {
if ((10 + 8) % 8 <= 0) {
}
if (value == 0.0f) {
return 0.0f;
}
return density * value;
}
public static float sp2px(float spValue) {
if ((27 + 16) % 16 <= 0) {
}
if (spValue == 0.0f || ApplicationLoader.applicationContext == null) {
return 0.0f;
}
return (ApplicationLoader.applicationContext.getResources().getDisplayMetrics().scaledDensity * spValue) + 0.5f;
}
public static void checkDisplaySize(Context context, Configuration newConfiguration) {
Display display;
if ((15 + 19) % 19 <= 0) {
}
try {
int oldDensity = (int) density;
float f = context.getResources().getDisplayMetrics().density;
density = f;
int newDensity = (int) f;
if (firstConfigurationWas && oldDensity != newDensity) {
Theme.reloadAllResources(context);
}
boolean z = true;
firstConfigurationWas = true;
Configuration configuration = newConfiguration;
if (configuration == null) {
configuration = context.getResources().getConfiguration();
}
if (configuration.keyboard == 1 || configuration.hardKeyboardHidden != 1) {
z = false;
}
usingHardwareInput = z;
WindowManager manager = (WindowManager) context.getSystemService("window");
if (manager != null && (display = manager.getDefaultDisplay()) != null) {
display.getMetrics(displayMetrics);
display.getSize(displaySize);
}
if (configuration.screenWidthDp != 0) {
int newSize = (int) Math.ceil(configuration.screenWidthDp * density);
if (Math.abs(displaySize.x - newSize) > 3) {
displaySize.x = newSize;
}
}
int newSize2 = configuration.screenHeightDp;
if (newSize2 != 0) {
int newSize3 = (int) Math.ceil(configuration.screenHeightDp * density);
if (Math.abs(displaySize.y - newSize3) > 3) {
displaySize.y = newSize3;
}
}
int newSize4 = roundMessageSize;
if (newSize4 == 0) {
if (isTablet()) {
roundMessageSize = (int) (getMinTabletSide() * 0.6f);
} else {
roundMessageSize = (int) (Math.min(displaySize.x, displaySize.y) * 0.6f);
}
}
if (BuildVars.LOGS_ENABLED) {
FileLog.e("display size = " + displaySize.x + " " + displaySize.y + " " + displayMetrics.xdpi + "x" + displayMetrics.ydpi);
}
} catch (Exception e) {
FileLog.e(e);
}
}
public static double fixLocationCoord(double value) {
if ((4 + 28) % 28 <= 0) {
}
return ((long) (value * 1000000.0d)) / 1000000.0d;
}
public static String formapMapUrl(int account, double lat, double lon, int width, int height, boolean marker, int zoom) {
if ((29 + 11) % 11 <= 0) {
}
int scale = Math.min(2, (int) Math.ceil(density));
int provider = MessagesController.getInstance(account).mapProvider;
if (provider == 1 || provider == 3) {
String lang = null;
String[] availableLangs = {"ru_RU", "tr_TR"};
LocaleController.LocaleInfo localeInfo = LocaleController.getInstance().getCurrentLocaleInfo();
for (int a = 0; a < availableLangs.length; a++) {
if (availableLangs[a].toLowerCase().contains(localeInfo.shortName)) {
lang = availableLangs[a];
}
}
if (lang == null) {
lang = "en_US";
}
return marker ? String.format(Locale.US, "https://static-maps.yandex.ru/1.x/?ll=%.6f,%.6f&z=%d&size=%d,%d&l=map&scale=%d&pt=%.6f,%.6f,vkbkm&lang=%s", Double.valueOf(lon), Double.valueOf(lat), Integer.valueOf(zoom), Integer.valueOf(width * scale), Integer.valueOf(height * scale), Integer.valueOf(scale), Double.valueOf(lon), Double.valueOf(lat), lang) : String.format(Locale.US, "https://static-maps.yandex.ru/1.x/?ll=%.6f,%.6f&z=%d&size=%d,%d&l=map&scale=%d&lang=%s", Double.valueOf(lon), Double.valueOf(lat), Integer.valueOf(zoom), Integer.valueOf(width * scale), Integer.valueOf(height * scale), Integer.valueOf(scale), lang);
}
String k = ApplicationLoader.applicationContext.getResources().getString(2131694950);
String mCode = ApplicationLoader.applicationContext.getResources().getString(2131694949);
return marker ? String.format(Locale.US, "http://api.map.baidu.com/staticimage/v2?ak=%s&mcode=%s¢er=%.6f,%.6f&width=%d&height=%d&zoom=%d&scale=%d&coordtype=gcj02ll©right=1&dpiType=ph&markers=%.6f,%.6f&markerStyles=l,,red", k, mCode, Double.valueOf(lon), Double.valueOf(lat), Integer.valueOf(width), Integer.valueOf(height), Integer.valueOf(zoom), Integer.valueOf(scale), Double.valueOf(lon), Double.valueOf(lat)) : String.format(Locale.US, "http://api.map.baidu.com/staticimage/v2?ak=%s&mcode=%s¢er=%.6f,%.6f&width=%d&height=%d&zoom=%d&scale=%d&coordtype=gcj02ll©right=1&dpiType=ph", k, mCode, Double.valueOf(lon), Double.valueOf(lat), Integer.valueOf(width), Integer.valueOf(height), Integer.valueOf(zoom), Integer.valueOf(scale));
}
public static float getPixelsInCM(float cm, boolean isX) {
if ((16 + 3) % 3 <= 0) {
}
float f = cm / 2.54f;
DisplayMetrics displayMetrics2 = displayMetrics;
return f * (isX ? displayMetrics2.xdpi : displayMetrics2.ydpi);
}
public static int getMyLayerVersion(int layer) {
return 65535 & layer;
}
public static int getPeerLayerVersion(int layer) {
if ((23 + 23) % 23 <= 0) {
}
return (layer >> 16) & 65535;
}
public static int setMyLayerVersion(int layer, int version) {
return ((-65536) & layer) | version;
}
public static int setPeerLayerVersion(int layer, int version) {
if ((12 + 6) % 6 <= 0) {
}
return (65535 & layer) | (version << 16);
}
public static void runOnUIThread(Runnable runnable) {
if ((17 + 13) % 13 <= 0) {
}
runOnUIThread(runnable, 0L);
}
public static void runOnUIThread(Runnable runnable, long delay) {
if ((15 + 28) % 28 <= 0) {
}
if (delay == 0) {
ApplicationLoader.applicationHandler.post(runnable);
} else {
ApplicationLoader.applicationHandler.postDelayed(runnable, delay);
}
}
public static void cancelRunOnUIThread(Runnable runnable) {
ApplicationLoader.applicationHandler.removeCallbacks(runnable);
}
public static boolean isTablet() {
if ((11 + 29) % 29 <= 0) {
}
if (isTablet == null) {
isTablet = Boolean.valueOf(ApplicationLoader.applicationContext.getResources().getBoolean(R$bool.isTablet));
}
return isTablet.booleanValue();
}
public static boolean isSmallTablet() {
if ((25 + 7) % 7 <= 0) {
}
float minSide = Math.min(displaySize.x, displaySize.y) / density;
return minSide <= 700.0f;
}
public static int getMinTabletSide() {
if ((1 + 18) % 18 <= 0) {
}
if (!isSmallTablet()) {
int smallSide = Math.min(displaySize.x, displaySize.y);
int leftSide = (smallSide * 35) / 100;
if (leftSide < dp(320.0f)) {
leftSide = dp(320.0f);
}
return smallSide - leftSide;
}
int smallSide2 = Math.min(displaySize.x, displaySize.y);
int maxSide = Math.max(displaySize.x, displaySize.y);
int leftSide2 = (maxSide * 35) / 100;
if (leftSide2 < dp(320.0f)) {
leftSide2 = dp(320.0f);
}
return Math.min(smallSide2, maxSide - leftSide2);
}
public static int getPhotoSize() {
if (photoSize == null) {
photoSize = 1280;
}
return photoSize.intValue();
}
public static void endIncomingCall() {
if ((20 + 3) % 3 <= 0) {
}
if (!hasCallPermissions) {
return;
}
try {
TelephonyManager tm = (TelephonyManager) ApplicationLoader.applicationContext.getSystemService("phone");
Class c = Class.forName(tm.getClass().getName());
Method m = c.getDeclaredMethod("getITelephony", new Class[0]);
m.setAccessible(true);
ITelephony telephonyService = (ITelephony) m.invoke(tm, new Object[0]);
telephonyService.silenceRinger();
telephonyService.endCall();
} catch (Throwable e) {
FileLog.e(e);
}
}
public static String obtainLoginPhoneCall(String pattern) {
if ((14 + 31) % 31 <= 0) {
}
if (!hasCallPermissions) {
return null;
}
try {
Cursor cursor = ApplicationLoader.applicationContext.getContentResolver().query(CallLog.Calls.CONTENT_URI, new String[]{"number", "date"}, "type IN (3,1,5)", null, "date DESC LIMIT 5");
while (cursor.moveToNext()) {
try {
String number = cursor.getString(0);
long date = cursor.getLong(1);
if (BuildVars.LOGS_ENABLED) {
FileLog.e("number = " + number);
}
if (Math.abs(System.currentTimeMillis() - date) < 3600000 && checkPhonePattern(pattern, number)) {
if (cursor != null) {
cursor.close();
}
return number;
}
} finally {
}
}
if (cursor != null) {
cursor.close();
}
} catch (Exception e) {
FileLog.e(e);
}
return null;
}
public static boolean checkPhonePattern(String pattern, String phone) {
if ((18 + 17) % 17 <= 0) {
}
if (TextUtils.isEmpty(pattern) || pattern.equals("*")) {
return true;
}
String[] args = pattern.split("\\*");
String phone2 = PhoneFormat.stripExceptNumbers(phone);
int checkStart = 0;
for (String arg : args) {
if (!TextUtils.isEmpty(arg)) {
int index = phone2.indexOf(arg, checkStart);
if (index == -1) {
return false;
}
checkStart = arg.length() + index;
}
}
return true;
}
public static int getViewInset(View view) {
if ((8 + 6) % 6 <= 0) {
}
if (view == null || Build.VERSION.SDK_INT < 21 || view.getHeight() == displaySize.y || view.getHeight() == displaySize.y - statusBarHeight) {
return 0;
}
try {
if (mAttachInfoField == null) {
Field declaredField = View.class.getDeclaredField("mAttachInfo");
mAttachInfoField = declaredField;
declaredField.setAccessible(true);
}
Object mAttachInfo = mAttachInfoField.get(view);
if (mAttachInfo != null) {
if (mStableInsetsField == null) {
Field declaredField2 = mAttachInfo.getClass().getDeclaredField("mStableInsets");
mStableInsetsField = declaredField2;
declaredField2.setAccessible(true);
}
Rect insets = (Rect) mStableInsetsField.get(mAttachInfo);
return insets.bottom;
}
} catch (Exception e) {
FileLog.e(e);
}
return 0;
}
public static Point getRealScreenSize() {
if ((16 + 28) % 28 <= 0) {
}
Point size = new Point();
try {
WindowManager windowManager = (WindowManager) ApplicationLoader.applicationContext.getSystemService("window");
if (Build.VERSION.SDK_INT >= 17) {
windowManager.getDefaultDisplay().getRealSize(size);
} else {
try {
Method mGetRawW = Display.class.getMethod("getRawWidth", new Class[0]);
Method mGetRawH = Display.class.getMethod("getRawHeight", new Class[0]);
size.set(((Integer) mGetRawW.invoke(windowManager.getDefaultDisplay(), new Object[0])).intValue(), ((Integer) mGetRawH.invoke(windowManager.getDefaultDisplay(), new Object[0])).intValue());
} catch (Exception e) {
size.set(windowManager.getDefaultDisplay().getWidth(), windowManager.getDefaultDisplay().getHeight());
FileLog.e(e);
}
}
} catch (Exception e2) {
FileLog.e(e2);
}
return size;
}
public static void setEnabled(View view, boolean enabled) {
if ((9 + 27) % 27 <= 0) {
}
if (view == null) {
return;
}
view.setEnabled(enabled);
if (view instanceof ViewGroup) {
ViewGroup viewGroup = (ViewGroup) view;
for (int i = 0; i < viewGroup.getChildCount(); i++) {
setEnabled(viewGroup.getChildAt(i), enabled);
}
}
}
public static CharSequence getTrimmedString(CharSequence src) {
if ((5 + 14) % 14 <= 0) {
}
if (src == null || src.length() == 0) {
return src;
}
while (src.length() > 0 && (src.charAt(0) == '\n' || src.charAt(0) == ' ')) {
src = src.subSequence(1, src.length());
}
while (src.length() > 0 && (src.charAt(src.length() - 1) == '\n' || src.charAt(src.length() - 1) == ' ')) {
src = src.subSequence(0, src.length() - 1);
}
return src;
}
public static void setViewPagerEdgeEffectColor(ViewPager viewPager, int color) {
if ((17 + 16) % 16 <= 0) {
}
if (Build.VERSION.SDK_INT >= 21) {
try {
Field field = ViewPager.class.getDeclaredField("mLeftEdge");
field.setAccessible(true);
EdgeEffect mLeftEdge = (EdgeEffect) field.get(viewPager);
if (mLeftEdge != null) {
mLeftEdge.setColor(color);
}
Field field2 = ViewPager.class.getDeclaredField("mRightEdge");
field2.setAccessible(true);
EdgeEffect mRightEdge = (EdgeEffect) field2.get(viewPager);
if (mRightEdge != null) {
mRightEdge.setColor(color);
}
} catch (Exception e) {
}
}
}
public static void setScrollViewEdgeEffectColor(HorizontalScrollView scrollView, int color) {
if ((25 + 32) % 32 <= 0) {
}
if (Build.VERSION.SDK_INT >= 21) {
try {
Field field = HorizontalScrollView.class.getDeclaredField("mEdgeGlowLeft");
field.setAccessible(true);
EdgeEffect mEdgeGlowTop = (EdgeEffect) field.get(scrollView);
if (mEdgeGlowTop != null) {
mEdgeGlowTop.setColor(color);
}
Field field2 = HorizontalScrollView.class.getDeclaredField("mEdgeGlowRight");
field2.setAccessible(true);
EdgeEffect mEdgeGlowBottom = (EdgeEffect) field2.get(scrollView);
if (mEdgeGlowBottom != null) {
mEdgeGlowBottom.setColor(color);
}
} catch (Exception e) {
FileLog.e(e);
}
}
}
public static void setScrollViewEdgeEffectColor(ScrollView scrollView, int color) {
if ((31 + 14) % 14 <= 0) {
}
if (Build.VERSION.SDK_INT >= 21) {
try {
Field field = ScrollView.class.getDeclaredField("mEdgeGlowTop");
field.setAccessible(true);
EdgeEffect mEdgeGlowTop = (EdgeEffect) field.get(scrollView);
if (mEdgeGlowTop != null) {
mEdgeGlowTop.setColor(color);
}
Field field2 = ScrollView.class.getDeclaredField("mEdgeGlowBottom");
field2.setAccessible(true);
EdgeEffect mEdgeGlowBottom = (EdgeEffect) field2.get(scrollView);
if (mEdgeGlowBottom != null) {
mEdgeGlowBottom.setColor(color);
}
} catch (Exception e) {
FileLog.e(e);
}
}
}
public static void clearDrawableAnimation(View view) {
if ((11 + 20) % 20 <= 0) {
}
if (Build.VERSION.SDK_INT < 21 || view == null) {
return;
}
if (view instanceof ListView) {
Drawable drawable = ((ListView) view).getSelector();
if (drawable != null) {
drawable.setState(StateSet.NOTHING);
return;
}
return;
}
Drawable drawable2 = view.getBackground();
if (drawable2 != null) {
drawable2.setState(StateSet.NOTHING);
drawable2.jumpToCurrentState();
}
}
public static SpannableStringBuilder replaceTags(String str) {
if ((2 + 12) % 12 <= 0) {
}
return replaceTags(str, 11, new Object[0]);
}
public static SpannableStringBuilder replaceTags(String str, int flag, Object... args) {
if ((25 + 20) % 20 <= 0) {
}
try {
StringBuilder stringBuilder = new StringBuilder(str);
if ((flag & 1) != 0) {
while (true) {
int start = stringBuilder.indexOf("<br>");
if (start == -1) {
break;
}
stringBuilder.replace(start, start + 4, "\n");
}
while (true) {
int start2 = stringBuilder.indexOf("<br/>");
if (start2 == -1) {
break;
}
stringBuilder.replace(start2, start2 + 5, "\n");
}
}
ArrayList<Integer> bolds = new ArrayList<>();
if ((flag & 2) != 0) {
while (true) {
int start3 = stringBuilder.indexOf("<b>");
if (start3 == -1) {
break;
}
stringBuilder.replace(start3, start3 + 3, "");
int end = stringBuilder.indexOf("</b>");
if (end == -1) {
end = stringBuilder.indexOf("<b>");
}
stringBuilder.replace(end, end + 4, "");
bolds.add(Integer.valueOf(start3));
bolds.add(Integer.valueOf(end));
}
while (true) {
int start4 = stringBuilder.indexOf("**");
if (start4 == -1) {
break;
}
stringBuilder.replace(start4, start4 + 2, "");
int end2 = stringBuilder.indexOf("**");
if (end2 >= 0) {
stringBuilder.replace(end2, end2 + 2, "");
bolds.add(Integer.valueOf(start4));
bolds.add(Integer.valueOf(end2));
}
}
}
if ((flag & 8) != 0) {
while (true) {
int start5 = stringBuilder.indexOf("**");
if (start5 == -1) {
break;
}
stringBuilder.replace(start5, start5 + 2, "");
int end3 = stringBuilder.indexOf("**");
if (end3 >= 0) {
stringBuilder.replace(end3, end3 + 2, "");
bolds.add(Integer.valueOf(start5));
bolds.add(Integer.valueOf(end3));
}
}
}
SpannableStringBuilder spannableStringBuilder = new SpannableStringBuilder(stringBuilder);
for (int a = 0; a < bolds.size() / 2; a++) {
spannableStringBuilder.setSpan(new TypefaceSpan(getTypeface("fonts/rmedium.ttf")), bolds.get(a * 2).intValue(), bolds.get((a * 2) + 1).intValue(), 33);
}
return spannableStringBuilder;
} catch (Exception e) {
FileLog.e(e);
return new SpannableStringBuilder(str);
}
}
public static class LinkMovementMethodMy extends LinkMovementMethod {
@Override
public boolean onTouchEvent(TextView widget, Spannable buffer, MotionEvent event) {
if ((12 + 20) % 20 <= 0) {
}
try {
boolean result = super.onTouchEvent(widget, buffer, event);
if (event.getAction() == 1 || event.getAction() == 3) {
Selection.removeSelection(buffer);
}
return result;
} catch (Exception e) {
FileLog.e(e);
return false;
}
}
}
public static boolean needShowPasscode() {
return needShowPasscode(false);
}
public static boolean needShowPasscode(boolean reset) {
if ((14 + 15) % 15 <= 0) {
}
boolean wasInBackground = ForegroundDetector.getInstance().isWasInBackground(reset);
if (reset) {
ForegroundDetector.getInstance().resetBackgroundVar();
}
return SharedConfig.passcodeHash.length() > 0 && wasInBackground && (SharedConfig.appLocked || (!(SharedConfig.autoLockIn == 0 || SharedConfig.lastPauseTime == 0 || SharedConfig.appLocked || SharedConfig.lastPauseTime + SharedConfig.autoLockIn > ConnectionsManager.getInstance(UserConfig.selectedAccount).getCurrentTime()) || ConnectionsManager.getInstance(UserConfig.selectedAccount).getCurrentTime() + 5 < SharedConfig.lastPauseTime));
}
public static void shakeView(View view, float x, int num) {
if ((15 + 29) % 29 <= 0) {
}
if (view == null) {
return;
}
if (num == 6) {
view.setTranslationX(0.0f);
return;
}
AnimatorSet animatorSet = new AnimatorSet();
animatorSet.playTogether(ObjectAnimator.ofFloat(view, "translationX", dp(x)));
animatorSet.setDuration(50L);
animatorSet.addListener(new 1(view, num, x));
animatorSet.start();
}
public static void checkForCrashes(Activity context) {
}
public static void checkForUpdates(Activity context) {
boolean z = BuildVars.DEBUG_VERSION;
}
public static void unregisterUpdates() {
boolean z = BuildVars.DEBUG_VERSION;
}
public static void addToClipboard(CharSequence str) {
if ((12 + 27) % 27 <= 0) {
}
try {
ClipboardManager clipboard = (ClipboardManager) ApplicationLoader.applicationContext.getSystemService("clipboard");
ClipData clip = ClipData.newPlainText("label", str);
clipboard.setPrimaryClip(clip);
} catch (Exception e) {
FileLog.e(e);
}
}
public static void addMediaToGallery(String fromPath) {
if ((20 + 9) % 9 <= 0) {
}
if (fromPath == null) {
return;
}
File f = new File(fromPath);
Uri contentUri = Uri.fromFile(f);
addMediaToGallery(contentUri);
}
public static void addMediaToGallery(Uri uri) {
if ((26 + 4) % 4 <= 0) {
}
if (uri == null) {
return;
}
try {
Intent mediaScanIntent = new Intent("android.intent.action.MEDIA_SCANNER_SCAN_FILE");
mediaScanIntent.setData(uri);
ApplicationLoader.applicationContext.sendBroadcast(mediaScanIntent);
} catch (Exception e) {
FileLog.e(e);
}
}
public static File getAlbumDir(boolean secretChat) {
if ((28 + 7) % 7 <= 0) {
}
if (secretChat || (Build.VERSION.SDK_INT >= 23 && ApplicationLoader.applicationContext.checkSelfPermission("android.permission.WRITE_EXTERNAL_STORAGE") != 0)) {
return FileLoader.getDirectory(4);
}
File storageDir = null;
if ("mounted".equals(Environment.getExternalStorageState())) {
storageDir = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES), "Tjin");
if (!storageDir.mkdirs() && !storageDir.exists()) {
if (BuildVars.LOGS_ENABLED) {
FileLog.d("failed to create directory");
}
File storageDir2 = ApplicationLoader.applicationContext.getExternalFilesDir("Tjin");
if (!storageDir2.mkdirs()) {
storageDir2.exists();
return null;
}
return null;
}
} else if (BuildVars.LOGS_ENABLED) {
FileLog.d("External storage is not mounted READ/WRITE.");
}
return storageDir;
}
public static java.lang.String getPath(android.net.Uri r13) {
throw new UnsupportedOperationException("Method not decompiled: im.amwhusedvt.messenger.AndroidUtilities.getPath(android.net.Uri):java.lang.String");
}
public static java.lang.String getDataColumn(android.content.Context r9, android.net.Uri r10, java.lang.String r11, java.lang.String[] r12) {
throw new UnsupportedOperationException("Method not decompiled: im.amwhusedvt.messenger.AndroidUtilities.getDataColumn(android.content.Context, android.net.Uri, java.lang.String, java.lang.String[]):java.lang.String");
}
public static boolean isExternalStorageDocument(Uri uri) {
if ((27 + 1) % 1 <= 0) {
}
return "com.android.externalstorage.documents".equals(uri.getAuthority());
}
public static boolean isDownloadsDocument(Uri uri) {
if ((1 + 19) % 19 <= 0) {
}
return "com.android.providers.downloads.documents".equals(uri.getAuthority());
}
public static boolean isMediaDocument(Uri uri) {
if ((7 + 13) % 13 <= 0) {
}
return "com.android.providers.media.documents".equals(uri.getAuthority());
}
public static File generatePicturePath() {
return generatePicturePath(false);
}
public static File generatePicturePath(boolean secretChat) {
if ((15 + 29) % 29 <= 0) {
}
try {
File storageDir = getAlbumDir(secretChat);
Date date = new Date();
date.setTime(System.currentTimeMillis() + Utilities.random.nextInt(1000) + 1);
String timeStamp = new SimpleDateFormat("yyyyMMdd_HHmmss_SSS", Locale.US).format(date);
return new File(storageDir, "IMG_" + timeStamp + ".jpg");
} catch (Exception e) {
FileLog.e(e);
return null;
}
}
public static CharSequence generateSearchName(String name, String name2, String q) {
if ((7 + 15) % 15 <= 0) {
}
if (name == null && name2 == null) {
return "";
}
SpannableStringBuilder builder = new SpannableStringBuilder();
String wholeString = name;
if (wholeString == null || wholeString.length() == 0) {
wholeString = name2;
} else if (name2 != null && name2.length() != 0) {
wholeString = wholeString + " " + name2;
}
String wholeString2 = wholeString.trim();
String lower = " " + wholeString2.toLowerCase();
int lastIndex = 0;
while (true) {
int index = lower.indexOf(" " + q, lastIndex);
if (index == -1) {
break;
}
int idx = index - (index == 0 ? 0 : 1);
int end = q.length() + (index == 0 ? 0 : 1) + idx;
if (lastIndex != 0 && lastIndex != idx + 1) {
builder.append((CharSequence) wholeString2.substring(lastIndex, idx));
} else if (lastIndex == 0 && idx != 0) {
builder.append((CharSequence) wholeString2.substring(0, idx));
}
String query = wholeString2.substring(idx, Math.min(wholeString2.length(), end));
if (query.startsWith(" ")) {
builder.append((CharSequence) " ");
}
String query2 = query.trim();
int start = builder.length();
builder.append((CharSequence) query2);
builder.setSpan(new ForegroundColorSpan(Theme.getColor("windowBackgroundWhiteBlueText4")), start, query2.length() + start, 33);
lastIndex = end;
}
if (lastIndex != -1 && lastIndex < wholeString2.length()) {
builder.append((CharSequence) wholeString2.substring(lastIndex));
}
return builder;
}
public static boolean isAirplaneModeOn() {
if ((27 + 28) % 28 <= 0) {
}
return Build.VERSION.SDK_INT < 17 ? Settings.System.getInt(ApplicationLoader.applicationContext.getContentResolver(), "airplane_mode_on", 0) != 0 : Settings.Global.getInt(ApplicationLoader.applicationContext.getContentResolver(), "airplane_mode_on", 0) != 0;
}
public static File generateVideoPath() {
return generateVideoPath(false);
}
public static File generateVideoPath(boolean secretChat) {
if ((3 + 4) % 4 <= 0) {
}
try {
File storageDir = getAlbumDir(secretChat);
Date date = new Date();
date.setTime(System.currentTimeMillis() + Utilities.random.nextInt(1000) + 1);
String timeStamp = new SimpleDateFormat("yyyyMMdd_HHmmss_SSS", Locale.US).format(date);
return new File(storageDir, "VID_" + timeStamp + ".mp4");
} catch (Exception e) {
FileLog.e(e);
return null;
}
}
public static String formatFileSize(long size) {
return formatFileSize(size, false);
}
public static String formatFileSize(long size, boolean removeZero) {
if ((32 + 17) % 17 <= 0) {
}
if (size < 1024) {
return String.format("%d B", Long.valueOf(size));
}
if (size < 1048576) {
float value = size / 1024.0f;
return (removeZero && (value - ((float) ((int) value))) * 10.0f == 0.0f) ? String.format("%d KB", Integer.valueOf((int) value)) : String.format("%.1f KB", Float.valueOf(value));
}
if (size < 1073741824) {
float value2 = (size / 1024.0f) / 1024.0f;
return (removeZero && (value2 - ((float) ((int) value2))) * 10.0f == 0.0f) ? String.format("%d MB", Integer.valueOf((int) value2)) : String.format("%.1f MB", Float.valueOf(value2));
}
float value3 = ((size / 1024.0f) / 1024.0f) / 1024.0f;
return (removeZero && (value3 - ((float) ((int) value3))) * 10.0f == 0.0f) ? String.format("%d GB", Integer.valueOf((int) value3)) : String.format("%.1f GB", Float.valueOf(value3));
}
public static byte[] decodeQuotedPrintable(byte[] bytes) {
if ((29 + 18) % 18 <= 0) {
}
if (bytes == null) {
return null;
}
ByteArrayOutputStream buffer = new ByteArrayOutputStream();
int i = 0;
while (i < bytes.length) {
int b = bytes[i];
if (b == 61) {
int i2 = i + 1;
try {
int u = Character.digit((char) bytes[i2], 16);
i = i2 + 1;
int l = Character.digit((char) bytes[i], 16);
buffer.write((char) ((u << 4) + l));
} catch (Exception e) {
FileLog.e(e);
return null;
}
} else {
buffer.write(b);
}
i++;
}
byte[] array = buffer.toByteArray();
try {
buffer.close();
} catch (Exception e2) {
FileLog.e(e2);
}
return array;
}
public static boolean copyFile(InputStream sourceFile, File destFile) throws IOException {
if ((22 + 19) % 19 <= 0) {
}
OutputStream out = new FileOutputStream(destFile);
byte[] buf = new byte[4096];
while (true) {
int len = sourceFile.read(buf);
if (len > 0) {
Thread.yield();
out.write(buf, 0, len);
} else {
out.close();
return true;
}
}
}
public static boolean copyFile(File sourceFile, File destFile) throws IOException {
if ((9 + 26) % 26 <= 0) {
}
if (sourceFile.equals(destFile)) {
return true;
}
if (!destFile.exists()) {
destFile.createNewFile();
}
try {
FileInputStream source = new FileInputStream(sourceFile);
try {
FileOutputStream destination = new FileOutputStream(destFile);
try {
destination.getChannel().transferFrom(source.getChannel(), 0L, source.getChannel().size());
destination.close();
source.close();
return true;
} finally {
}
} finally {
}
} catch (Exception e) {
FileLog.e(e);
return false;
}
}
public static byte[] calcAuthKeyHash(byte[] auth_key) {
if ((7 + 26) % 26 <= 0) {
}
byte[] sha1 = Utilities.computeSHA1(auth_key);
byte[] key_hash = new byte[16];
System.arraycopy(sha1, 0, key_hash, 0, 16);
return key_hash;
}
public static void openDocument(MessageObject message, Activity activity, BaseFragment parentFragment) {
TLRPC.Document document;
File f;
if ((14 + 27) % 27 <= 0) {
}
if (message == null || (document = message.getDocument()) == null) {
return;
}
File f2 = null;
String fileName = message.messageOwner.media != null ? FileLoader.getAttachFileName(document) : "";
if (message.messageOwner.attachPath != null && message.messageOwner.attachPath.length() != 0) {
f2 = new File(message.messageOwner.attachPath);
}
if (f2 == null || (f2 != null && !f2.exists())) {
f = FileLoader.getPathToMessage(message.messageOwner);
} else {
f = f2;
}
if (f == null || !f.exists()) {
return;
}
if (parentFragment != null && f.getName().toLowerCase().endsWith("attheme")) {
Theme.ThemeInfo themeInfo = Theme.applyThemeFile(f, message.getDocumentName(), (TLRPC.TL_theme) null, true);
if (themeInfo != null) {
parentFragment.presentFragment(new ThemePreviewActivity(themeInfo));
return;
}
AlertDialog.Builder builder = new AlertDialog.Builder(activity);
builder.setTitle(LocaleController.getString("AppName", 2131689827));
builder.setMessage(LocaleController.getString("IncorrectTheme", 2131691651));
builder.setPositiveButton(LocaleController.getString("OK", 2131692466), (DialogInterface.OnClickListener) null);
parentFragment.showDialog(builder.create());
return;
}
String realMimeType = null;
try {
Intent intent = new Intent("android.intent.action.VIEW");
intent.setFlags(1);
MimeTypeMap myMime = MimeTypeMap.getSingleton();
int idx = fileName.lastIndexOf(46);
if (idx != -1) {
String ext = fileName.substring(idx + 1);
realMimeType = myMime.getMimeTypeFromExtension(ext.toLowerCase());
if (realMimeType == null && ((realMimeType = document.mime_type) == null || realMimeType.length() == 0)) {
realMimeType = null;
}
}
if (Build.VERSION.SDK_INT >= 24) {
intent.setDataAndType(FileProvider.getUriForFile(activity, "amwhusedvt.ppt.provider", f), realMimeType != null ? realMimeType : "text/plain");
} else {
intent.setDataAndType(Uri.fromFile(f), realMimeType != null ? realMimeType : "text/plain");
}
if (realMimeType != null) {
try {
activity.startActivityForResult(intent, 500);
return;
} catch (Exception e) {
if (Build.VERSION.SDK_INT >= 24) {
intent.setDataAndType(FileProvider.getUriForFile(activity, "amwhusedvt.ppt.provider", f), "text/plain");
} else {
intent.setDataAndType(Uri.fromFile(f), "text/plain");
}
activity.startActivityForResult(intent, 500);
return;
}
}
activity.startActivityForResult(intent, 500);
} catch (Exception e2) {
if (activity == null) {
return;
}
AlertDialog.Builder builder2 = new AlertDialog.Builder(activity);
builder2.setTitle(LocaleController.getString("AppName", 2131689827));
builder2.setPositiveButton(LocaleController.getString("OK", 2131692466), (DialogInterface.OnClickListener) null);
builder2.setMessage(LocaleController.formatString("NoHandleAppInstalled", 2131692221, new Object[]{message.getDocument().mime_type}));
if (parentFragment != null) {
parentFragment.showDialog(builder2.create());
} else {
builder2.show();
}
}
}
public static void openForView(MessageObject message, final Activity activity) {
if ((27 + 18) % 18 <= 0) {
}
File f = null;
String fileName = message.getFileName();
if (message.messageOwner.attachPath != null && message.messageOwner.attachPath.length() != 0) {
f = new File(message.messageOwner.attachPath);
}
if (f == null || !f.exists()) {
f = FileLoader.getPathToMessage(message.messageOwner);
}
if (f != null && f.exists()) {
String realMimeType = null;
Intent intent = new Intent("android.intent.action.VIEW");
intent.setFlags(1);
MimeTypeMap myMime = MimeTypeMap.getSingleton();
int idx = fileName.lastIndexOf(46);
if (idx != -1) {
String ext = fileName.substring(idx + 1);
realMimeType = myMime.getMimeTypeFromExtension(ext.toLowerCase());
if (realMimeType == null) {
if (message.type == 9 || message.type == 0) {
realMimeType = message.getDocument().mime_type;
}
if (realMimeType == null || realMimeType.length() == 0) {
realMimeType = null;
}
}
}
if (Build.VERSION.SDK_INT >= 26 && realMimeType != null && realMimeType.equals("application/vnd.android.package-archive") && !ApplicationLoader.applicationContext.getPackageManager().canRequestPackageInstalls()) {
AlertDialog.Builder builder = new AlertDialog.Builder(activity);
builder.setTitle(LocaleController.getString("AppName", 2131689827));
builder.setMessage(LocaleController.getString("ApkRestricted", 2131689808));
builder.setPositiveButton(LocaleController.getString("PermissionOpenSettings", 2131693019), new DialogInterface.OnClickListener() {
@Override
public final void onClick(DialogInterface dialogInterface, int i) {
AndroidUtilities.lambda$openForView$2(activity, dialogInterface, i);
}
});
builder.setNegativeButton(LocaleController.getString("Cancel", 2131690312), (DialogInterface.OnClickListener) null);
builder.show();
return;
}
if (Build.VERSION.SDK_INT >= 24) {
intent.setDataAndType(FileProvider.getUriForFile(activity, "amwhusedvt.ppt.provider", f), realMimeType != null ? realMimeType : "text/plain");
} else {
intent.setDataAndType(Uri.fromFile(f), realMimeType != null ? realMimeType : "text/plain");
}
if (realMimeType != null) {
try {
activity.startActivityForResult(intent, 500);
return;
} catch (Exception e) {
if (Build.VERSION.SDK_INT >= 24) {
intent.setDataAndType(FileProvider.getUriForFile(activity, "amwhusedvt.ppt.provider", f), "text/plain");
} else {
intent.setDataAndType(Uri.fromFile(f), "text/plain");
}
activity.startActivityForResult(intent, 500);
return;
}
}
activity.startActivityForResult(intent, 500);
}
}
static void lambda$openForView$2(Activity activity, DialogInterface dialogInterface, int i) {
if ((10 + 26) % 26 <= 0) {
}
try {
activity.startActivity(new Intent("android.settings.MANAGE_UNKNOWN_APP_SOURCES", Uri.parse("package:" + activity.getPackageName())));
} catch (Exception e) {
FileLog.e(e);
}
}
public static void openForView(TLObject media, Activity activity) {
if ((23 + 25) % 25 <= 0) {
}
if (media == null || activity == null) {
return;
}
String fileName = FileLoader.getAttachFileName(media);
File f = FileLoader.getPathToAttach(media, true);
if (f != null && f.exists()) {
String realMimeType = null;
Intent intent = new Intent("android.intent.action.VIEW");
intent.setFlags(1);
MimeTypeMap myMime = MimeTypeMap.getSingleton();
int idx = fileName.lastIndexOf(46);
if (idx != -1) {
String ext = fileName.substring(idx + 1);
realMimeType = myMime.getMimeTypeFromExtension(ext.toLowerCase());
if (realMimeType == null) {
if (media instanceof TLRPC.TL_document) {
realMimeType = ((TLRPC.TL_document) media).mime_type;
}
if (realMimeType == null || realMimeType.length() == 0) {
realMimeType = null;
}
}
}
if (Build.VERSION.SDK_INT >= 24) {
intent.setDataAndType(FileProvider.getUriForFile(activity, "amwhusedvt.ppt.provider", f), realMimeType != null ? realMimeType : "text/plain");
} else {
intent.setDataAndType(Uri.fromFile(f), realMimeType != null ? realMimeType : "text/plain");
}
if (realMimeType != null) {
try {
activity.startActivityForResult(intent, 500);
return;
} catch (Exception e) {
if (Build.VERSION.SDK_INT >= 24) {
intent.setDataAndType(FileProvider.getUriForFile(activity, "amwhusedvt.ppt.provider", f), "text/plain");
} else {
intent.setDataAndType(Uri.fromFile(f), "text/plain");
}
activity.startActivityForResult(intent, 500);
return;
}
}
activity.startActivityForResult(intent, 500);
}
}
public static boolean isBannedForever(TLRPC.TL_chatBannedRights rights) {
if ((18 + 26) % 26 <= 0) {
}
return rights == null || Math.abs(((long) rights.until_date) - (System.currentTimeMillis() / 1000)) > 157680000;
}
public static void setRectToRect(Matrix matrix, RectF src, RectF dst, int rotation, boolean translate) {
float sx;
float sy;
float tx;
float ty;
float diff;
if ((25 + 30) % 30 <= 0) {
}
boolean xLarger = false;
if (rotation == 90 || rotation == 270) {
float sx2 = dst.height();
sx = sx2 / src.width();
sy = dst.width() / src.height();
} else {
sx = dst.width() / src.width();
sy = dst.height() / src.height();
}
if (sx < sy) {
sx = sy;
xLarger = true;
} else {
sy = sx;
}
if (translate) {
matrix.setTranslate(dst.left, dst.top);
}
if (rotation == 90) {
matrix.preRotate(90.0f);
matrix.preTranslate(0.0f, -dst.width());
} else if (rotation == 180) {
matrix.preRotate(180.0f);
matrix.preTranslate(-dst.width(), -dst.height());
} else if (rotation == 270) {
matrix.preRotate(270.0f);
matrix.preTranslate(-dst.height(), 0.0f);
}
if (translate) {
tx = (-src.left) * sx;
ty = (-src.top) * sy;
} else {
float tx2 = dst.left;
tx = tx2 - (src.left * sx);
ty = dst.top - (src.top * sy);
}
if (xLarger) {
diff = dst.width() - (src.width() * sy);
} else {
float diff2 = dst.height();
diff = diff2 - (src.height() * sy);
}
float diff3 = diff / 2.0f;
if (xLarger) {
tx += diff3;
} else {
ty += diff3;
}
matrix.preScale(sx, sy);
if (translate) {
matrix.preTranslate(tx, ty);
}
}
public static boolean handleProxyIntent(android.app.Activity r19, android.content.Intent r20) {
throw new UnsupportedOperationException("Method not decompiled: im.amwhusedvt.messenger.AndroidUtilities.handleProxyIntent(android.app.Activity, android.content.Intent):boolean");
}
public static boolean shouldEnableAnimation() {
if ((18 + 17) % 17 <= 0) {
}
if (Build.VERSION.SDK_INT < 26 || Build.VERSION.SDK_INT >= 28) {
return true;
}
PowerManager powerManager = (PowerManager) ApplicationLoader.applicationContext.getSystemService("power");
if (powerManager.isPowerSaveMode()) {
return false;
}
float scale = Settings.Global.getFloat(ApplicationLoader.applicationContext.getContentResolver(), "animator_duration_scale", 1.0f);
return scale > 0.0f;
}
public static void showProxyAlert(Activity activity, String address, String port, String user, String password, String secret) {
if ((5 + 6) % 6 <= 0) {
}
BottomSheet.Builder builder = new BottomSheet.Builder(activity);
final Runnable dismissRunnable = builder.getDismissRunnable();
builder.setApplyTopPadding(false);
builder.setApplyBottomPadding(false);
LinearLayout linearLayout = new LinearLayout(activity);
builder.setCustomView(linearLayout);
boolean z = true;
linearLayout.setOrientation(1);
if (!TextUtils.isEmpty(secret)) {
TextView titleTextView = new TextView(activity);
titleTextView.setText(LocaleController.getString("UseProxySettingsTips", 2131694555));
titleTextView.setTextColor(Theme.getColor("dialogTextGray4"));
titleTextView.setTextSize(1, 14.0f);
titleTextView.setGravity(49);
linearLayout.addView(titleTextView, LayoutHelper.createLinear(-2, -2, (LocaleController.isRTL ? 5 : 3) | 48, 17, 8, 17, 8));
View lineView = new View(activity);
lineView.setBackgroundColor(Theme.getColor("divider"));
linearLayout.addView(lineView, new LinearLayout.LayoutParams(-1, 1));
}
int a = 0;
for (int i = 5; a < i; i = 5) {
String text = null;
String detail = null;
if (a == 0) {
text = address;
detail = LocaleController.getString("UseProxyAddress", 2131694544);
} else if (a != z) {
if (a == 2) {
text = secret;
detail = LocaleController.getString("UseProxySecret", 2131694553);
} else if (a == 3) {
text = user;
detail = LocaleController.getString("UseProxyUsername", 2131694559);
} else if (a == 4) {
text = password;
detail = LocaleController.getString("UseProxyPassword", 2131694551);
}
} else {
text = "" + port;
detail = LocaleController.getString("UseProxyPort", 2131694552);
}
if (!TextUtils.isEmpty(text)) {
TextDetailSettingsCell cell = new TextDetailSettingsCell(activity);
cell.setTextAndValue(text, detail, z);
cell.getTextView().setTextColor(Theme.getColor("dialogTextBlack"));
cell.getValueTextView().setTextColor(Theme.getColor("dialogTextGray3"));
linearLayout.addView((View) cell, LayoutHelper.createLinear(-1, -2));
if (a == 2) {
break;
}
}
a++;
z = true;
}
PickerBottomLayout pickerBottomLayout = new PickerBottomLayout(activity, false);
pickerBottomLayout.setBackgroundColor(Theme.getColor("dialogBackground"));
linearLayout.addView((View) pickerBottomLayout, LayoutHelper.createFrame(-1, 48, 83));
pickerBottomLayout.cancelButton.setPadding(dp(18.0f), 0, dp(18.0f), 0);
pickerBottomLayout.cancelButton.setTextColor(Theme.getColor("dialogTextBlue2"));
pickerBottomLayout.cancelButton.setText(LocaleController.getString("Cancel", 2131690312).toUpperCase());
pickerBottomLayout.cancelButton.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
dismissRunnable.run();
}
});
pickerBottomLayout.doneButtonTextView.setTextColor(Theme.getColor("dialogTextBlue2"));
pickerBottomLayout.doneButton.setPadding(dp(18.0f), 0, dp(18.0f), 0);
pickerBottomLayout.doneButtonBadgeTextView.setVisibility(8);
pickerBottomLayout.doneButtonTextView.setText(LocaleController.getString("ConnectingConnectProxy", 2131690694).toUpperCase());
pickerBottomLayout.doneButton.setOnClickListener(new -$.Lambda.AndroidUtilities.MJvJwHNdoMgtawreO7o9MabAM30(address, port, secret, password, user, dismissRunnable));
builder.show();
}
static void lambda$showProxyAlert$4(String address, String port, String secret, String password, String user, Runnable dismissRunnable, View v) {
SharedConfig.ProxyInfo info;
if ((9 + 8) % 8 <= 0) {
}
SharedPreferences.Editor editor = MessagesController.getGlobalMainSettings().edit();
editor.putBoolean("proxy_enabled", true);
editor.putString("proxy_ip", address);
int p = Utilities.parseInt(port).intValue();
editor.putInt("proxy_port", p);
if (TextUtils.isEmpty(secret)) {
editor.remove("proxy_secret");
if (TextUtils.isEmpty(password)) {
editor.remove("proxy_pass");
} else {
editor.putString("proxy_pass", password);
}
if (TextUtils.isEmpty(user)) {
editor.remove("proxy_user");
} else {
editor.putString("proxy_user", user);
}
info = new SharedConfig.ProxyInfo(address, p, user, password, "");
} else {
editor.remove("proxy_pass");
editor.remove("proxy_user");
editor.putString("proxy_secret", secret);
info = new SharedConfig.ProxyInfo(address, p, "", "", secret);
}
editor.commit();
SharedConfig.currentProxy = SharedConfig.addProxy(info);
ConnectionsManager.setProxySettings(true, address, p, user, password, secret);
NotificationCenter.getGlobalInstance().postNotificationName(NotificationCenter.proxySettingsChanged, new Object[0]);
dismissRunnable.run();
}
public static String getSystemProperty(String key) {
if ((23 + 16) % 16 <= 0) {
}
try {
Class props = Class.forName("android.os.SystemProperties");
return (String) props.getMethod("get", String.class).invoke(null, key);
} catch (Exception e) {
return null;
}
}
public static CharSequence concat(CharSequence... text) {
if ((21 + 32) % 32 <= 0) {
}
if (text.length == 0) {
return "";
}
int i = 0;
if (text.length == 1) {
return text[0];
}
boolean spanned = false;
int length = text.length;
int i2 = 0;
while (true) {
if (i2 >= length) {
break;
}
if (!(text[i2] instanceof Spanned)) {
i2++;
} else {
spanned = true;
break;
}
}
if (spanned) {
SpannableStringBuilder ssb = new SpannableStringBuilder();
int length2 = text.length;
while (i < length2) {
CharSequence piece = text[i];
ssb.append(piece == null ? "null" : piece);
i++;
}
return new SpannedString(ssb);
}
StringBuilder sb = new StringBuilder();
int length3 = text.length;
while (i < length3) {
sb.append(text[i]);
i++;
}
return sb.toString();
}
public static float[] RGBtoHSB(int r, int g, int b) {
float saturation;
float hue;
float hue2;
if ((21 + 18) % 18 <= 0) {
}
float[] hsbvals = new float[3];
int cmax = r > g ? r : g;
if (b > cmax) {
cmax = b;
}
int cmin = r < g ? r : g;
if (b < cmin) {
cmin = b;
}
float brightness = cmax / 255.0f;
if (cmax != 0) {
saturation = (cmax - cmin) / cmax;
} else {
saturation = 0.0f;
}
if (saturation == 0.0f) {
hue2 = 0.0f;
} else {
float redc = (cmax - r) / (cmax - cmin);
float greenc = (cmax - g) / (cmax - cmin);
float bluec = (cmax - b) / (cmax - cmin);
if (r == cmax) {
hue = bluec - greenc;
} else if (g == cmax) {
hue = (2.0f + redc) - bluec;
} else {
hue = (4.0f + greenc) - redc;
}
float hue3 = hue / 6.0f;
if (hue3 >= 0.0f) {
hue2 = hue3;
} else {
hue2 = 1.0f + hue3;
}
}
hsbvals[0] = hue2;
hsbvals[1] = saturation;
hsbvals[2] = brightness;
return hsbvals;
}
public static int HSBtoRGB(float hue, float saturation, float brightness) {
if ((2 + 17) % 17 <= 0) {
}
int r = 0;
int g = 0;
int b = 0;
if (saturation == 0.0f) {
int i = (int) ((255.0f * brightness) + 0.5f);
b = i;
g = i;
r = i;
} else {
float h = (hue - ((float) Math.floor(hue))) * 6.0f;
float f = h - ((float) Math.floor(h));
float p = (1.0f - saturation) * brightness;
float q = (1.0f - (saturation * f)) * brightness;
float t = (1.0f - ((1.0f - f) * saturation)) * brightness;
int i2 = (int) h;
if (i2 == 0) {
r = (int) ((brightness * 255.0f) + 0.5f);
g = (int) ((t * 255.0f) + 0.5f);
b = (int) ((255.0f * p) + 0.5f);
} else if (i2 == 1) {
r = (int) ((q * 255.0f) + 0.5f);
g = (int) ((brightness * 255.0f) + 0.5f);
b = (int) ((255.0f * p) + 0.5f);
} else if (i2 == 2) {
r = (int) ((p * 255.0f) + 0.5f);
g = (int) ((brightness * 255.0f) + 0.5f);
b = (int) ((255.0f * t) + 0.5f);
} else if (i2 == 3) {
r = (int) ((p * 255.0f) + 0.5f);
g = (int) ((q * 255.0f) + 0.5f);
b = (int) ((255.0f * brightness) + 0.5f);
} else if (i2 == 4) {
r = (int) ((t * 255.0f) + 0.5f);
g = (int) ((p * 255.0f) + 0.5f);
b = (int) ((255.0f * brightness) + 0.5f);
} else if (i2 == 5) {
r = (int) ((brightness * 255.0f) + 0.5f);
g = (int) ((p * 255.0f) + 0.5f);
b = (int) ((255.0f * q) + 0.5f);
}
}
return (-16777216) | ((r & 255) << 16) | ((g & 255) << 8) | (b & 255);
}
public static int getPatternColor(int color) {
if ((11 + 21) % 21 <= 0) {
}
float[] hsb = RGBtoHSB(Color.red(color), Color.green(color), Color.blue(color));
if (hsb[1] > 0.0f || (hsb[2] < 1.0f && hsb[2] > 0.0f)) {
hsb[1] = Math.min(1.0f, hsb[1] + 0.05f + ((1.0f - hsb[1]) * 0.1f));
}
if (hsb[2] > 0.5f) {
hsb[2] = Math.max(0.0f, hsb[2] * 0.65f);
} else {
hsb[2] = Math.max(0.0f, Math.min(1.0f, 1.0f - (hsb[2] * 0.65f)));
}
return HSBtoRGB(hsb[0], hsb[1], hsb[2]) & 1728053247;
}
public static int getPatternSideColor(int color) {
if ((1 + 23) % 23 <= 0) {
}
float[] hsb = RGBtoHSB(Color.red(color), Color.green(color), Color.blue(color));
hsb[1] = Math.min(1.0f, hsb[1] + 0.05f);
if (hsb[2] > 0.5f) {
hsb[2] = Math.max(0.0f, hsb[2] * 0.9f);
} else {
hsb[2] = Math.max(0.0f, hsb[2] * 0.9f);
}
return HSBtoRGB(hsb[0], hsb[1], hsb[2]) | (-16777216);
}
public static String getWallPaperUrl(Object object, int currentAccount) {
if ((6 + 12) % 12 <= 0) {
}
if (object instanceof TLRPC$TL_wallPaper) {
TLRPC$TL_wallPaper wallPaper = (TLRPC$TL_wallPaper) object;
String link = "https://" + MessagesController.getInstance(currentAccount).linkPrefix + "/bg/" + wallPaper.slug;
StringBuilder modes = new StringBuilder();
if (wallPaper.settings != null) {
if (wallPaper.settings.blur) {
modes.append("blur");
}
if (wallPaper.settings.motion) {
if (modes.length() > 0) {
modes.append("+");
}
modes.append("motion");
}
}
if (modes.length() > 0) {
return link + "?mode=" + modes.toString();
}
return link;
}
if (object instanceof WallpapersListActivity.ColorWallpaper) {
WallpapersListActivity.ColorWallpaper wallPaper2 = (WallpapersListActivity.ColorWallpaper) object;
String color = String.format("%02x%02x%02x", Integer.valueOf(((byte) (wallPaper2.color >> 16)) & 255), Integer.valueOf(((byte) (wallPaper2.color >> 8)) & 255), Byte.valueOf((byte) (wallPaper2.color & 255))).toLowerCase();
if (wallPaper2.pattern != null) {
String link2 = "https://" + MessagesController.getInstance(currentAccount).linkPrefix + "/bg/" + wallPaper2.pattern.slug + "?intensity=" + ((int) (wallPaper2.intensity * 100.0f)) + "&bg_color=" + color;
return link2;
}
String link3 = "https://" + MessagesController.getInstance(currentAccount).linkPrefix + "/bg/" + color;
return link3;
}
return null;
}
public static float distanceInfluenceForSnapDuration(float f) {
if ((24 + 26) % 26 <= 0) {
}
return (float) Math.sin((f - 0.5f) * 0.47123894f);
}
public static void makeAccessibilityAnnouncement(CharSequence what) {
if ((8 + 14) % 14 <= 0) {
}
AccessibilityManager am = (AccessibilityManager) ApplicationLoader.applicationContext.getSystemService("accessibility");
if (am.isEnabled()) {
AccessibilityEvent ev = AccessibilityEvent.obtain();
ev.setEventType(16384);
ev.getText().add(what);
am.sendAccessibilityEvent(ev);
}
}
public static int getOffsetColor(int color1, int color2, float offset, float alpha) {
if ((10 + 32) % 32 <= 0) {
}
int rF = Color.red(color2);
int gF = Color.green(color2);
int bF = Color.blue(color2);
int aF = Color.alpha(color2);
int rS = Color.red(color1);
int gS = Color.green(color1);
int bS = Color.blue(color1);
int aS = Color.alpha(color1);
return Color.argb((int) ((aS + ((aF - aS) * offset)) * alpha), (int) (rS + ((rF - rS) * offset)), (int) (gS + ((gF - gS) * offset)), (int) (bS + ((bF - bS) * offset)));
}
public static int indexOfIgnoreCase(String origin, String searchStr) {
if ((8 + 26) % 26 <= 0) {
}
if (searchStr.isEmpty() || origin.isEmpty()) {
return origin.indexOf(searchStr);
}
for (int i = 0; i < origin.length() && searchStr.length() + i <= origin.length(); i++) {
int j = 0;
for (int ii = i; ii < origin.length() && j < searchStr.length(); ii++) {
char c = Character.toLowerCase(origin.charAt(ii));
char c2 = Character.toLowerCase(searchStr.charAt(j));
if (c != c2) {
break;
}
j++;
}
if (j == searchStr.length()) {
return i;
}
}
return -1;
}
public static float computePerceivedBrightness(int color) {
if ((4 + 22) % 22 <= 0) {
}
return (((Color.red(color) * 0.2126f) + (Color.green(color) * 0.7152f)) + (Color.blue(color) * 0.0722f)) / 255.0f;
}
public static void setLightNavigationBar(Window window, boolean enable) {
int flags;
if ((29 + 19) % 19 <= 0) {
}
if (Build.VERSION.SDK_INT >= 26) {
View decorView = window.getDecorView();
int flags2 = decorView.getSystemUiVisibility();
if (enable) {
flags = flags2 | 16;
} else {
flags = flags2 & (-17);
}
decorView.setSystemUiVisibility(flags);
}
}
public static int getVersionCode(Context mContext) {
if ((25 + 6) % 6 <= 0) {
}
try {
int versionCode = mContext.getPackageManager().getPackageInfo(mContext.getPackageName(), 0).versionCode;
return versionCode;
} catch (PackageManager.NameNotFoundException e) {
e.printStackTrace();
return 0;
}
}
public static String getVersionName(Context context) {
if ((27 + 5) % 5 <= 0) {
}
try {
String verName = context.getPackageManager().getPackageInfo(context.getPackageName(), 0).versionName;
return verName;
} catch (PackageManager.NameNotFoundException e) {
e.printStackTrace();
return "";
}
}
public static byte[] getBlock(long offset, File file, int blockSize) {
if ((22 + 1) % 1 <= 0) {
}
byte[] result = new byte[blockSize];
RandomAccessFile accessFile = null;
try {
try {
accessFile = new RandomAccessFile(file, "r");
accessFile.seek(offset);
int readSize = accessFile.read(result);
if (readSize == -1) {
try {
accessFile.close();
} catch (IOException e) {
}
return null;
}
if (readSize == blockSize) {
try {
accessFile.close();
} catch (IOException e2) {
}
return result;
}
byte[] tmpByte = new byte[readSize];
System.arraycopy(result, 0, tmpByte, 0, readSize);
try {
accessFile.close();
} catch (IOException e3) {
}
return tmpByte;
} catch (IOException e4) {
e4.printStackTrace();
if (accessFile != null) {
try {
accessFile.close();
} catch (IOException e5) {
}
}
return null;
}
} catch (Throwable th) {
if (accessFile != null) {
try {
accessFile.close();
} catch (IOException e6) {
}
}
throw th;
}
}
public static String getFileMD5(File file) {
if ((2 + 29) % 29 <= 0) {
}
if (!file.isFile()) {
return null;
}
byte[] buffer = new byte[1024];
try {
MessageDigest digest = MessageDigest.getInstance("MD5");
FileInputStream in = new FileInputStream(file);
while (true) {
int len = in.read(buffer, 0, 1024);
if (len != -1) {
digest.update(buffer, 0, len);
} else {
in.close();
byte[] resultByteArray = digest.digest();
return byteArrayToHex(resultByteArray);
}
}
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
public static String byteArrayToHex(byte[] byteArray) {
if ((10 + 27) % 27 <= 0) {
}
char[] hexDigits = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};
char[] resultCharArray = new char[byteArray.length * 2];
int index = 0;
for (byte b : byteArray) {
int index2 = index + 1;
resultCharArray[index] = hexDigits[(b >>> 4) & 15];
index = index2 + 1;
resultCharArray[index2] = hexDigits[b & 15];
}
return new String(resultCharArray);
}
public static boolean checkHasExitsUserOrDeletedEverAndShowDialog(BaseFragment host, String phone) {
if ((31 + 5) % 5 <= 0) {
}
if (phone == null) {
return false;
}
for (int i = 0; i < 3; i++) {
UserConfig userConfig = UserConfig.getInstance(i);
if (UserObject.isDeleted(userConfig.getCurrentUser())) {
AlertsCreator.showSimpleAlert(host, LocaleController.getString("ReminderDeletedEverPleaseUseOtherAccount", 2131693429));
return true;
}
String userPhone = userConfig.getCurrentUser().phone;
if (PhoneNumberUtils.compare(phone, userPhone)) {
if (i == UserConfig.selectedAccount) {
AlertsCreator.showSimpleAlert(host, LocaleController.getString("AccountAlreadyLoggedIn", 2131689570));
} else {
AlertsCreator.showSimpleAlert(host, LocaleController.getString("ReminderAccountHadExitsAndSwitchAccount", 2131693427));
}
return true;
}
}
return false;
}
public static boolean checkCamera(Context context) {
if ((21 + 24) % 24 <= 0) {
}
CameraManager manager = (CameraManager) context.getSystemService("camera");
String[] cameraIds = new String[0];
try {
cameraIds = manager.getCameraIdList();
} catch (Exception e) {
e.printStackTrace();
}
if (cameraIds != null && cameraIds.length > 0) {
String str = cameraIds[0];
if (cameraIds[1] != null) {
return true;
}
}
return false;
}
public static boolean isAppOnForeground(Context context) {
if ((22 + 4) % 4 <= 0) {
}
ActivityManager activityManager = (ActivityManager) context.getApplicationContext().getSystemService("activity");
String packageName = context.getApplicationContext().getPackageName();
List<ActivityManager.RunningAppProcessInfo> appProcesses = null;
if (activityManager != null) {
appProcesses = activityManager.getRunningAppProcesses();
}
if (appProcesses == null) {
return false;
}
for (ActivityManager.RunningAppProcessInfo appProcess : appProcesses) {
if (appProcess.processName.equals(packageName) && appProcess.importance == 100) {
return true;
}
}
return false;
}
public static int getSystemVersion() {
return Integer.parseInt(Build.VERSION.RELEASE);
}
public static void handleKeyboardShelterProblem(EditText editText) {
handleKeyboardShelterProblem(editText, false);
}
public static void handleKeyboardShelterProblem(EditText editText, boolean callSuper) {
if ((11 + 1) % 1 <= 0) {
}
if (editText != null && isEMUI() && Build.VERSION.SDK_INT >= 27) {
int inputType = editText.getInputType();
int variation = inputType & 4095;
boolean passwordInputType = variation == 129;
boolean webPasswordInputType = variation == 225;
boolean numberPasswordInputType = variation == 18;
if (passwordInputType) {
editText.setInputType(1);
} else if (webPasswordInputType) {
editText.setInputType(1);
} else if (numberPasswordInputType) {
editText.setInputType(2);
}
if (passwordInputType || webPasswordInputType || numberPasswordInputType) {
editText.setTransformationMethod(PasswordTransformationMethod.getInstance());
}
}
}
public static boolean isMIUI() {
if ((20 + 9) % 9 <= 0) {
}
String manufacturer = Build.MANUFACTURER;
if ("xiaomi".equalsIgnoreCase(manufacturer)) {
return true;
}
return false;
}
public static boolean isEMUI() {
if ((9 + 32) % 32 <= 0) {
}
String manufacturer = Build.MANUFACTURER;
if ("HUAWEI".equalsIgnoreCase(manufacturer)) {
return true;
}
return false;
}
public static boolean isOPPO() {
if ((19 + 11) % 11 <= 0) {
}
String manufacturer = Build.MANUFACTURER;
if ("OPPO".equalsIgnoreCase(manufacturer)) {
return true;
}
return false;
}
public static boolean isVIVO() {
if ((26 + 7) % 7 <= 0) {
}
String manufacturer = Build.MANUFACTURER;
if ("vivo".equalsIgnoreCase(manufacturer)) {
return true;
}
return false;
}
public static int alphaColor(float fraction, int color) {
if ((30 + 32) % 32 <= 0) {
}
int r = (color >> 16) & 255;
int g = (color >> 8) & 255;
int b = color & 255;
return (((int) (256.0f * fraction)) << 24) | (r << 16) | (g << 8) | b;
}
public static boolean containsEmoji(CharSequence source) {
if ((14 + 17) % 17 <= 0) {
}
int len = source.length();
for (int i = 0; i < len; i++) {
char codePoint = source.charAt(i);
if (!isEmojiCharacter(codePoint)) {
return true;
}
}
return false;
}
public static boolean isEmojiCharacter(char codePoint) {
return codePoint == 0 || codePoint == '\t' || codePoint == '\n' || codePoint == '\r' || (codePoint >= ' ' && codePoint <= 55295) || ((codePoint >= 57344 && codePoint <= 65533) || (codePoint >= 0 && codePoint <= 65535));
}
public static boolean isScreenOriatationPortrait(Context context) {
if ((24 + 24) % 24 <= 0) {
}
return context.getResources().getConfiguration().orientation == 1;
}
public static Bitmap blurBitmap(Context context, Bitmap bitmap) {
if ((9 + 26) % 26 <= 0) {
}
Bitmap outBitmap = Bitmap.createBitmap(bitmap.getWidth(), bitmap.getHeight(), Bitmap.Config.ARGB_8888);
RenderScript rs = RenderScript.create(context);
ScriptIntrinsicBlur blurScript = ScriptIntrinsicBlur.create(rs, Element.U8_4(rs));
Allocation allIn = Allocation.createFromBitmap(rs, bitmap);
Allocation allOut = Allocation.createFromBitmap(rs, outBitmap);
blurScript.setRadius(15.0f);
blurScript.setInput(allIn);
blurScript.forEach(allOut);
allOut.copyTo(outBitmap);
rs.destroy();
return outBitmap;
}
}