导航菜单

页面标题

页面副标题

Dostt v1.0.89 - g0.java 源代码

正在查看: Dostt v1.0.89 应用的 g0.java JAVA 源代码文件

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


package L1;

import N1.d;
import android.app.AlarmManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import app.notifee.core.Logger;
import app.notifee.core.NotificationAlarmReceiver;
import app.notifee.core.model.NotificationModel;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class g0 {

    public static final ExecutorService f2752a;

    public static final com.google.common.util.concurrent.r f2753b;

    static {
        ExecutorService newCachedThreadPool = Executors.newCachedThreadPool();
        f2752a = newCachedThreadPool;
        f2753b = com.google.common.util.concurrent.s.b(newCachedThreadPool);
    }

    public static PendingIntent a(String str) {
        try {
            Context context = lk.f.a;
            Intent intent = new Intent(context, (Class<?>) NotificationAlarmReceiver.class);
            intent.putExtra("notificationId", str);
            return PendingIntent.getBroadcast(context, str.hashCode(), intent, 167772160);
        } catch (Exception e7) {
            Logger.e("NotifeeAlarmManager", "Unable to create AlarmManager intent", e7);
            return null;
        }
    }

    public static com.google.common.util.concurrent.p b() {
        return new lk.h(M1.i.i(lk.f.a).j(Boolean.TRUE)).a(new com.google.common.util.concurrent.d() {
            public final com.google.common.util.concurrent.p apply(Object obj) {
                return g0.e((List) obj);
            }
        }, f2753b);
    }

    public static com.google.common.util.concurrent.p c(Bundle bundle, NotificationModel notificationModel, String str, lk.v vVar, Void r52) {
        if (!bundle.containsKey("repeatFrequency") || lk.q.a(bundle.get("repeatFrequency")) == -1) {
            M1.i.i(lk.f.a).l(str);
        } else {
            N1.d dVar = new N1.d(bundle);
            dVar.a();
            g(notificationModel, dVar);
            M1.i.i(lk.f.a).y(new lk.v(str, vVar.b, lk.q.c(bundle), Boolean.TRUE));
        }
        return com.google.common.util.concurrent.j.c((Object) null);
    }

    public static com.google.common.util.concurrent.p d(final String str, final lk.v vVar) {
        byte[] bArr;
        if (vVar == null || vVar.b == null || (bArr = vVar.c) == null) {
            Logger.w("NotifeeAlarmManager", "Attempted to handle doScheduledWork but no notification data was found.");
            return com.google.common.util.concurrent.j.c((Object) null);
        }
        final Bundle b7 = lk.q.b(bArr);
        final NotificationModel notificationModel = new NotificationModel(lk.q.b(vVar.b));
        return new lk.h(E0.y(notificationModel, b7)).a(new com.google.common.util.concurrent.d() {
            public final com.google.common.util.concurrent.p apply(Object obj) {
                return g0.c(b7, notificationModel, str, vVar, (Void) obj);
            }
        }, f2752a);
    }

    public static com.google.common.util.concurrent.p e(List list) {
        if (list != null) {
            Iterator it = list.iterator();
            while (it.hasNext()) {
                PendingIntent a7 = a(((lk.v) it.next()).a);
                AlarmManager a8 = lk.a.a();
                if (a7 != null) {
                    a8.cancel(a7);
                }
            }
        }
        return com.google.common.util.concurrent.j.c((Object) null);
    }

    public static void f(Bundle bundle) {
        final String string;
        if (bundle == null || (string = bundle.getString("notificationId")) == null) {
            return;
        }
        lk.h hVar = new lk.h(new M1.i(lk.f.a).p(string));
        com.google.common.util.concurrent.d dVar = new com.google.common.util.concurrent.d() {
            public final com.google.common.util.concurrent.p apply(Object obj) {
                return g0.d(string, (lk.v) obj);
            }
        };
        ExecutorService executorService = f2752a;
        hVar.a(dVar, executorService).b(new lk.b() {
            public final void a(Exception exc, Object obj) {
                g0.h(exc, obj);
            }
        }, executorService);
    }

    public static void g(NotificationModel notificationModel, N1.d dVar) {
        boolean canScheduleExactAlarms;
        PendingIntent a7 = a(notificationModel.c());
        AlarmManager a8 = lk.a.a();
        d.a aVar = dVar.f3160e;
        if (Build.VERSION.SDK_INT >= 31 && Arrays.asList(d.a.SET_EXACT, d.a.SET_EXACT_AND_ALLOW_WHILE_IDLE, d.a.SET_ALARM_CLOCK).contains(aVar)) {
            canScheduleExactAlarms = a8.canScheduleExactAlarms();
            if (!canScheduleExactAlarms) {
                System.err.println("Missing SCHEDULE_EXACT_ALARM permission. Trigger not scheduled. See: https://notifee.app/react-native/docs/triggers#android-12-limitations");
                return;
            }
        }
        dVar.a();
        int ordinal = aVar.ordinal();
        if (ordinal == 0) {
            a8.set(1, dVar.f3162g.longValue(), a7);
            return;
        }
        if (ordinal == 1) {
            androidx.core.app.e.b(a8, 0, dVar.f3162g.longValue(), a7);
            return;
        }
        if (ordinal == 2) {
            androidx.core.app.e.c(a8, 0, dVar.f3162g.longValue(), a7);
            return;
        }
        if (ordinal == 3) {
            androidx.core.app.e.d(a8, 0, dVar.f3162g.longValue(), a7);
        } else {
            if (ordinal != 4) {
                return;
            }
            Context context = lk.f.a;
            androidx.core.app.e.a(a8, dVar.f3162g.longValue(), PendingIntent.getActivity(context, notificationModel.c().hashCode(), context.getPackageManager().getLaunchIntentForPackage(context.getPackageName()), 201326592), a7);
        }
    }

    public static void h(Exception exc, Object obj) {
        if (exc != null) {
            Logger.e("NotifeeAlarmManager", "Failed to display notification", exc);
        }
    }

    public void i() {
        Logger.d("NotifeeAlarmManager", "Reschedule Notifications on reboot");
        com.google.common.util.concurrent.j.a(new M1.i(lk.f.a).j(Boolean.TRUE), new a(), f2753b);
    }

    public class a implements com.google.common.util.concurrent.i {
        public a() {
        }

        public void onSuccess(Object obj) {
            byte[] bArr;
            for (lk.v vVar : (List) obj) {
                g0.this.getClass();
                byte[] bArr2 = vVar.b;
                if (bArr2 != null && (bArr = vVar.c) != null) {
                    Bundle b7 = lk.q.b(bArr);
                    NotificationModel notificationModel = new NotificationModel(lk.q.b(bArr2));
                    if (lk.q.a(b7.get("type")) == 0) {
                        N1.d dVar = new N1.d(b7);
                        if (dVar.f3159d.booleanValue()) {
                            g0.g(notificationModel, dVar);
                        }
                    }
                }
            }
        }

        public void a(Throwable th) {
        }
    }
}