导航菜单

页面标题

页面副标题

Kahramaa v15.23.3 - KMFirebaseMessagingService.java 源代码

正在查看: Kahramaa v15.23.3 应用的 KMFirebaseMessagingService.java JAVA 源代码文件

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


package com.qa.kahramaa.kahramaa.base.firebasemessaging;

import a0.t;
import aa.v;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Intent;
import android.media.RingtoneManager;
import android.net.Uri;
import android.os.Build;
import com.google.firebase.messaging.FirebaseMessagingService;
import com.qa.kahramaa.kahramaa.base.BaseApplication;
import com.qa.kahramaa.kahramaa.base.activities.MainActivity;
import com.qa.kahramaa.kahramaa.base.retrofit.WebServiceFactoryV2;
import com.qa.kahramaa.kahramaa.base.retrofit.c;
import ib.d;
import ib.r;
import ib.s;
import java.io.IOException;
import java.io.StringWriter;
import java.lang.reflect.Type;
import java.util.Map;
import ma.j;
import ma.p;
import s.h;
import tc.f;

public class KMFirebaseMessagingService extends FirebaseMessagingService {

    public d f3432u;

    @Override
    public final void d(v vVar) {
        f fVar;
        if (s.a(this).getBoolean("is_notif_on", false)) {
            if (((h) vVar.m0()).f13314p > 0) {
                Map<String, String> m02 = vVar.m0();
                try {
                    j jVar = new j();
                    Type type = new a().f13887b;
                    StringWriter stringWriter = new StringWriter();
                    try {
                        jVar.h(m02, type, jVar.f(stringWriter));
                        fVar = (f) jVar.c(f.class, stringWriter.toString());
                    } catch (IOException e10) {
                        throw new p(e10);
                    }
                } catch (Throwable th) {
                    th.printStackTrace();
                    fVar = null;
                }
                if (fVar != null) {
                    Intent intent = new Intent(this, (Class<?>) MainActivity.class);
                    intent.addFlags(67108864);
                    intent.putExtra("Push Notification Data", fVar);
                    PendingIntent activity = PendingIntent.getActivity(this, 0, intent, 1073741824);
                    int i10 = Build.VERSION.SDK_INT;
                    if (i10 >= 26) {
                        if (b.f3433b == null) {
                            synchronized (b.class) {
                                if (b.f3433b == null) {
                                    b.f3433b = new b(this);
                                }
                            }
                        }
                        b.f3433b.a(fVar.g(), fVar.f(), activity);
                    } else {
                        Uri defaultUri = RingtoneManager.getDefaultUri(2);
                        t tVar = new t(this, null);
                        if (i10 > 21) {
                            tVar.f97s.icon = 2131231308;
                            tVar.f94o = b0.a.b(getApplication(), 2131099703);
                            tVar.e(fVar.g());
                            tVar.d(fVar.f());
                            tVar.c(true);
                            tVar.f89j = 2;
                            tVar.g(defaultUri);
                            tVar.f86g = activity;
                        } else {
                            tVar.f97s.icon = 2131231306;
                            tVar.e(fVar.g());
                            tVar.d(fVar.f());
                            tVar.c(true);
                            tVar.f89j = 2;
                            tVar.g(defaultUri);
                            tVar.f86g = activity;
                        }
                        ((NotificationManager) getSystemService("notification")).notify(0, tVar.a());
                    }
                }
            }
            if (vVar.n0() != null) {
                String str = vVar.n0().f656a;
                String str2 = vVar.n0().f657b;
                Intent intent2 = new Intent(this, (Class<?>) bb.a.class);
                intent2.addFlags(67108864);
                PendingIntent activity2 = PendingIntent.getActivity(this, 0, intent2, 1073741824);
                int i11 = Build.VERSION.SDK_INT;
                if (i11 >= 26) {
                    if (b.f3433b == null) {
                        synchronized (b.class) {
                            if (b.f3433b == null) {
                                b.f3433b = new b(this);
                            }
                        }
                    }
                    b.f3433b.a(str, str2, activity2);
                    return;
                }
                Uri defaultUri2 = RingtoneManager.getDefaultUri(2);
                t tVar2 = new t(this, null);
                if (i11 > 21) {
                    tVar2.f97s.icon = 2131231308;
                    tVar2.f94o = b0.a.b(getApplication(), 2131099703);
                    tVar2.e(str);
                    tVar2.d(str2);
                    tVar2.c(true);
                    tVar2.f89j = 2;
                    tVar2.g(defaultUri2);
                    tVar2.f86g = activity2;
                } else {
                    tVar2.f97s.icon = 2131231306;
                    tVar2.e(str);
                    tVar2.d(str2);
                    tVar2.c(true);
                    tVar2.f89j = 2;
                    tVar2.g(defaultUri2);
                    tVar2.f86g = activity2;
                }
                ((NotificationManager) getSystemService("notification")).notify(0, tVar2.a());
            }
        }
    }

    @Override
    public final void e(String str) {
        String str2;
        String str3;
        String str4;
        String str5;
        d dVar = ((BaseApplication) getApplication()).f3426n.f8726a.get();
        this.f3432u = dVar;
        String str6 = "Not found";
        String str7 = null;
        if (dVar.k() != null) {
            this.f3432u.k();
            try {
                str4 = Build.VERSION.RELEASE;
            } catch (Throwable unused) {
                str4 = null;
            }
            if (str4 != null) {
                try {
                    str7 = Build.VERSION.RELEASE;
                } catch (Throwable unused2) {
                }
                str5 = str7;
            } else {
                str5 = "Not found";
            }
            try {
                if (r.c() != null) {
                    str6 = r.c();
                }
            } catch (Exception e10) {
                e10.printStackTrace();
            }
            WebServiceFactoryV2.c(new c(com.qa.kahramaa.kahramaa.base.retrofit.d.a().f3469d, 0)).l1(new zb.d("", "", str, this.f3432u.g(), this.f3432u.f(), str5, str6)).enqueue(new com.qa.kahramaa.kahramaa.base.retrofit.h(getApplication(), new a.a()));
        } else {
            try {
                str2 = Build.VERSION.RELEASE;
            } catch (Throwable unused3) {
                str2 = null;
            }
            if (str2 != null) {
                try {
                    str7 = Build.VERSION.RELEASE;
                } catch (Throwable unused4) {
                }
                str3 = str7;
            } else {
                str3 = "Not found";
            }
            try {
                if (r.c() != null) {
                    str6 = r.c();
                }
            } catch (Exception e11) {
                e11.printStackTrace();
            }
            WebServiceFactoryV2.c(new c(com.qa.kahramaa.kahramaa.base.retrofit.d.a().f3469d, 0)).l1(new zb.d("", "", str, this.f3432u.g(), this.f3432u.f(), str3, str6)).enqueue(new com.qa.kahramaa.kahramaa.base.retrofit.h(getApplication(), new q8.b()));
        }
        s.d(this, "fcm_token", str);
    }
}