正在查看: Minits v4.9.3.32 应用的 ReplicatorWidgetProvider.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Minits v4.9.3.32 应用的 ReplicatorWidgetProvider.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.xone.replicator;
import Na.c;
import Na.d;
import Na.e;
import Na.f;
import android.app.PendingIntent;
import android.appwidget.AppWidgetManager;
import android.appwidget.AppWidgetProvider;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.text.TextUtils;
import android.widget.RemoteViews;
import androidx.annotation.Keep;
import com.xone.android.utils.Utils;
import fb.AbstractC0698k;
@Keep
public final class ReplicatorWidgetProvider extends AppWidgetProvider {
private static final String ACTION_START_REPLICATOR = "start-replicator";
private static final String INTENT_EXTRA_DATA = "data";
private static final String INTENT_EXTRA_STATUS = "status";
private static final String INTENT_EXTRA_TITLE = "title";
private int nStatus;
private String sData;
private String sTitle;
public static void update(Context context, String str, String str2, int i) {
try {
Context applicationContext = context.getApplicationContext();
Intent intent = new Intent(applicationContext, (Class<?>) ReplicatorWidgetProvider.class);
intent.setAction("android.appwidget.action.APPWIDGET_UPDATE");
intent.putExtra(INTENT_EXTRA_TITLE, str);
intent.putExtra(INTENT_EXTRA_DATA, str2);
intent.putExtra(INTENT_EXTRA_STATUS, i);
intent.putExtra("appWidgetIds", AppWidgetManager.getInstance(applicationContext).getAppWidgetIds(new ComponentName(applicationContext, (Class<?>) ReplicatorWidgetProvider.class)));
applicationContext.sendBroadcast(intent);
} catch (Exception e) {
e.printStackTrace();
}
}
@Override
public void onReceive(Context context, Intent intent) {
Context applicationContext = context.getApplicationContext();
String a = AbstractC0698k.a(intent);
a.getClass();
if (a.equals(ACTION_START_REPLICATOR)) {
Utils.k4(applicationContext, "Widget", null, null);
} else if (a.equals("android.appwidget.action.APPWIDGET_UPDATE")) {
this.sTitle = AbstractC0698k.t(intent, INTENT_EXTRA_TITLE, applicationContext.getString(f.f));
this.sData = AbstractC0698k.t(intent, INTENT_EXTRA_DATA, applicationContext.getString(f.k));
this.nStatus = AbstractC0698k.i(intent, INTENT_EXTRA_STATUS, 0);
}
super.onReceive(context, intent);
}
@Override
public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] iArr) {
Context applicationContext = context.getApplicationContext();
String packageName = applicationContext.getPackageName();
for (int i : iArr) {
RemoteViews remoteViews = new RemoteViews(packageName, e.a);
if (!TextUtils.isEmpty(this.sTitle)) {
remoteViews.setTextViewText(d.c, this.sTitle);
}
if (!TextUtils.isEmpty(this.sData)) {
remoteViews.setTextViewText(d.b, this.sData);
}
int i2 = this.nStatus;
remoteViews.setImageViewResource(d.a, i2 != 1 ? i2 != 2 ? i2 != 3 ? c.c : c.b : c.d : c.c);
Intent intent = new Intent(applicationContext, (Class<?>) ReplicatorWidgetProvider.class);
intent.setAction(ACTION_START_REPLICATOR);
remoteViews.setOnClickPendingIntent(d.a, PendingIntent.getBroadcast(applicationContext, 0, intent, Utils.l2(true, 0)));
appWidgetManager.updateAppWidget(i, remoteViews);
}
}
}