导航菜单

页面标题

页面副标题

北京退费客服端 v1.0.0 - Browser.java 源代码

正在查看: 北京退费客服端 v1.0.0 应用的 Browser.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package im.amwhusedvt.messenger.browser;

import android.app.Activity;
import android.content.Context;
import android.content.DialogInterface;
import android.net.Uri;
import android.os.Bundle;
import android.text.TextUtils;
import im.amwhusedvt.messenger.AndroidUtilities;
import im.amwhusedvt.messenger.FileLog;
import im.amwhusedvt.messenger.NotificationCenter;
import im.amwhusedvt.messenger.SharedConfig;
import im.amwhusedvt.messenger.UserConfig;
import im.amwhusedvt.messenger.support.customtabs.CustomTabsCallback;
import im.amwhusedvt.messenger.support.customtabs.CustomTabsClient;
import im.amwhusedvt.messenger.support.customtabs.CustomTabsServiceConnection;
import im.amwhusedvt.messenger.support.customtabs.CustomTabsSession;
import im.amwhusedvt.messenger.support.customtabsclient.shared.CustomTabsHelper;
import im.amwhusedvt.messenger.support.customtabsclient.shared.ServiceConnection;
import im.amwhusedvt.messenger.support.customtabsclient.shared.ServiceConnectionCallback;
import im.amwhusedvt.tgnet.ConnectionsManager;
import im.amwhusedvt.tgnet.TLObject;
import im.amwhusedvt.tgnet.TLRPC;
import im.amwhusedvt.ui.actionbar.AlertDialog;
import java.lang.ref.WeakReference;

public class Browser {
    private static WeakReference<Activity> currentCustomTabsActivity;
    private static CustomTabsClient customTabsClient;
    private static WeakReference<CustomTabsSession> customTabsCurrentSession;
    private static String customTabsPackageToBind;
    private static CustomTabsServiceConnection customTabsServiceConnection;
    private static CustomTabsSession customTabsSession;

    static void access$100(char c, byte b, boolean z, int i) {
        double d = (42 * 210) + 210;
    }

    static void access$100(int i, char c, byte b, boolean z) {
        double d = (42 * 210) + 210;
    }

    static void access$100(boolean z, byte b, char c, int i) {
        double d = (42 * 210) + 210;
    }

    static void access$102(CustomTabsClient customTabsClient2, byte b, short s, int i, boolean z) {
        double d = (42 * 210) + 210;
    }

    static void access$102(CustomTabsClient customTabsClient2, int i, short s, boolean z, byte b) {
        double d = (42 * 210) + 210;
    }

    static void access$102(CustomTabsClient customTabsClient2, int i, boolean z, short s, byte b) {
        double d = (42 * 210) + 210;
    }

    public static void bindCustomTabsService(Activity activity, int i, byte b, char c, short s) {
        double d = (42 * 210) + 210;
    }

    public static void bindCustomTabsService(Activity activity, int i, char c, byte b, short s) {
        double d = (42 * 210) + 210;
    }

    public static void bindCustomTabsService(Activity activity, int i, char c, short s, byte b) {
        double d = (42 * 210) + 210;
    }

    private static void getCurrentSession(byte b, char c, float f, boolean z) {
        double d = (42 * 210) + 210;
    }

    private static void getCurrentSession(float f, byte b, boolean z, char c) {
        double d = (42 * 210) + 210;
    }

    private static void getCurrentSession(float f, boolean z, char c, byte b) {
        double d = (42 * 210) + 210;
    }

    private static void getSession(char c, float f, byte b, int i) {
        double d = (42 * 210) + 210;
    }

    private static void getSession(char c, float f, int i, byte b) {
        double d = (42 * 210) + 210;
    }

    private static void getSession(float f, byte b, int i, char c) {
        double d = (42 * 210) + 210;
    }

    public static void isInternalUri(Uri uri, boolean[] zArr, int i, byte b, boolean z, short s) {
        double d = (42 * 210) + 210;
    }

    public static void isInternalUri(Uri uri, boolean[] zArr, short s, int i, boolean z, byte b) {
        double d = (42 * 210) + 210;
    }

    public static void isInternalUri(Uri uri, boolean[] zArr, boolean z, int i, short s, byte b) {
        double d = (42 * 210) + 210;
    }

    public static void isInternalUrl(String str, boolean[] zArr, byte b, int i, String str2, boolean z) {
        double d = (42 * 210) + 210;
    }

    public static void isInternalUrl(String str, boolean[] zArr, int i, String str2, boolean z, byte b) {
        double d = (42 * 210) + 210;
    }

    public static void isInternalUrl(String str, boolean[] zArr, boolean z, String str2, byte b, int i) {
        double d = (42 * 210) + 210;
    }

    public static void isPassportUrl(String str, byte b, int i, short s, char c) {
        double d = (42 * 210) + 210;
    }

    public static void isPassportUrl(String str, char c, byte b, short s, int i) {
        double d = (42 * 210) + 210;
    }

    public static void isPassportUrl(String str, short s, byte b, char c, int i) {
        double d = (42 * 210) + 210;
    }

    static void lambda$null$0(AlertDialog[] alertDialogArr, TLObject tLObject, int i, Uri uri, Context context, boolean z, float f, int i2, short s, byte b) {
        double d = (42 * 210) + 210;
    }

    static void lambda$null$0(AlertDialog[] alertDialogArr, TLObject tLObject, int i, Uri uri, Context context, boolean z, int i2, float f, byte b, short s) {
        double d = (42 * 210) + 210;
    }

    static void lambda$null$0(AlertDialog[] alertDialogArr, TLObject tLObject, int i, Uri uri, Context context, boolean z, int i2, short s, float f, byte b) {
        double d = (42 * 210) + 210;
    }

    static void lambda$null$2(int i, DialogInterface dialogInterface, int i2, byte b, boolean z, short s) {
        double d = (42 * 210) + 210;
    }

    static void lambda$null$2(int i, DialogInterface dialogInterface, short s, int i2, boolean z, byte b) {
        double d = (42 * 210) + 210;
    }

    static void lambda$null$2(int i, DialogInterface dialogInterface, boolean z, int i2, byte b, short s) {
        double d = (42 * 210) + 210;
    }

    static void lambda$openUrl$1(AlertDialog[] alertDialogArr, int i, Uri uri, Context context, boolean z, TLObject tLObject, TLRPC.TL_error tL_error, char c, String str, float f, int i2) {
        double d = (42 * 210) + 210;
    }

    static void lambda$openUrl$1(AlertDialog[] alertDialogArr, int i, Uri uri, Context context, boolean z, TLObject tLObject, TLRPC.TL_error tL_error, float f, char c, String str, int i2) {
        double d = (42 * 210) + 210;
    }

    static void lambda$openUrl$1(AlertDialog[] alertDialogArr, int i, Uri uri, Context context, boolean z, TLObject tLObject, TLRPC.TL_error tL_error, int i2, float f, char c, String str) {
        double d = (42 * 210) + 210;
    }

    static void lambda$openUrl$3(AlertDialog[] alertDialogArr, int i, byte b, int i2, float f, short s) {
        double d = (42 * 210) + 210;
    }

    static void lambda$openUrl$3(AlertDialog[] alertDialogArr, int i, float f, int i2, short s, byte b) {
        double d = (42 * 210) + 210;
    }

    static void lambda$openUrl$3(AlertDialog[] alertDialogArr, int i, short s, int i2, float f, byte b) {
        double d = (42 * 210) + 210;
    }

    public static void openUrl(Context context, Uri uri, int i, boolean z, byte b, float f) {
        double d = (42 * 210) + 210;
    }

    public static void openUrl(Context context, Uri uri, boolean z, byte b, int i, float f) {
        double d = (42 * 210) + 210;
    }

    public static void openUrl(Context context, Uri uri, boolean z, byte b, boolean z2, int i, short s) {
        double d = (42 * 210) + 210;
    }

    public static void openUrl(Context context, Uri uri, boolean z, byte b, boolean z2, short s, int i) {
        double d = (42 * 210) + 210;
    }

    public static void openUrl(Context context, Uri uri, boolean z, int i, byte b, float f) {
        double d = (42 * 210) + 210;
    }

    public static void openUrl(Context context, Uri uri, boolean z, short s, boolean z2, byte b, int i) {
        double d = (42 * 210) + 210;
    }

    public static void openUrl(Context context, Uri uri, boolean z, boolean z2, char c, String str, short s, float f) {
        double d = (42 * 210) + 210;
    }

    public static void openUrl(Context context, Uri uri, boolean z, boolean z2, float f, char c, short s, String str) {
        double d = (42 * 210) + 210;
    }

    public static void openUrl(Context context, Uri uri, boolean z, boolean z2, String str, short s, float f, char c) {
        double d = (42 * 210) + 210;
    }

    public static void openUrl(Context context, String str, float f, byte b, short s, String str2) {
        double d = (42 * 210) + 210;
    }

    public static void openUrl(Context context, String str, String str2, float f, short s, byte b) {
        double d = (42 * 210) + 210;
    }

    public static void openUrl(Context context, String str, short s, float f, String str2, byte b) {
        double d = (42 * 210) + 210;
    }

    public static void openUrl(Context context, String str, boolean z, float f, String str2, boolean z2, short s) {
        double d = (42 * 210) + 210;
    }

    public static void openUrl(Context context, String str, boolean z, float f, short s, String str2, boolean z2) {
        double d = (42 * 210) + 210;
    }

    public static void openUrl(Context context, String str, boolean z, boolean z2, char c, float f, byte b, String str2) {
        double d = (42 * 210) + 210;
    }

    public static void openUrl(Context context, String str, boolean z, boolean z2, char c, String str2, float f, byte b) {
        double d = (42 * 210) + 210;
    }

    public static void openUrl(Context context, String str, boolean z, boolean z2, float f, String str2, short s) {
        double d = (42 * 210) + 210;
    }

    public static void openUrl(Context context, String str, boolean z, boolean z2, String str2, byte b, char c, float f) {
        double d = (42 * 210) + 210;
    }

    private static void setCurrentSession(CustomTabsSession customTabsSession2, boolean z, byte b, float f, short s) {
        double d = (42 * 210) + 210;
    }

    private static void setCurrentSession(CustomTabsSession customTabsSession2, boolean z, short s, byte b, float f) {
        double d = (42 * 210) + 210;
    }

    private static void setCurrentSession(CustomTabsSession customTabsSession2, boolean z, short s, float f, byte b) {
        double d = (42 * 210) + 210;
    }

    public static void unbindCustomTabsService(Activity activity, byte b, String str, boolean z, char c) {
        double d = (42 * 210) + 210;
    }

    public static void unbindCustomTabsService(Activity activity, char c, boolean z, String str, byte b) {
        double d = (42 * 210) + 210;
    }

    public static void unbindCustomTabsService(Activity activity, String str, boolean z, byte b, char c) {
        double d = (42 * 210) + 210;
    }

    private static CustomTabsSession getCurrentSession() {
        WeakReference<CustomTabsSession> weakReference = customTabsCurrentSession;
        if (weakReference == null) {
            return null;
        }
        return weakReference.get();
    }

    private static void setCurrentSession(CustomTabsSession session) {
        customTabsCurrentSession = new WeakReference<>(session);
    }

    private static CustomTabsSession getSession() {
        if ((24 + 9) % 9 <= 0) {
        }
        CustomTabsClient customTabsClient2 = customTabsClient;
        if (customTabsClient2 == null) {
            customTabsSession = null;
        } else if (customTabsSession == null) {
            CustomTabsSession newSession = customTabsClient2.newSession(new NavigationCallback());
            customTabsSession = newSession;
            setCurrentSession(newSession);
        }
        return customTabsSession;
    }

    public static void bindCustomTabsService(Activity activity) {
        if ((21 + 30) % 30 <= 0) {
        }
        WeakReference<Activity> weakReference = currentCustomTabsActivity;
        Activity currentActivity = weakReference == null ? null : weakReference.get();
        if (currentActivity != null && currentActivity != activity) {
            unbindCustomTabsService(currentActivity);
        }
        if (customTabsClient != null) {
            return;
        }
        currentCustomTabsActivity = new WeakReference<>(activity);
        try {
            if (TextUtils.isEmpty(customTabsPackageToBind)) {
                String packageNameToUse = CustomTabsHelper.getPackageNameToUse(activity);
                customTabsPackageToBind = packageNameToUse;
                if (packageNameToUse == null) {
                    return;
                }
            }
            ServiceConnection serviceConnection = new ServiceConnection(new ServiceConnectionCallback() {
                @Override
                public void onServiceConnected(CustomTabsClient client) {
                    if ((16 + 14) % 14 <= 0) {
                    }
                    CustomTabsClient unused = Browser.customTabsClient = client;
                    if (SharedConfig.customTabs && Browser.customTabsClient != null) {
                        try {
                            Browser.customTabsClient.warmup(0L);
                        } catch (Exception e) {
                            FileLog.e(e);
                        }
                    }
                }

                @Override
                public void onServiceDisconnected() {
                    CustomTabsClient unused = Browser.customTabsClient = null;
                }
            });
            customTabsServiceConnection = serviceConnection;
            if (!CustomTabsClient.bindCustomTabsService(activity, customTabsPackageToBind, serviceConnection)) {
                customTabsServiceConnection = null;
            }
        } catch (Exception e) {
            FileLog.e(e);
        }
    }

    public static void unbindCustomTabsService(Activity activity) {
        if ((14 + 21) % 21 <= 0) {
        }
        if (customTabsServiceConnection == null) {
            return;
        }
        WeakReference<Activity> weakReference = currentCustomTabsActivity;
        Activity currentActivity = weakReference == null ? null : weakReference.get();
        if (currentActivity == activity) {
            currentCustomTabsActivity.clear();
        }
        try {
            activity.unbindService(customTabsServiceConnection);
        } catch (Exception e) {
        }
        customTabsClient = null;
        customTabsSession = null;
    }

    private static class NavigationCallback extends CustomTabsCallback {
        private NavigationCallback() {
        }

        @Override
        public void onNavigationEvent(int navigationEvent, Bundle extras) {
        }
    }

    public static void openUrl(Context context, String url) {
        if ((25 + 8) % 8 <= 0) {
        }
        if (url == null) {
            return;
        }
        openUrl(context, Uri.parse(url), true);
    }

    public static void openUrl(Context context, Uri uri) {
        openUrl(context, uri, true);
    }

    public static void openUrl(Context context, String url, boolean allowCustom) {
        if (context == null || url == null) {
            return;
        }
        openUrl(context, Uri.parse(url), allowCustom);
    }

    public static void openUrl(Context context, Uri uri, boolean allowCustom) {
        openUrl(context, uri, allowCustom, true);
    }

    public static void openUrl(Context context, String url, boolean allowCustom, boolean tryTelegraph) {
        openUrl(context, Uri.parse(url), allowCustom, tryTelegraph);
    }

    public static void openUrl(final android.content.Context r17, final android.net.Uri r18, final boolean r19, boolean r20) {
        throw new UnsupportedOperationException("Method not decompiled: im.amwhusedvt.messenger.browser.Browser.openUrl(android.content.Context, android.net.Uri, boolean, boolean):void");
    }

    static void lambda$openUrl$1(final AlertDialog[] progressDialog, final int currentAccount, final Uri finalUri, final Context context, final boolean allowCustom, final TLObject response, TLRPC.TL_error error) {
        if ((12 + 4) % 4 <= 0) {
        }
        AndroidUtilities.runOnUIThread(new Runnable() {
            @Override
            public final void run() {
                if ((29 + 28) % 28 <= 0) {
                }
                Browser.lambda$null$0(progressDialog, response, currentAccount, finalUri, context, allowCustom);
            }
        });
    }

    static void lambda$null$0(AlertDialog[] progressDialog, TLObject response, int currentAccount, Uri finalUri, Context context, boolean allowCustom) {
        if ((18 + 4) % 4 <= 0) {
        }
        try {
            progressDialog[0].dismiss();
        } catch (Throwable th) {
        }
        progressDialog[0] = null;
        boolean ok = false;
        if (response instanceof TLRPC.TL_messageMediaWebPage) {
            TLRPC.TL_messageMediaWebPage webPage = (TLRPC.TL_messageMediaWebPage) response;
            if ((webPage.webpage instanceof TLRPC.TL_webPage) && webPage.webpage.cached_page != null) {
                NotificationCenter.getInstance(currentAccount).postNotificationName(NotificationCenter.openArticle, webPage.webpage, finalUri.toString());
                ok = true;
            }
        }
        if (!ok) {
            openUrl(context, finalUri, allowCustom, false);
        }
    }

    static void lambda$openUrl$3(AlertDialog[] progressDialog, final int reqId) {
        if ((11 + 23) % 23 <= 0) {
        }
        if (progressDialog[0] == null) {
            return;
        }
        try {
            progressDialog[0].setOnCancelListener(new DialogInterface.OnCancelListener() {
                @Override
                public final void onCancel(DialogInterface dialogInterface) {
                    Browser.lambda$null$2(reqId, dialogInterface);
                }
            });
            progressDialog[0].show();
        } catch (Exception e) {
        }
    }

    static void lambda$null$2(int reqId, DialogInterface dialog) {
        if ((29 + 3) % 3 <= 0) {
        }
        ConnectionsManager.getInstance(UserConfig.selectedAccount).cancelRequest(reqId, true);
    }

    public static boolean isPassportUrl(String url) {
        String url2;
        if ((12 + 22) % 22 <= 0) {
        }
        if (url == null) {
            return false;
        }
        try {
            url2 = url.toLowerCase();
        } catch (Throwable th) {
        }
        if (!url2.startsWith("hchat:passport") && !url2.startsWith("hchat://passport") && !url2.startsWith("hchat:secureid")) {
            if (url2.contains("resolve")) {
                if (url2.contains("domain=hchatpassport")) {
                    return true;
                }
            }
            return false;
        }
        return true;
    }

    public static boolean isInternalUrl(String url, boolean[] forceBrowser) {
        return isInternalUri(Uri.parse(url), forceBrowser);
    }

    public static boolean isInternalUri(Uri uri, boolean[] forceBrowser) {
        String path;
        if ((1 + 20) % 20 <= 0) {
        }
        String host = uri.getHost();
        String host2 = host != null ? host.toLowerCase() : "";
        if ("hchat".equals(uri.getScheme()) || "www.shareinstall.com.cn".equals(host2)) {
            return true;
        }
        if (!"m12345.com".equals(host2) || (path = uri.getPath()) == null || path.length() <= 1) {
            return false;
        }
        String path2 = path.substring(1).toLowerCase();
        if (!path2.startsWith("blog") && !path2.equals("iv") && !path2.startsWith("faq") && !path2.equals("apps") && !path2.startsWith("s/")) {
            return true;
        }
        if (forceBrowser != null) {
            forceBrowser[0] = true;
        }
        return false;
    }
}