正在查看: 万能钥匙 v1.1.23 应用的 WkDeskToolsCleanWidget.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: 万能钥匙 v1.1.23 应用的 WkDeskToolsCleanWidget.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.lantern.wifitools.deskwidget;
import android.app.PendingIntent;
import android.appwidget.AppWidgetManager;
import android.content.ComponentName;
import android.content.Intent;
import android.os.Bundle;
import android.text.TextUtils;
import android.widget.RemoteViews;
import b60.a;
import b60.c;
import b60.d;
import com.google.android.inner_exoplayer2.text.ttml.TtmlNode;
import com.lantern.tools.widget.common.BaseToolsWidget;
import com.meituan.robust.ChangeQuickRedirect;
import com.meituan.robust.PatchProxy;
import com.meituan.robust.PatchProxyResult;
import gn.b;
import kotlin.C0484a;
import os.C0457a;
public class WkDeskToolsCleanWidget extends BaseToolsWidget {
public static ChangeQuickRedirect changeQuickRedirect;
private void g(RemoteViews remoteViews) {
if (PatchProxy.proxy(new Object[]{remoteViews}, this, changeQuickRedirect, false, 1196, new Class[]{RemoteViews.class}, Void.TYPE).isSupported) {
return;
}
if (b.j(this.b).d()) {
int i = b60.b.lay_clean_btn;
remoteViews.setTextViewText(i, hn.b.k().getCleanedBtnText());
remoteViews.setImageViewResource(b60.b.lay_clean_icon, a.icon_tool_widget_cleaned);
remoteViews.setInt(i, "setBackgroundResource", a.desk_widget_connect_btn_bg);
Bundle bundle = new Bundle();
bundle.putString("linkurl", hn.b.k().getCleanedBtnLink());
bundle.putString("name", hn.b.k().getCleanedBtnText());
bundle.putInt(TtmlNode.TAG_STYLE, 1);
remoteViews.setOnClickPendingIntent(i, f(bundle));
return;
}
remoteViews.setTextViewText(b60.b.lay_clean_title, String.format(this.b.getString(d.tool_widget_needclean_title2), C0484a.b(this.b)));
int i2 = b60.b.lay_clean_btn;
remoteViews.setTextViewText(i2, hn.b.k().getNeedcleanBtnText());
remoteViews.setImageViewResource(b60.b.lay_clean_icon, a.icon_tool_widget_no_clean);
remoteViews.setInt(i2, "setBackgroundResource", a.desk_widget_clean_btn_bg);
Bundle bundle2 = new Bundle();
bundle2.putString("linkurl", hn.b.k().getNeedcleanBtnLink());
bundle2.putString("name", hn.b.k().getNeedcleanBtnText());
bundle2.putInt(TtmlNode.TAG_STYLE, 1);
remoteViews.setOnClickPendingIntent(i2, f(bundle2));
}
@Override
public void d(Intent intent) {
if (PatchProxy.proxy(new Object[]{intent}, this, changeQuickRedirect, false, 1194, new Class[]{Intent.class}, Void.TYPE).isSupported) {
return;
}
String action = intent.getAction();
if (TextUtils.equals("wifi.toolwidget.action.WIDGET_REFRESH", action) || TextUtils.equals("wifi.toolwidget.action.CLEAN_STATUS_CHANGE", action) || TextUtils.equals("android.appwidget.action.APPWIDGET_UPDATE", action)) {
if (TextUtils.equals("wifi.toolwidget.action.WIDGET_REFRESH", action)) {
b.j(this.b).F();
}
e();
}
}
@Override
public void e() {
if (PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 1195, new Class[0], Void.TYPE).isSupported) {
return;
}
super.e();
try {
AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(this.b);
ComponentName componentName = new ComponentName(this.b, (Class<?>) WkDeskToolsCleanWidget.class);
int i = c.wifitools_desk_cleanwidget_main;
if (b.j(this.b).d()) {
i = c.wifitools_desk_cleanwidget_main_cleaned;
}
RemoteViews remoteViews = new RemoteViews(this.b.getPackageName(), i);
g(remoteViews);
int[] appWidgetIds = appWidgetManager.getAppWidgetIds(componentName);
if (appWidgetIds == null || appWidgetIds.length <= 0) {
return;
}
appWidgetManager.updateAppWidget(appWidgetIds, remoteViews);
b.j(this.b).G(this, hn.b.k().h());
if (b.j(this.b).g()) {
C0457a.e("widget_show", "", 1);
}
} catch (Exception unused) {
}
}
public PendingIntent f(Bundle bundle) {
PatchProxyResult proxy = PatchProxy.proxy(new Object[]{bundle}, this, changeQuickRedirect, false, 1197, new Class[]{Bundle.class}, PendingIntent.class);
return proxy.isSupported ? (PendingIntent) proxy.result : super.b("wifi.intent.action.TRANSIT", bundle, this);
}
}