导航菜单

页面标题

页面副标题

Sandridge Go v2025.2.170190457 - StaffbasePushBroadcastReceiver.java 源代码

正在查看: Sandridge Go v2025.2.170190457 应用的 StaffbasePushBroadcastReceiver.java JAVA 源代码文件

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


package com.pushNotification;

import A0.j;
import android.app.Notification;
import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import com.getcapacitor.O;
import com.microsoft.intune.mam.client.app.X;
import com.microsoft.intune.mam.client.app.Y;
import com.parse.ManifestInfo;
import com.parse.ParsePushBroadcastReceiver;
import com.pushNotification.a;
import com.staffbase.capacitor.MainActivity;
import kotlin.jvm.internal.h;
import kotlin.jvm.internal.n;
import org.json.JSONException;
import org.json.JSONObject;
import w5.C0543e;
import w5.C0544f;

public final class StaffbasePushBroadcastReceiver extends ParsePushBroadcastReceiver {
    private static final a p = new a(null);
    public static final int q = 8;
    private final com.pushNotification.a o = new C0543e();

    private static final class a {
        public a(h hVar) {
            this();
        }

        private a() {
        }
    }

    @Override
    public j.e getNotification(Context context, Intent intent) {
        n.e(context, "context");
        n.e(intent, "intent");
        com.pushNotification.a aVar = this.o;
        JSONObject pushData = getPushData(intent);
        String displayName = ManifestInfo.getDisplayName(context);
        n.d(displayName, "getDisplayName(...)");
        C0544f a2 = a.C0035a.a(aVar, pushData, displayName, context.getSharedPreferences("parse", 0), null, 8, null);
        if (a2 == null) {
            return null;
        }
        Intent intent2 = new Intent(context, (Class<?>) MainActivity.class);
        intent2.setPackage(context.getPackageName());
        intent2.setFlags(268468224);
        Intent intent3 = new Intent(ParsePushBroadcastReceiver.ACTION_PUSH_DELETE);
        intent3.setPackage(context.getPackageName());
        Bundle extras = intent.getExtras();
        if (extras != null) {
            intent2.putExtras(extras);
            intent3.putExtras(extras);
        }
        PendingIntent a3 = Y.a(context, a2.c(), intent2, 201326592);
        PendingIntent b = Y.b(context, a2.i(), intent3, 201326592);
        Object systemService = context.getSystemService("notification");
        n.c(systemService, "null cannot be cast to non-null type android.app.NotificationManager");
        NotificationManager notificationManager = (NotificationManager) systemService;
        notificationManager.createNotificationChannel(new NotificationChannel(a2.g(), a2.f(), 3));
        Notification c = new j.e(context, a2.g()).k(a2.e()).j(a2.d()).h(a2.b()).A(a2.k()).y(getSmallIconId(context, intent)).q(getLargeIcon(context, intent)).i(a3).m(b).f(a2.a()).l(a2.h()).c();
        n.d(c, "build(...)");
        try {
            X.a(notificationManager, a2.j(), c);
        } catch (SecurityException unused) {
            c.defaults = 5;
            X.a(notificationManager, a2.j(), c);
        }
        return null;
    }

    @Override
    public JSONObject getPushData(Intent intent) {
        n.e(intent, "intent");
        String stringExtra = intent.getStringExtra(ParsePushBroadcastReceiver.KEY_PUSH_DATA);
        if (stringExtra == null) {
            return null;
        }
        try {
            return new JSONObject(stringExtra);
        } catch (JSONException e) {
            O.c("com.parse.ParsePushReceiver: Unexpected JSONException when receiving push data: " + e.getLocalizedMessage());
            return null;
        }
    }

    @Override
    public void onPushDismiss(Context context, Intent intent) {
        n.e(context, "context");
        n.e(intent, "intent");
        super.onPushDismiss(context, intent);
        this.o.a();
    }
}