导航菜单

页面标题

页面副标题

万能钥匙 v1.1.23 - b.java 源代码

正在查看: 万能钥匙 v1.1.23 应用的 b.java JAVA 源代码文件

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


package gn;

import android.app.Activity;
import android.app.AlarmManager;
import android.app.PendingIntent;
import android.appwidget.AppWidgetManager;
import android.content.ComponentName;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.os.SystemClock;
import android.text.TextUtils;
import android.util.Base64;
import android.util.Pair;
import b60.d;
import com.google.android.inner_exoplayer2.C;
import com.google.android.inner_exoplayer2.analytics.AnalyticsListener;
import com.lantern.tools.widget.common.BaseToolsWidget;
import com.lantern.wifitools.deskwidget.WkDeskToolsCleanWidget;
import com.lantern.wifitools.deskwidget.WkDeskToolsConnectWidget;
import com.lantern.wifitools.deskwidget.WkDeskToolsMiddleConnectWidget;
import com.lantern.wifitools.deskwidget.WkDeskToolsSmallConnectWidget;
import com.meituan.robust.ChangeQuickRedirect;
import com.meituan.robust.PatchProxy;
import com.meituan.robust.PatchProxyResult;
import com.sdk.plus.action.guard.GuardResultHandle;
import com.sdk.plus.data.manager.RalDataManager;
import java.nio.charset.StandardCharsets;
import org.json.JSONObject;
import os.C0457a;
import pa.c;
import pa.e;
import qs.C0394a;
import qs.C0396c;
import qs.C0397e;
import qs.C0453a;
import qs.C0483g;
import qs.DialogC0479c;
import qs.RunnableC0480d;

public class b {
    public static ChangeQuickRedirect changeQuickRedirect;
    public static b f;
    public Context a;
    public Pair<Integer, Double> b;
    public Pair<Integer, String> c;
    public long d = -1;
    public long e = -1;

    public class a implements Runnable {
        public static ChangeQuickRedirect changeQuickRedirect;
        public final int a;

        public a(int i) {
            this.a = i;
        }

        @Override
        public void run() {
            if (PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 1048, new Class[0], Void.TYPE).isSupported) {
                return;
            }
            if (b.this.w(this.a)) {
                c.i(b.this.a.getString(d.tool_widget_guide_tip1));
                return;
            }
            b.this.i();
            C0457a.a(b.this.a, null);
            c.i(b.this.a.getString(d.tool_widget_guide_tip3));
        }
    }

    public b(Context context) {
        this.a = context;
    }

    public static boolean H(Context context, String str, Bundle bundle) {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[]{context, str, bundle}, null, changeQuickRedirect, true, AnalyticsListener.EVENT_AUDIO_DECODER_RELEASED, new Class[]{Context.class, String.class, Bundle.class}, Boolean.TYPE);
        if (proxy.isSupported) {
            return ((Boolean) proxy.result).booleanValue();
        }
        try {
            Intent intent = new Intent(str);
            intent.setPackage(context.getPackageName());
            if (!(context instanceof Activity)) {
                intent.addFlags(268566528);
            }
            if (bundle != null) {
                intent.putExtras(bundle);
            }
            context.startActivity(intent);
            return true;
        } catch (Exception unused) {
            return false;
        }
    }

    public static boolean J(Context context, String str, Bundle bundle) {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[]{context, str, bundle}, null, changeQuickRedirect, true, AnalyticsListener.EVENT_AUDIO_SINK_ERROR, new Class[]{Context.class, String.class, Bundle.class}, Boolean.TYPE);
        if (proxy.isSupported) {
            return ((Boolean) proxy.result).booleanValue();
        }
        try {
            Intent parseUri = Intent.parseUri(str, 1);
            Bundle bundle2 = new Bundle();
            if (bundle != null) {
                bundle2.putAll(bundle);
            }
            if (!(context instanceof Activity)) {
                parseUri.addFlags(268435456);
            }
            parseUri.putExtras(bundle2);
            context.startActivity(parseUri);
            return true;
        } catch (Exception unused) {
            return false;
        }
    }

    public static boolean M(Context context, String str) {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[]{context, str}, null, changeQuickRedirect, true, AnalyticsListener.EVENT_AUDIO_DISABLED, new Class[]{Context.class, String.class}, Boolean.TYPE);
        if (proxy.isSupported) {
            return ((Boolean) proxy.result).booleanValue();
        }
        try {
            Intent intent = new Intent("android.intent.action.VIEW");
            intent.setData(Uri.parse(str));
            intent.setPackage(context.getPackageName());
            if (!(context instanceof Activity)) {
                intent.addFlags(268435456);
            }
            context.startActivity(intent);
            return true;
        } catch (Exception unused) {
            return false;
        }
    }

    public static synchronized b j(Context context) {
        synchronized (b.class) {
            PatchProxyResult proxy = PatchProxy.proxy(new Object[]{context}, null, changeQuickRedirect, true, AnalyticsListener.EVENT_AUDIO_POSITION_ADVANCING, new Class[]{Context.class}, b.class);
            if (proxy.isSupported) {
                return (b) proxy.result;
            }
            if (f == null) {
                f = new b(context);
            }
            return f;
        }
    }

    public static int n(BaseToolsWidget baseToolsWidget) {
        if (baseToolsWidget instanceof WkDeskToolsConnectWidget) {
            return 2;
        }
        if (baseToolsWidget instanceof WkDeskToolsCleanWidget) {
            return 1;
        }
        if (baseToolsWidget instanceof WkDeskToolsMiddleConnectWidget) {
            return 3;
        }
        return baseToolsWidget instanceof WkDeskToolsSmallConnectWidget ? 4 : 0;
    }

    public static boolean o(Context context, String str, Bundle bundle) {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[]{context, str, bundle}, null, changeQuickRedirect, true, AnalyticsListener.EVENT_AUDIO_UNDERRUN, new Class[]{Context.class, String.class, Bundle.class}, Boolean.TYPE);
        return proxy.isSupported ? ((Boolean) proxy.result).booleanValue() : H(context, str, bundle) || M(context, str) || J(context, str, bundle);
    }

    public boolean A() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, AnalyticsListener.EVENT_DRM_KEYS_LOADED, new Class[0], Boolean.TYPE);
        if (proxy.isSupported) {
            return ((Boolean) proxy.result).booleanValue();
        }
        try {
            String teachUrl = hn.b.k().getTeachUrl();
            if (!TextUtils.isEmpty(teachUrl)) {
                Uri.Builder buildUpon = Uri.parse("wifitutu://deeplink/widget").buildUpon();
                buildUpon.appendQueryParameter("router", GuardResultHandle.GUARD_RUNING);
                buildUpon.appendQueryParameter("pageid", "app_common_web");
                JSONObject jSONObject = new JSONObject();
                jSONObject.put("url", teachUrl);
                buildUpon.appendQueryParameter("data", Base64.encodeToString(jSONObject.toString().getBytes(StandardCharsets.UTF_8), 8));
                Intent intent = new Intent("android.intent.action.VIEW");
                intent.setData(buildUpon.build());
                intent.setPackage(this.a.getPackageName());
                this.a.startActivity(intent);
                return true;
            }
        } catch (Exception e) {
            pa.b.c(e);
        }
        return false;
    }

    public void B() {
        if (PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 1035, new Class[0], Void.TYPE).isSupported) {
            return;
        }
        C0453a.b(System.currentTimeMillis());
        pa.b.e("ext_widget recordAccess:" + q());
        if (q()) {
            z("wifi.toolwidget.action.ACCESS_STATUS_CHANGE", new Bundle());
        }
    }

    public void C() {
        if (PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 1034, new Class[0], Void.TYPE).isSupported) {
            return;
        }
        oa.a.m(this.a, "tools_deskwidget_sp", "last_clean_page_clean_time", System.currentTimeMillis());
        pa.b.e("ext_widget recordClean:" + w(1));
        if (w(1)) {
            try {
                Bundle bundle = new Bundle();
                bundle.putString("className", WkDeskToolsCleanWidget.class.getName());
                Intent intent = new Intent();
                intent.setPackage(this.a.getPackageName());
                intent.putExtras(bundle);
                intent.setComponent(new ComponentName(this.a, WkDeskToolsCleanWidget.class.getName()));
                intent.setAction("wifi.toolwidget.action.CLEAN_STATUS_CHANGE");
                this.a.sendBroadcast(intent);
            } catch (Exception e) {
                pa.b.c(e);
            }
        }
    }

    public void D(boolean z, Class<?> cls) {
        if (PatchProxy.proxy(new Object[]{new Byte(z ? (byte) 1 : (byte) 0), cls}, this, changeQuickRedirect, false, 1041, new Class[]{Boolean.TYPE, Class.class}, Void.TYPE).isSupported) {
            return;
        }
        e.a(this.a, new ComponentName(this.a, cls), z);
    }

    public final void E(AlarmManager alarmManager, int i, long j, PendingIntent pendingIntent) {
        if (PatchProxy.proxy(new Object[]{alarmManager, new Integer(i), new Long(j), pendingIntent}, this, changeQuickRedirect, false, 1044, new Class[]{AlarmManager.class, Integer.TYPE, Long.TYPE, PendingIntent.class}, Void.TYPE).isSupported) {
            return;
        }
        c.d(alarmManager, "setExact", new Object[]{Integer.valueOf(i), Long.valueOf(j), pendingIntent});
    }

    public void F() {
        if (PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 1045, new Class[0], Void.TYPE).isSupported) {
            return;
        }
        try {
            Context b = os.e.b();
            Intent intent = new Intent("wifi.intent.action.STICKY_SERVICE");
            intent.setPackage(b.getPackageName());
            intent.putExtra("source", "toolwidget");
            intent.putExtra(RalDataManager.DB_TYPE, "service");
            intent.putExtra("subPkg", this.a.getPackageName());
            b.startService(intent);
        } catch (Exception unused) {
        }
    }

    public void G(BaseToolsWidget baseToolsWidget, long j) {
        if (PatchProxy.proxy(new Object[]{baseToolsWidget, new Long(j)}, this, changeQuickRedirect, false, 1043, new Class[]{BaseToolsWidget.class, Long.TYPE}, Void.TYPE).isSupported) {
            return;
        }
        Intent intent = new Intent("wifi.toolwidget.action.WIDGET_REFRESH");
        intent.setPackage(this.a.getPackageName());
        intent.setComponent(new ComponentName(this.a, baseToolsWidget.getClass()));
        AlarmManager alarmManager = (AlarmManager) this.a.getSystemService("alarm");
        PendingIntent broadcast = PendingIntent.getBroadcast(this.a, b.class.hashCode(), intent, C.BUFFER_FLAG_FIRST_SAMPLE);
        alarmManager.cancel(broadcast);
        E(alarmManager, 2, SystemClock.elapsedRealtime() + j, broadcast);
    }

    public String I() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, AnalyticsListener.EVENT_VIDEO_DECODER_RELEASED, new Class[0], String.class);
        if (proxy.isSupported) {
            return (String) proxy.result;
        }
        String i = oa.a.i(this.a, "tools_deskwidget_sp", "add_widget_scene", "");
        return TextUtils.isEmpty(i) ? "longpress" : i;
    }

    public boolean K(Context context, String str, DialogInterface.OnDismissListener onDismissListener) {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[]{context, str, onDismissListener}, this, changeQuickRedirect, false, 1031, new Class[]{Context.class, String.class, DialogInterface.OnDismissListener.class}, Boolean.TYPE);
        if (proxy.isSupported) {
            return ((Boolean) proxy.result).booleanValue();
        }
        if (!c.f(context)) {
            pa.b.e("ext_widget context not valid");
            return false;
        }
        if (TextUtils.isEmpty(str)) {
            str = "clean_def";
        }
        if (N(str, "guidedlg", 1, false)) {
            if (hn.b.k().D()) {
                RunnableC0480d.INSTANCE.a(context);
            }
            b("guidedlg", 1);
            C0457a.i("widget_guide_show", "guidedlg", 1, str);
            return true;
        }
        return false;
    }

    public boolean L(Context context, String str, DialogInterface.OnDismissListener onDismissListener) {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[]{context, str, onDismissListener}, this, changeQuickRedirect, false, 1033, new Class[]{Context.class, String.class, DialogInterface.OnDismissListener.class}, Boolean.TYPE);
        if (proxy.isSupported) {
            return ((Boolean) proxy.result).booleanValue();
        }
        try {
            if (TextUtils.isEmpty(str)) {
                str = "connect_def";
            }
            if (O(str, "guidedlg", 3, false)) {
                new DialogC0479c(context, 3, onDismissListener, str).show();
                return true;
            }
        } catch (Exception unused) {
        }
        return false;
    }

    public boolean N(String str, String str2, int i, boolean z) {
        boolean z2;
        int i2 = 4;
        Object[] objArr = {str, str2, new Integer(i), new Byte(z ? (byte) 1 : (byte) 0)};
        ChangeQuickRedirect changeQuickRedirect2 = changeQuickRedirect;
        Class cls = Boolean.TYPE;
        PatchProxyResult proxy = PatchProxy.proxy(objArr, this, changeQuickRedirect2, false, AnalyticsListener.EVENT_DRM_SESSION_RELEASED, new Class[]{String.class, String.class, Integer.TYPE, cls}, cls);
        if (proxy.isSupported) {
            return ((Boolean) proxy.result).booleanValue();
        }
        if (!s(i)) {
            pa.b.e("ext_widget willShowCleanWidgetGuideDialog isDeskToolWidgetEnable false");
            return false;
        }
        if (w(i)) {
            z2 = false;
            i2 = 1;
        } else if (!t(i)) {
            z2 = false;
        } else if (!hn.b.k().E()) {
            z2 = false;
            i2 = 2;
        } else if (System.currentTimeMillis() - oa.a.e(this.a, "tools_deskwidget_sp", "last_guide_dialog_show_time", 0L) < hn.b.k().u()) {
            z2 = false;
            i2 = 3;
        } else {
            z2 = true;
            i2 = 0;
        }
        if (!z) {
            if (z2) {
                oa.a.m(this.a, "tools_deskwidget_sp", "last_guide_dialog_show_time", System.currentTimeMillis());
            } else {
                C0457a.g(str2, i, str, i2);
            }
        }
        pa.b.f("ext_widget willShowCleanWidgetGuideDialog test: %s canShow: %s reason: %d", new Object[]{Boolean.valueOf(z), Boolean.valueOf(z2), Integer.valueOf(i2)});
        return z2;
    }

    public boolean O(String str, String str2, int i, boolean z) {
        boolean z2;
        int i2 = 4;
        Object[] objArr = {str, str2, new Integer(i), new Byte(z ? (byte) 1 : (byte) 0)};
        ChangeQuickRedirect changeQuickRedirect2 = changeQuickRedirect;
        Class cls = Boolean.TYPE;
        PatchProxyResult proxy = PatchProxy.proxy(objArr, this, changeQuickRedirect2, false, AnalyticsListener.EVENT_PLAYER_RELEASED, new Class[]{String.class, String.class, Integer.TYPE, cls}, cls);
        if (proxy.isSupported) {
            return ((Boolean) proxy.result).booleanValue();
        }
        if (!s(i)) {
            pa.b.e("ext_widget willShowConnectWidgetGuideDialog isDeskToolWidgetEnable false");
            return false;
        }
        C0483g c0483g = C0483g.a;
        boolean e = c0483g.e();
        boolean d = c0483g.d();
        pa.b.a("Widget busConnectCompleted %s %s", new Object[]{Boolean.valueOf(e), Boolean.valueOf(d)});
        if (d || !e) {
            return false;
        }
        if (w(i)) {
            z2 = false;
            i2 = 1;
        } else if (!t(i)) {
            z2 = false;
        } else if (!hn.b.k().F()) {
            z2 = false;
            i2 = 2;
        } else if (System.currentTimeMillis() - oa.a.e(this.a, "tools_deskwidget_sp", "last_guide_page_show_time", 0L) < hn.b.k().v()) {
            z2 = false;
            i2 = 3;
        } else {
            z2 = true;
            i2 = 0;
        }
        if (!z) {
            if (z2) {
                oa.a.m(this.a, "tools_deskwidget_sp", "last_guide_page_show_time", System.currentTimeMillis());
            } else {
                C0457a.g(str2, i, str, i2);
            }
        }
        pa.b.f("ext_widget willShowConnectWidgetGuideDialog test: %s canShow: %s reason: %d", new Object[]{Boolean.valueOf(z), Boolean.valueOf(z2), Integer.valueOf(i2)});
        return z2;
    }

    public boolean b(String str, int i) {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[]{str, new Integer(i)}, this, changeQuickRedirect, false, AnalyticsListener.EVENT_VIDEO_FRAME_PROCESSING_OFFSET, new Class[]{String.class, Integer.TYPE}, Boolean.TYPE);
        if (proxy.isSupported) {
            return ((Boolean) proxy.result).booleanValue();
        }
        try {
            return c(str, i);
        } catch (Throwable unused) {
            if (!A()) {
                c.g(this.a, d.tool_widget_guide_tip2, 1);
            }
            C0457a.a(this.a, null);
            return false;
        }
    }

    public final boolean c(String str, int i) {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[]{str, new Integer(i)}, this, changeQuickRedirect, false, AnalyticsListener.EVENT_DRM_SESSION_ACQUIRED, new Class[]{String.class, Integer.TYPE}, Boolean.TYPE);
        if (proxy.isSupported) {
            return ((Boolean) proxy.result).booleanValue();
        }
        if (s(i) && v()) {
            if (w(i)) {
                c.i(this.a.getString(d.tool_widget_guide_tip1));
                pa.b.e("ext_widget isWidgetAdded true");
                return true;
            }
            AppWidgetManager appWidgetManager = (AppWidgetManager) this.a.getSystemService(AppWidgetManager.class);
            ComponentName componentName = new ComponentName(this.a, m(i).getName());
            if (appWidgetManager.isRequestPinAppWidgetSupported()) {
                oa.a.q(this.a, "tools_deskwidget_sp", "add_widget_scene", str);
                Intent intent = new Intent(this.a, m(i));
                intent.setPackage(this.a.getPackageName());
                if (!(this.a instanceof Activity)) {
                    intent.addFlags(268435456);
                }
                boolean requestPinAppWidget = appWidgetManager.requestPinAppWidget(componentName, null, PendingIntent.getBroadcast(this.a, 0, intent, C.BUFFER_FLAG_FIRST_SAMPLE));
                if (requestPinAppWidget) {
                    new Handler().postDelayed(new a(i), 1000L);
                    pa.b.e("ext_widget postDelayed isAdd:" + requestPinAppWidget);
                    return requestPinAppWidget;
                }
            }
        }
        if (!A()) {
            c.g(this.a, d.tool_widget_guide_tip2, 1);
        }
        C0457a.a(this.a, null);
        pa.b.e("ext_widget returen false");
        return false;
    }

    public boolean d() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 1036, new Class[0], Boolean.TYPE);
        if (proxy.isSupported) {
            return ((Boolean) proxy.result).booleanValue();
        }
        return System.currentTimeMillis() - oa.a.e(this.a, "tools_deskwidget_sp", "last_clean_page_clean_time", 0L) < hn.b.k().g();
    }

    public boolean e() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, AnalyticsListener.EVENT_AUDIO_CODEC_ERROR, new Class[0], Boolean.TYPE);
        if (proxy.isSupported) {
            return ((Boolean) proxy.result).booleanValue();
        }
        if (System.currentTimeMillis() - oa.a.e(this.a, "tools_deskwidget_sp", "last_typeC_update_time", 0L) < hn.b.k().n(C0397e.d())) {
            return false;
        }
        oa.a.m(this.a, "tools_deskwidget_sp", "last_typeC_update_time", System.currentTimeMillis());
        return true;
    }

    public void f(BaseToolsWidget baseToolsWidget) {
        if (PatchProxy.proxy(new Object[]{baseToolsWidget}, this, changeQuickRedirect, false, 1042, new Class[]{BaseToolsWidget.class}, Void.TYPE).isSupported) {
            return;
        }
        Intent intent = new Intent("wifi.toolwidget.action.WIDGET_REFRESH");
        intent.setComponent(new ComponentName(this.a, baseToolsWidget.getClass()));
        intent.setPackage(this.a.getPackageName());
        ((AlarmManager) this.a.getSystemService("alarm")).cancel(PendingIntent.getBroadcast(this.a, b.class.hashCode(), intent, C.BUFFER_FLAG_FIRST_SAMPLE));
    }

    public boolean g() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 1047, new Class[0], Boolean.TYPE);
        if (proxy.isSupported) {
            return ((Boolean) proxy.result).booleanValue();
        }
        long currentTimeMillis = System.currentTimeMillis();
        if (this.e == -1) {
            this.e = oa.a.f("tools_deskwidget_sp", "last_show_clean_widget_time", 0L);
        }
        if (C0394a.a(this.e, currentTimeMillis)) {
            return false;
        }
        this.e = currentTimeMillis;
        oa.a.n("tools_deskwidget_sp", "last_show_clean_widget_time", currentTimeMillis);
        return true;
    }

    public boolean h(BaseToolsWidget baseToolsWidget) {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[]{baseToolsWidget}, this, changeQuickRedirect, false, 1046, new Class[]{BaseToolsWidget.class}, Boolean.TYPE);
        if (proxy.isSupported) {
            return ((Boolean) proxy.result).booleanValue();
        }
        int n = n(baseToolsWidget);
        long currentTimeMillis = System.currentTimeMillis();
        if (this.d == -1) {
            this.d = oa.a.f("tools_deskwidget_sp", "last_show_connect_widget_time" + n, 0L);
        }
        if (C0394a.a(this.d, currentTimeMillis)) {
            return false;
        }
        this.d = currentTimeMillis;
        oa.a.n("tools_deskwidget_sp", "last_show_connect_widget_time" + n, this.d);
        return true;
    }

    public void i() {
        if (PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, AnalyticsListener.EVENT_VIDEO_DISABLED, new Class[0], Void.TYPE).isSupported) {
            return;
        }
        oa.a.q(this.a, "tools_deskwidget_sp", "add_widget_scene", "");
    }

    public Pair<Integer, String> k() {
        return this.c;
    }

    public Pair<Integer, Double> l() {
        return this.b;
    }

    public Class<?> m(int i) {
        return i == 2 ? WkDeskToolsConnectWidget.class : i == 3 ? WkDeskToolsMiddleConnectWidget.class : i == 4 ? WkDeskToolsSmallConnectWidget.class : WkDeskToolsCleanWidget.class;
    }

    public void p() {
        if (PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, AnalyticsListener.EVENT_DROPPED_VIDEO_FRAMES, new Class[0], Void.TYPE).isSupported) {
            return;
        }
        if (!r()) {
            D(false, WkDeskToolsCleanWidget.class);
            D(false, WkDeskToolsMiddleConnectWidget.class);
            return;
        }
        D(u(), WkDeskToolsCleanWidget.class);
        D(u(), WkDeskToolsMiddleConnectWidget.class);
        an.a.b(new gn.a());
        try {
            if (u()) {
                j(this.a).y("android.appwidget.action.APPWIDGET_UPDATE");
            }
        } catch (Exception unused) {
        }
    }

    public boolean q() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 1037, new Class[0], Boolean.TYPE);
        if (proxy.isSupported) {
            return ((Boolean) proxy.result).booleanValue();
        }
        int[] iArr = {2, 3, 4};
        for (int i = 0; i < 3; i++) {
            if (w(iArr[i])) {
                return true;
            }
        }
        return false;
    }

    public boolean r() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, AnalyticsListener.EVENT_VIDEO_DECODER_INITIALIZED, new Class[0], Boolean.TYPE);
        return proxy.isSupported ? ((Boolean) proxy.result).booleanValue() : s(0);
    }

    public boolean s(int i) {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[]{new Integer(i)}, this, changeQuickRedirect, false, AnalyticsListener.EVENT_VIDEO_INPUT_FORMAT_CHANGED, new Class[]{Integer.TYPE}, Boolean.TYPE);
        return proxy.isSupported ? ((Boolean) proxy.result).booleanValue() : i == 3 || i == 4 || u();
    }

    public boolean t(int i) {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[]{new Integer(i)}, this, changeQuickRedirect, false, AnalyticsListener.EVENT_DRM_KEYS_RESTORED, new Class[]{Integer.TYPE}, Boolean.TYPE);
        return proxy.isSupported ? ((Boolean) proxy.result).booleanValue() : s(i);
    }

    public boolean u() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, AnalyticsListener.EVENT_VIDEO_ENABLED, new Class[0], Boolean.TYPE);
        return proxy.isSupported ? ((Boolean) proxy.result).booleanValue() : hn.b.k().G();
    }

    public boolean v() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, AnalyticsListener.EVENT_DRM_KEYS_REMOVED, new Class[0], Boolean.TYPE);
        return proxy.isSupported ? ((Boolean) proxy.result).booleanValue() : Build.VERSION.SDK_INT >= 26 || C0396c.c();
    }

    public boolean w(int i) {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[]{new Integer(i)}, this, changeQuickRedirect, false, 1038, new Class[]{Integer.TYPE}, Boolean.TYPE);
        if (proxy.isSupported) {
            return ((Boolean) proxy.result).booleanValue();
        }
        if (!s(i)) {
            return true;
        }
        try {
            pa.b.e("ext_widget isWidgetAdded " + m(i).getName());
            int[] appWidgetIds = AppWidgetManager.getInstance(this.a).getAppWidgetIds(new ComponentName(this.a.getPackageName(), m(i).getName()));
            if (appWidgetIds != null) {
                return appWidgetIds.length > 0;
            }
        } catch (Exception unused) {
        }
        return true;
    }

    public void x() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 1024, new Class[0], Void.TYPE).isSupported && C0397e.d()) {
            this.b = new Pair<>(Integer.valueOf(kotlin.Pair.b()), Double.valueOf(kotlin.Pair.d()));
            kotlin.Pair<Integer, String> f2 = kotlin.Pair.f();
            if (f2 != null) {
                this.c = new Pair<>((Integer) f2.c(), (String) f2.d());
            }
        }
    }

    public void y(String str) {
        if (PatchProxy.proxy(new Object[]{str}, this, changeQuickRedirect, false, 1039, new Class[]{String.class}, Void.TYPE).isSupported) {
            return;
        }
        z(str, null);
    }

    public void z(String str, Bundle bundle) {
        if (PatchProxy.proxy(new Object[]{str, bundle}, this, changeQuickRedirect, false, 1040, new Class[]{String.class, Bundle.class}, Void.TYPE).isSupported) {
            return;
        }
        try {
            Intent intent = new Intent();
            intent.setPackage(this.a.getPackageName());
            if (bundle != null) {
                intent.putExtras(bundle);
            }
            intent.setAction(str);
            this.a.sendBroadcast(intent);
        } catch (Exception e) {
            pa.b.c(e);
        }
    }
}