导航菜单

页面标题

页面副标题

Clean Center v0.5.5 - RecallHandler.java 源代码

正在查看: Clean Center v0.5.5 应用的 RecallHandler.java JAVA 源代码文件

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


package com.pdf.reader.fileviewer.notification;

import android.app.NotificationChannel;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Build;
import android.text.Html;
import android.text.TextUtils;
import android.widget.RemoteViews;
import androidx.core.app.NotificationCompat;
import androidx.core.app.TaskStackBuilder;
import androidx.core.os.BundleKt;
import com.blankj.utilcode.util.NotificationUtils;
import com.blankj.utilcode.util.Utils;
import com.lambda.adlib.LambdaAdSdk;
import com.pdf.reader.fileviewer.R;
import com.pdf.reader.fileviewer.ad.AdUtils;
import com.pdf.reader.fileviewer.ad.AppLoggerParam;
import com.pdf.reader.fileviewer.ad.PushConfig;
import com.pdf.reader.fileviewer.receiver.InstallSuccessBroadcastReceiver;
import com.pdf.reader.fileviewer.receiver.UnlockScreenBroadcastReceiver;
import com.pdf.reader.fileviewer.ui.activity.SplashActivity;
import com.pdf.reader.fileviewer.utils.DeviceUtils;
import com.pdf.reader.fileviewer.utils.EventUtils;
import com.pdf.reader.fileviewer.utils.FileUtils;
import com.pdf.reader.fileviewer.utils.MMKVKeys;
import com.pdf.reader.fileviewer.utils.MMKVKeysKt;
import com.pdf.reader.fileviewer.utils.PermissionUtils;
import com.tom_roush.fontbox.ttf.NamingTable;
import com.wxiwei.office.fc.hpsf.Constants;
import com.wxiwei.office.macro.Application;
import com.yandex.div.core.dagger.Names;
import com.yandex.div.state.db.StateEntry;
import java.util.ArrayList;
import java.util.Map;
import kotlin.Metadata;
import kotlin.Pair;
import kotlin.TuplesKt;
import kotlin.Unit;
import kotlin.collections.CollectionsKt;
import kotlin.collections.MapsKt;
import kotlin.coroutines.CoroutineContext;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.Ref;
import kotlin.random.Random;
import kotlinx.coroutines.BuildersKt;
import kotlinx.coroutines.CoroutineScopeKt;
import kotlinx.coroutines.CoroutineStart;
import kotlinx.coroutines.Dispatchers;

@Metadata(d1 = {"\u0000@\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0003\n\u0002\u0010\b\n\u0002\b\u0003\n\u0002\u0010\t\n\u0002\b\t\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\n\u0002\b\b\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0007\bÆ\u0002\u0018\u00002\u00020\u0001B\t\b\u0002¢\u0006\u0004\b\u0002\u0010\u0003J*\u0010\u0012\u001a\u00020\u00132\u0006\u0010\u0014\u001a\u00020\u00152\u0006\u0010\u0016\u001a\u00020\u00172\b\u0010\u0018\u001a\u0004\u0018\u00010\u00172\b\u0010\u0019\u001a\u0004\u0018\u00010\u0017J \u0010\u001a\u001a\u00020\u00132\u0006\u0010\u0014\u001a\u00020\u00152\u0006\u0010\u001b\u001a\u00020\u00172\b\u0010\u001c\u001a\u0004\u0018\u00010\u0017J\u0016\u0010\u001d\u001a\u00020\u00132\u0006\u0010\u0014\u001a\u00020\u00152\u0006\u0010\u001b\u001a\u00020\u0017J(\u0010\u001e\u001a\u00020\u00132\u0006\u0010\u001f\u001a\u00020 2\u0006\u0010!\u001a\u00020\u00052\u0006\u0010\"\u001a\u00020\u00052\u0006\u0010#\u001a\u00020\u0005H\u0002J\u0016\u0010$\u001a\u00020\u00132\u0006\u0010\u0014\u001a\u00020\u00152\u0006\u0010\u001b\u001a\u00020\u0017J\"\u0010%\u001a\u00020&2\u0006\u0010\u0014\u001a\u00020\u00152\u0006\u0010\u0016\u001a\u00020\u00172\b\u0010'\u001a\u0004\u0018\u00010\u0017H\u0002J2\u0010(\u001a\u00020&2\u0006\u0010\u0014\u001a\u00020\u00152\u0006\u0010\u001b\u001a\u00020\u00172\u0006\u0010)\u001a\u00020\u00052\u0006\u0010*\u001a\u00020\u00052\b\u0010+\u001a\u0004\u0018\u00010\u0017H\u0002J(\u0010,\u001a\u00020&2\u0006\u0010\u0014\u001a\u00020\u00152\u0006\u0010\u001b\u001a\u00020\u00172\u0006\u0010)\u001a\u00020\u00052\u0006\u0010*\u001a\u00020\u0005H\u0002R\u0011\u0010\u0004\u001a\u00020\u0005¢\u0006\b\n\u0000\u001a\u0004\b\u0006\u0010\u0007R\u001a\u0010\b\u001a\u00020\tX\u0086\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\n\u0010\u000b\"\u0004\b\f\u0010\rR\u0014\u0010\u000e\u001a\u00020\u0005X\u0086D¢\u0006\b\n\u0000\u001a\u0004\b\u000f\u0010\u0007R\u0014\u0010\u0010\u001a\u00020\tX\u0086D¢\u0006\b\n\u0000\u001a\u0004\b\u0011\u0010\u000b¨\u0006-"}, d2 = {"Lcom/pdf/reader/fileviewer/notification/RecallHandler;", "", "<init>", "()V", "PUSH_TIME_INTERVAL", "", "getPUSH_TIME_INTERVAL", "()I", "notificationSendingTime", "", "getNotificationSendingTime", "()J", "setNotificationSendingTime", "(J)V", "normalNotificatiobId", "getNormalNotificatiobId", "notificationDelay", "getNotificationDelay", "handle", "", Names.CONTEXT, "Landroid/content/Context;", StateEntry.COLUMN_PATH, "", NamingTable.TAG, "type", "recall", "from", "scene", "recallClean", "setViewImage", "remoteViews", "Landroid/widget/RemoteViews;", StateEntry.COLUMN_ID, "res", "resDefault", "recallAntivirus", "getPendingIntent", "Landroid/app/PendingIntent;", "fileType", "getPendingIntentSplash", AppLoggerParam.EVENT_PARAM_CODE, "time", "adScene", "getPendingIntentBackground", "com.pdf.reader.fileviewer-55_release"}, k = 1, mv = {2, 1, 0}, xi = 48)
public final class RecallHandler {
    public static final RecallHandler INSTANCE = new RecallHandler();
    private static final int PUSH_TIME_INTERVAL = 300000;
    private static final int normalNotificatiobId = Constants.CP_MAC_JAPAN;
    private static final long notificationDelay = 4000;
    private static long notificationSendingTime;

    public final int getNormalNotificatiobId() {
        return normalNotificatiobId;
    }

    public final long getNotificationDelay() {
        return notificationDelay;
    }

    public final long getNotificationSendingTime() {
        return notificationSendingTime;
    }

    public final int getPUSH_TIME_INTERVAL() {
        return PUSH_TIME_INTERVAL;
    }

    public final void setNotificationSendingTime(long j) {
        notificationSendingTime = j;
    }

    private RecallHandler() {
    }

    public final void handle(final Context context, final String path, String name, final String type) {
        String str;
        String str2;
        Intrinsics.checkNotNullParameter(context, Names.CONTEXT);
        Intrinsics.checkNotNullParameter(path, StateEntry.COLUMN_PATH);
        if (LambdaAdSdk.INSTANCE.isForeground()) {
            EventUtils.INSTANCE.log("pushView", BundleKt.bundleOf(new Pair[]{TuplesKt.to("type", "file"), TuplesKt.to("status", "foreground")}));
            return;
        }
        if (!NotificationUtils.areNotificationsEnabled()) {
            EventUtils.INSTANCE.log("pushView", BundleKt.bundleOf(new Pair[]{TuplesKt.to("type", "file"), TuplesKt.to("status", "noPermission")}));
            return;
        }
        EventUtils.INSTANCE.log("pushView", BundleKt.bundleOf(new Pair[]{TuplesKt.to("type", "file"), TuplesKt.to("status", com.trustlook.sdk.Constants.PAYLOAD_SUCCESS), TuplesKt.to("file", type)}));
        final RemoteViews remoteViews = new RemoteViews(context.getPackageName(), R.layout.layout_notification_text);
        if (TextUtils.isEmpty(path)) {
            str = "";
            str2 = "";
        } else {
            str = FileUtils.INSTANCE.getName(path);
            str2 = FileUtils.INSTANCE.getFileExtension(path);
        }
        if (name != null) {
            str2 = String.valueOf(type);
            str = name;
        }
        remoteViews.setTextViewText(R.id.tv_title, str + "." + str2);
        remoteViews.setTextViewText(R.id.tv_des, context.getString(R.string.push_hint));
        final RemoteViews remoteViews2 = new RemoteViews(context.getPackageName(), R.layout.layout_notification_text_big);
        remoteViews2.setTextViewText(R.id.tv_title, str + "." + str2);
        remoteViews2.setTextViewText(R.id.tv_des, context.getString(R.string.push_hint));
        Random.Default.nextInt(Application.THUMBNAILSIZE);
        int i = normalNotificatiobId;
        NotificationUtils.ChannelConfig channelConfig = new NotificationUtils.ChannelConfig("10000", "10000", 4);
        NotificationChannel notificationChannel = channelConfig.getNotificationChannel();
        if (Build.VERSION.SDK_INT >= 26) {
            notificationChannel.setSound(null, null);
            notificationChannel.enableVibration(false);
            notificationChannel.enableLights(false);
            notificationChannel.setLightColor(-65536);
            notificationChannel.setShowBadge(false);
        }
        Unit unit = Unit.INSTANCE;
        NotificationUtils.notify("10000", i, channelConfig, new Utils.Consumer() {
            public final void accept(Object obj) {
                RecallHandler.handle$lambda$2(path, context, remoteViews, remoteViews2, type, (NotificationCompat.Builder) obj);
            }
        });
    }

    public static final void handle$lambda$2(String str, Context context, RemoteViews remoteViews, RemoteViews remoteViews2, String str2, NotificationCompat.Builder builder) {
        builder.setSmallIcon(R.mipmap.ic_notification);
        builder.setContentTitle(FileUtils.INSTANCE.getName(str) + "." + FileUtils.INSTANCE.getFileExtension(str));
        builder.setContentText(context.getString(R.string.push_hint));
        builder.setCustomContentView(remoteViews);
        builder.setCustomBigContentView(remoteViews2);
        builder.setCustomHeadsUpContentView(remoteViews);
        builder.setNumber(0);
        builder.setStyle(new NotificationCompat.DecoratedCustomViewStyle());
        builder.setPriority(2);
        builder.setVisibility(1);
        RecallHandler recallHandler = INSTANCE;
        builder.setFullScreenIntent(recallHandler.getPendingIntent(context, str, str2), true);
        builder.setContentIntent(recallHandler.getPendingIntent(context, str, str2));
        builder.setGroup(String.valueOf(System.currentTimeMillis()));
        builder.setForegroundServiceBehavior(1);
    }

    public final void recall(android.content.Context r25, java.lang.String r26, java.lang.String r27) {
        throw new UnsupportedOperationException("Method not decompiled: com.pdf.reader.fileviewer.notification.RecallHandler.recall(android.content.Context, java.lang.String, java.lang.String):void");
    }

    public final void recallClean(Context context, String from) {
        long j;
        Object obj;
        Intrinsics.checkNotNullParameter(context, Names.CONTEXT);
        Intrinsics.checkNotNullParameter(from, "from");
        if (NotificationUtils.areNotificationsEnabled()) {
            EventUtils.INSTANCE.log(com.pdf.reader.fileviewer.Constants.notiSuccess, BundleKt.bundleOf());
        }
        long currentTimeMillis = System.currentTimeMillis();
        if (currentTimeMillis - notificationSendingTime < notificationDelay * 10) {
            EventUtils.INSTANCE.log("pushView", BundleKt.bundleOf(new Pair[]{TuplesKt.to("type", from), TuplesKt.to("status", "other sending")}));
            return;
        }
        if (UnlockScreenBroadcastReceiver.INSTANCE.isLock()) {
            EventUtils.INSTANCE.log("pushView", BundleKt.bundleOf(new Pair[]{TuplesKt.to("type", from), TuplesKt.to("status", "lockOn")}));
            return;
        }
        if (!NotificationUtils.areNotificationsEnabled()) {
            EventUtils.INSTANCE.log("pushView", BundleKt.bundleOf(new Pair[]{TuplesKt.to("type", from), TuplesKt.to("status", "noPermission")}));
            return;
        }
        if (LambdaAdSdk.INSTANCE.isForeground()) {
            EventUtils.INSTANCE.log("pushView", BundleKt.bundleOf(new Pair[]{TuplesKt.to("type", from), TuplesKt.to("status", "foreground")}));
            return;
        }
        PushConfig pushConfig = AdUtils.INSTANCE.getPushConfig();
        if (pushConfig == null) {
            return;
        }
        if (!Intrinsics.areEqual(pushConfig.getEnable(), true)) {
            EventUtils.INSTANCE.log("pushView", BundleKt.bundleOf(new Pair[]{TuplesKt.to("type", from), TuplesKt.to("status", "disabled")}));
            return;
        }
        if (currentTimeMillis - MMKVKeysKt.getMMKVLong$default(MMKVKeys.keyInstallTime, 0L, 1, null) < (pushConfig.getCleanInterval() != null ? r11.intValue() : 0) * 1000) {
            EventUtils.INSTANCE.log("pushView", BundleKt.bundleOf(new Pair[]{TuplesKt.to("type", from), TuplesKt.to("status", "interval")}));
            return;
        }
        if (currentTimeMillis - MMKVKeysKt.getMMKVLong$default(MMKVKeys.keyRecallCleanInterval, 0L, 1, null) < (pushConfig.getCleanInterval() != null ? r0.intValue() : 0) * 1000) {
            EventUtils.INSTANCE.log("pushView", BundleKt.bundleOf(new Pair[]{TuplesKt.to("type", from), TuplesKt.to("status", "interval")}));
            return;
        }
        MMKVKeysKt.putMMKVLong(MMKVKeys.keyRecallCleanInterval, currentTimeMillis);
        ArrayList arrayList = new ArrayList();
        arrayList.add(MapsKt.mapOf(new Pair[]{TuplesKt.to("title", context.getString(R.string.recall_clean_hint1)), TuplesKt.to(InstallSuccessBroadcastReceiver.ACTION_ICON, Integer.valueOf(R.mipmap.ic_recall_memory)), TuplesKt.to("icon_big", Integer.valueOf(R.mipmap.ic_recall_memory)), TuplesKt.to("btn", context.getString(R.string.scan)), TuplesKt.to("btn_big", context.getString(R.string.scan_now)), TuplesKt.to("title_big", context.getString(R.string.recall_clean_hint1))}));
        arrayList.add(MapsKt.mapOf(new Pair[]{TuplesKt.to("title", "<font color='#FA3A43'>12.8GB</font> " + context.getString(R.string.recall_clean_hint2)), TuplesKt.to(InstallSuccessBroadcastReceiver.ACTION_ICON, Integer.valueOf(R.mipmap.ic_recall_clean)), TuplesKt.to("icon_big", Integer.valueOf(R.mipmap.ic_recall_clean)), TuplesKt.to("btn", context.getString(R.string.clean_str)), TuplesKt.to("btn_big", context.getString(R.string.clean_now)), TuplesKt.to("red_text", "12.8GB"), TuplesKt.to("title_big", context.getString(R.string.recall_clean_hint2))}));
        if (PermissionUtils.INSTANCE.permission(context)) {
            j = currentTimeMillis;
            obj = "use_percentage";
            arrayList.add(MapsKt.mapOf(new Pair[]{TuplesKt.to("title", context.getString(R.string.recall_clean_hint3)), TuplesKt.to("title2", context.getString(R.string.recall_clean_hint33)), TuplesKt.to(InstallSuccessBroadcastReceiver.ACTION_ICON, Integer.valueOf(R.mipmap.ic_recall_memory)), TuplesKt.to("icon_big", Integer.valueOf(R.mipmap.ic_recall_memory)), TuplesKt.to("btn", context.getString(R.string.scan)), TuplesKt.to(obj, Integer.valueOf((int) ((((r9 - DeviceUtils.INSTANCE.getAvailableMemoryInfo()) * 1.0d) / DeviceUtils.INSTANCE.getTotalRom()) * 100))), TuplesKt.to("btn_big", context.getString(R.string.scan_now)), TuplesKt.to("title_big", context.getString(R.string.recall_clean_hint3)), TuplesKt.to("title_big2", context.getString(R.string.recall_clean_hint33))}));
        } else {
            j = currentTimeMillis;
            obj = "use_percentage";
        }
        int nextInt = Random.Default.nextInt(arrayList.size());
        RemoteViews remoteViews = new RemoteViews(context.getPackageName(), R.layout.layout_notification_clean_small);
        remoteViews.setTextViewText(R.id.tv_title, Html.fromHtml(String.valueOf(((Map) arrayList.get(nextInt)).get("title")), 0));
        remoteViews.setTextViewText(R.id.tv_btn, String.valueOf(((Map) arrayList.get(nextInt)).get("btn")));
        int i = R.id.iv_icon;
        Object obj2 = ((Map) arrayList.get(nextInt)).get(InstallSuccessBroadcastReceiver.ACTION_ICON);
        Intrinsics.checkNotNull(obj2, "null cannot be cast to non-null type kotlin.Int");
        remoteViews.setImageViewResource(i, ((Integer) obj2).intValue());
        if (Intrinsics.areEqual(((Map) arrayList.get(nextInt)).get("btn"), context.getString(R.string.scan))) {
            INSTANCE.setViewImage(remoteViews, R.id.iv_btn, R.drawable.ic_anim_s_scan, R.drawable.shape_notification_scan_bg);
        } else {
            INSTANCE.setViewImage(remoteViews, R.id.iv_btn, R.drawable.ic_anim_s_clean, R.drawable.shape_notification_clean_bg);
        }
        if (((Map) arrayList.get(nextInt)).get(obj) != null) {
            remoteViews.setViewVisibility(R.id.pb, 0);
            remoteViews.setViewVisibility(R.id.tv_red2, 0);
            remoteViews.setViewVisibility(R.id.tv_red3, 0);
            remoteViews.setProgressBar(R.id.pb, 100, Integer.parseInt(String.valueOf(((Map) arrayList.get(nextInt)).get(obj))), false);
            remoteViews.setTextViewText(R.id.tv_red2, " " + ((Map) arrayList.get(nextInt)).get(obj) + "% ");
            remoteViews.setTextViewText(R.id.tv_red3, String.valueOf(((Map) arrayList.get(nextInt)).get("title2")));
        }
        RemoteViews remoteViews2 = new RemoteViews(context.getPackageName(), R.layout.layout_notification_clean_big);
        remoteViews2.setTextViewText(R.id.tv_title, String.valueOf(((Map) arrayList.get(nextInt)).get("title_big")));
        if (((Map) arrayList.get(nextInt)).get("red_text") != null) {
            remoteViews2.setViewVisibility(R.id.tv_red, 0);
            remoteViews2.setTextViewText(R.id.tv_red, String.valueOf(((Map) arrayList.get(nextInt)).get("red_text")));
        }
        int i2 = R.id.iv_icon;
        Object obj3 = ((Map) arrayList.get(nextInt)).get("icon_big");
        Intrinsics.checkNotNull(obj3, "null cannot be cast to non-null type kotlin.Int");
        remoteViews2.setImageViewResource(i2, ((Integer) obj3).intValue());
        remoteViews2.setTextViewText(R.id.tv_btn, String.valueOf(((Map) arrayList.get(nextInt)).get("btn_big")));
        if (Intrinsics.areEqual(((Map) arrayList.get(nextInt)).get("btn"), context.getString(R.string.scan))) {
            INSTANCE.setViewImage(remoteViews2, R.id.iv_btn, R.drawable.ic_anim_b_scan, R.drawable.shape_notification_scan_bg_b);
        } else {
            INSTANCE.setViewImage(remoteViews2, R.id.iv_btn, R.drawable.ic_anim_b_clean, R.drawable.shape_notification_clean_bg_b);
        }
        if (((Map) arrayList.get(nextInt)).get(obj) != null) {
            remoteViews2.setViewVisibility(R.id.pb, 0);
            remoteViews2.setViewVisibility(R.id.tv_red2, 0);
            remoteViews2.setViewVisibility(R.id.tv_red3, 0);
            remoteViews2.setProgressBar(R.id.pb, 100, Integer.parseInt(String.valueOf(((Map) arrayList.get(nextInt)).get(obj))), false);
            remoteViews2.setTextViewText(R.id.tv_red2, " " + ((Map) arrayList.get(nextInt)).get(obj) + "% ");
            remoteViews2.setTextViewText(R.id.tv_red3, String.valueOf(((Map) arrayList.get(nextInt)).get("title2")));
        }
        Ref.IntRef intRef = new Ref.IntRef();
        intRef.element = Random.Default.nextInt(Application.THUMBNAILSIZE);
        notificationSendingTime = j;
        BuildersKt.launch$default(CoroutineScopeKt.CoroutineScope(Dispatchers.getIO()), (CoroutineContext) null, (CoroutineStart) null, new RecallHandler$recallClean$1(from, remoteViews, remoteViews2, context, intRef, null), 3, (Object) null);
    }

    private final void setViewImage(RemoteViews remoteViews, int id, int res, int resDefault) {
        if (Build.VERSION.SDK_INT > 27) {
            remoteViews.setImageViewResource(id, res);
        } else {
            remoteViews.setImageViewResource(id, resDefault);
        }
    }

    public final void recallAntivirus(Context context, String from) {
        Intrinsics.checkNotNullParameter(context, Names.CONTEXT);
        Intrinsics.checkNotNullParameter(from, "from");
        if (NotificationUtils.areNotificationsEnabled()) {
            EventUtils.INSTANCE.log(com.pdf.reader.fileviewer.Constants.notiSuccess, BundleKt.bundleOf());
        }
        if (UnlockScreenBroadcastReceiver.INSTANCE.isLock()) {
            EventUtils.INSTANCE.log("pushView", BundleKt.bundleOf(new Pair[]{TuplesKt.to("type", from), TuplesKt.to("status", "lockOn")}));
            return;
        }
        if (!NotificationUtils.areNotificationsEnabled()) {
            EventUtils.INSTANCE.log("pushView", BundleKt.bundleOf(new Pair[]{TuplesKt.to("type", from), TuplesKt.to("status", "noPermission")}));
            return;
        }
        if (LambdaAdSdk.INSTANCE.isForeground()) {
            EventUtils.INSTANCE.log("pushView", BundleKt.bundleOf(new Pair[]{TuplesKt.to("type", from), TuplesKt.to("status", "foreground")}));
            return;
        }
        long currentTimeMillis = System.currentTimeMillis();
        if (currentTimeMillis - notificationSendingTime < notificationDelay * 10) {
            EventUtils.INSTANCE.log("pushView", BundleKt.bundleOf(new Pair[]{TuplesKt.to("type", from), TuplesKt.to("status", "other sending")}));
            return;
        }
        PushConfig pushConfig = AdUtils.INSTANCE.getPushConfig();
        if (pushConfig == null) {
            return;
        }
        if (!Intrinsics.areEqual(pushConfig.getEnable(), true)) {
            EventUtils.INSTANCE.log("pushView", BundleKt.bundleOf(new Pair[]{TuplesKt.to("type", from), TuplesKt.to("status", "disabled")}));
            return;
        }
        if (currentTimeMillis - MMKVKeysKt.getMMKVLong$default(MMKVKeys.keyInstallTime, 0L, 1, null) < (pushConfig.getAntivirusInterval() != null ? r14.intValue() : 0) * 1000) {
            EventUtils.INSTANCE.log("pushView", BundleKt.bundleOf(new Pair[]{TuplesKt.to("type", from), TuplesKt.to("status", "interval")}));
            return;
        }
        if (currentTimeMillis - MMKVKeysKt.getMMKVLong$default(MMKVKeys.keyRecallAntivirusInterval, 0L, 1, null) < (pushConfig.getAntivirusInterval() != null ? r0.intValue() : 0) * 1000) {
            EventUtils.INSTANCE.log("pushView", BundleKt.bundleOf(new Pair[]{TuplesKt.to("type", from), TuplesKt.to("status", "interval")}));
            return;
        }
        MMKVKeysKt.putMMKVLong(MMKVKeys.keyRecallAntivirusInterval, currentTimeMillis);
        ArrayList arrayListOf = CollectionsKt.arrayListOf(new Map[]{MapsKt.mapOf(new Pair[]{TuplesKt.to("title", context.getString(R.string.recall_antivirus_hint1)), TuplesKt.to(InstallSuccessBroadcastReceiver.ACTION_ICON, Integer.valueOf(R.mipmap.ic_recall_antivirus_s)), TuplesKt.to("icon_big", Integer.valueOf(R.mipmap.ic_recall_antivirus)), TuplesKt.to("btn", context.getString(R.string.clean_str)), TuplesKt.to("btn_big", context.getString(R.string.clean_now)), TuplesKt.to("title_big", context.getString(R.string.recall_antivirus_hint1))}), MapsKt.mapOf(new Pair[]{TuplesKt.to("title", context.getString(R.string.recall_antivirus_hint2)), TuplesKt.to(InstallSuccessBroadcastReceiver.ACTION_ICON, Integer.valueOf(R.mipmap.ic_recall_antivirus_s)), TuplesKt.to("icon_big", Integer.valueOf(R.mipmap.ic_recall_antivirus)), TuplesKt.to("btn", context.getString(R.string.clean_str)), TuplesKt.to("btn_big", context.getString(R.string.clean_now)), TuplesKt.to("title_big", context.getString(R.string.recall_antivirus_hint2))})});
        int nextInt = Random.Default.nextInt(arrayListOf.size());
        RemoteViews remoteViews = new RemoteViews(context.getPackageName(), R.layout.layout_notification_clean_small);
        remoteViews.setTextViewText(R.id.tv_title, String.valueOf(((Map) arrayListOf.get(nextInt)).get("title")));
        remoteViews.setTextViewText(R.id.tv_btn, String.valueOf(((Map) arrayListOf.get(nextInt)).get("btn")));
        int i = R.id.iv_icon;
        Object obj = ((Map) arrayListOf.get(nextInt)).get(InstallSuccessBroadcastReceiver.ACTION_ICON);
        Intrinsics.checkNotNull(obj, "null cannot be cast to non-null type kotlin.Int");
        remoteViews.setImageViewResource(i, ((Integer) obj).intValue());
        RecallHandler recallHandler = INSTANCE;
        recallHandler.setViewImage(remoteViews, R.id.iv_btn, R.drawable.ic_anim_s_antivirus, R.drawable.shape_notification_antivirus_clean_bg);
        if (((Map) arrayListOf.get(nextInt)).get("use_percentage") != null) {
            remoteViews.setViewVisibility(R.id.pb, 0);
            remoteViews.setProgressBar(R.id.pb, 100, Integer.parseInt(String.valueOf(((Map) arrayListOf.get(nextInt)).get("use_percentage"))), false);
        }
        RemoteViews remoteViews2 = new RemoteViews(context.getPackageName(), R.layout.layout_notification_clean_big);
        remoteViews2.setTextViewText(R.id.tv_title, String.valueOf(((Map) arrayListOf.get(nextInt)).get("title_big")));
        int i2 = R.id.iv_icon;
        Object obj2 = ((Map) arrayListOf.get(nextInt)).get("icon_big");
        Intrinsics.checkNotNull(obj2, "null cannot be cast to non-null type kotlin.Int");
        remoteViews2.setImageViewResource(i2, ((Integer) obj2).intValue());
        remoteViews2.setTextViewText(R.id.tv_btn, String.valueOf(((Map) arrayListOf.get(nextInt)).get("btn_big")));
        recallHandler.setViewImage(remoteViews2, R.id.iv_btn, R.drawable.ic_anim_b_antivirus, R.drawable.shape_notification_antivirus_clean_bg_b);
        if (((Map) arrayListOf.get(nextInt)).get("use_percentage") != null) {
            remoteViews2.setViewVisibility(R.id.pb, 0);
            remoteViews2.setProgressBar(R.id.pb, 100, Integer.parseInt(String.valueOf(((Map) arrayListOf.get(nextInt)).get("use_percentage"))), false);
        }
        Ref.IntRef intRef = new Ref.IntRef();
        intRef.element = Random.Default.nextInt(Application.THUMBNAILSIZE) + Application.THUMBNAILSIZE;
        notificationSendingTime = currentTimeMillis;
        BuildersKt.launch$default(CoroutineScopeKt.CoroutineScope(Dispatchers.getIO()), (CoroutineContext) null, (CoroutineStart) null, new RecallHandler$recallAntivirus$1(from, remoteViews, remoteViews2, context, intRef, null), 3, (Object) null);
    }

    private final PendingIntent getPendingIntent(Context context, String path, String fileType) {
        TaskStackBuilder create = TaskStackBuilder.create(context);
        Intrinsics.checkNotNullExpressionValue(create, "create(...)");
        Intent intent = new Intent(context, (Class<?>) SplashActivity.class);
        if (!TextUtils.isEmpty(path)) {
            intent.setData(Uri.parse(path));
        }
        intent.putExtra("from_source", "push");
        intent.putExtra("push_type", "file");
        intent.putExtra("file_type", fileType);
        create.addNextIntentWithParentStack(intent);
        PendingIntent pendingIntent = create.getPendingIntent(10000, 201326592);
        Intrinsics.checkNotNull(pendingIntent);
        return pendingIntent;
    }

    public final PendingIntent getPendingIntentSplash(Context context, String from, int code, int time, String adScene) {
        Intent intent = new Intent(context, (Class<?>) SplashActivity.class);
        intent.setFlags(268435456);
        intent.putExtra("from_source", "push");
        intent.putExtra("push_type", from);
        if (!TextUtils.isEmpty(adScene)) {
            intent.putExtra("push_ad_click_scene", adScene);
        }
        intent.putExtra("time", String.valueOf(time));
        PendingIntent activity = PendingIntent.getActivity(context, code, intent, 201326592);
        Intrinsics.checkNotNull(activity);
        return activity;
    }

    private final PendingIntent getPendingIntentBackground(Context context, String from, int code, int time) {
        Intent launchIntentForPackage = context.getPackageManager().getLaunchIntentForPackage(context.getPackageName());
        Intrinsics.checkNotNull(launchIntentForPackage);
        launchIntentForPackage.setFlags(274726912);
        PendingIntent activity = PendingIntent.getActivity(context, code, launchIntentForPackage, 201326592);
        Intrinsics.checkNotNull(activity);
        return activity;
    }
}