正在查看: Fancy Optimizer v4.6.3 应用的 AntivirusPatternUpdateNotificationPublisher.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Fancy Optimizer v4.6.3 应用的 AntivirusPatternUpdateNotificationPublisher.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.fancyclean.boost.antivirus.business.receiver;
import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Build;
import android.text.Html;
import android.widget.RemoteViews;
import androidx.core.app.NotificationCompat;
import androidx.core.view.i;
import androidx.core.view.j;
import com.applovin.sdk.AppLovinErrorCodes;
import com.fancyclean.boost.main.ui.activity.LandingActivity;
import dg.e;
import g9.f;
import nk.b;
import vj.h;
public class AntivirusPatternUpdateNotificationPublisher extends BroadcastReceiver {
public static final h a = new h("AntivirusPatternUpdateNotificationPublisher");
@Override
public final void onReceive(Context context, Intent intent) {
NotificationManager notificationManager;
if (intent != null) {
h hVar = a;
hVar.c("==> onReceive");
if (!b.v().b(e.h(context, "IsVirusPatternUpdateEnabled"), true)) {
hVar.c("Virus pattern update not enabled");
return;
}
if (!b.v().b(e.h(context, "IsVirusPatternUpdateNotificationEnabled"), true)) {
hVar.c("Virus pattern update notification not enabled");
return;
}
long currentTimeMillis = System.currentTimeMillis();
SharedPreferences sharedPreferences = context.getSharedPreferences("virus_scan", 0);
long j = sharedPreferences != null ? sharedPreferences.getLong("last_check_virus_pattern_update_time", 0L) : 0L;
if (currentTimeMillis > j && currentTimeMillis - j < 43200000) {
hVar.c("has checked virus pattern within 12 hours, no need to notify");
return;
}
f b = f.b(context);
b.getClass();
f.c.c("==> sendCheckVirusPatternUpdateNotification");
int i = Build.VERSION.SDK_INT;
Context context2 = b.a;
if (i >= 26 && (notificationManager = (NotificationManager) context2.getSystemService("notification")) != null) {
androidx.browser.trusted.b.a();
NotificationChannel z10 = j.z(context2.getString(2131887864));
j.A(z10);
i.n(z10);
androidx.browser.trusted.b.b(notificationManager, z10);
}
RemoteViews remoteViews = new RemoteViews(context2.getPackageName(), 2131558818);
Intent intent2 = new Intent(context2, (Class<?>) LandingActivity.class);
intent2.setAction("jump_feature");
intent2.putExtra("from_ui", "Notification");
intent2.putExtra("to_feature", "virus_db_update");
PendingIntent activity = PendingIntent.getActivity(context2, AppLovinErrorCodes.NO_FILL, intent2, 201326592);
NotificationCompat.Builder builder = new NotificationCompat.Builder(context2, "antivirus");
remoteViews.setTextViewText(2131363694, Html.fromHtml(context2.getResources().getString(2131887656)));
remoteViews.setImageViewResource(2131362471, 2131231214);
remoteViews.setTextViewText(2131361982, context2.getString(2131888158));
remoteViews.setViewVisibility(2131362222, i >= 31 ? 8 : 0);
builder.setCustomContentView(remoteViews).setSmallIcon(2131231215).setContentIntent(activity).setWhen(System.currentTimeMillis()).setAutoCancel(true).setPriority(1).setWhen(System.currentTimeMillis());
if (e.x()) {
builder.setCustomHeadsUpContentView(remoteViews);
}
NotificationManager notificationManager2 = (NotificationManager) context2.getSystemService("notification");
if (notificationManager2 != null) {
notificationManager2.notify(191120, builder.build());
f.j(10);
}
}
}
}