正在查看: Akıllı Bilet v4.0.39.217 应用的 FirebaseMessagingServiceImpl.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Akıllı Bilet v4.0.39.217 应用的 FirebaseMessagingServiceImpl.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.asis.baseapp.service;
import android.annotation.SuppressLint;
import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.content.Context;
import android.content.Intent;
import android.media.RingtoneManager;
import android.os.Bundle;
import com.asis.baseapp.data.models.greenpay.GreenPayPopUpMessage;
import com.asis.coreapp.R$drawable;
import com.asis.coreapp.R$string;
import com.asis.database.DatabaseImpl;
import com.asis.logger.Logger;
import com.google.firebase.messaging.RemoteMessage;
import com.google.gson.Gson;
import defpackage.aj1;
import defpackage.ak;
import defpackage.bj1;
import defpackage.bv1;
import defpackage.fn2;
import defpackage.fx5;
import defpackage.gk5;
import defpackage.gv;
import defpackage.hm5;
import defpackage.im5;
import defpackage.jk2;
import defpackage.jz2;
import defpackage.lm5;
import defpackage.nt1;
import defpackage.o15;
import defpackage.ol0;
import defpackage.sh5;
import defpackage.si5;
import defpackage.sy2;
import defpackage.t22;
import defpackage.vj3;
import defpackage.w11;
import defpackage.wj;
import defpackage.wj3;
import defpackage.xi3;
import defpackage.xq2;
import defpackage.zj5;
import defpackage.zt0;
import defpackage.zx1;
import java.util.Map;
import kotlin.Metadata;
import kotlin.UninitializedPropertyAccessException;
@Metadata(d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0004\b\u0007\u0018\u00002\u00020\u0001:\u0001\u0004B\u0007¢\u0006\u0004\b\u0002\u0010\u0003¨\u0006\u0005"}, d2 = {"Lcom/asis/baseapp/service/FirebaseMessagingServiceImpl;", "Lcom/google/firebase/messaging/FirebaseMessagingService;", "<init>", "()V", "o41", "coreapp_release"}, k = 1, mv = {1, 9, 0})
@SuppressLint({"MissingFirebaseInstanceTokenRefresh"})
public final class FirebaseMessagingServiceImpl extends zx1 {
public lm5 i;
public sh5 j;
public wj k;
public NotificationManager l;
public final void d(String str, String str2) {
Object systemService = getSystemService("notification");
fn2.t(systemService, "null cannot be cast to non-null type android.app.NotificationManager");
this.l = (NotificationManager) systemService;
NotificationChannel notificationChannel = new NotificationChannel(getString(R$string.default_notification_channel_id), "Asis", 2);
notificationChannel.enableLights(true);
notificationChannel.setLightColor(-65536);
notificationChannel.enableVibration(true);
notificationChannel.setVibrationPattern(new long[]{100, 200, 300, 400, 500, 400, 300, 200, 400});
NotificationManager notificationManager = this.l;
fn2.s(notificationManager);
notificationManager.createNotificationChannel(notificationChannel);
sy2 sy2Var = new sy2(getApplicationContext(), getString(R$string.default_notification_channel_id));
sy2Var.s.icon = R$drawable.company_icon;
sy2Var.e = sy2.b(str);
sy2Var.f = sy2.b(str2);
sy2Var.c(true);
sy2Var.e(RingtoneManager.getDefaultUri(2));
Object systemService2 = getSystemService("notification");
fn2.t(systemService2, "null cannot be cast to non-null type android.app.NotificationManager");
((NotificationManager) systemService2).notify((int) (System.currentTimeMillis() / 1000), sy2Var.a());
}
@Override
public final void onMessageReceived(RemoteMessage remoteMessage) {
xi3 xi3Var;
String string;
bv1 bv1Var;
String string2;
fn2.v(remoteMessage, "message");
super.onMessageReceived(remoteMessage);
String str = remoteMessage.getData().get("dataType");
jz2 jz2Var = jz2.f;
if (!fn2.g(str, "QRPASS")) {
jz2Var = jz2.g;
if (!fn2.g(str, "Balance Loaded")) {
jz2Var = jz2.h;
}
}
Logger logger = Logger.INSTANCE;
logger.logInfo(this, "FirebaseMessagingServiceImpl", "TransactionType: " + jz2Var.name());
int ordinal = jz2Var.ordinal();
if (ordinal != 0) {
if (ordinal != 1) {
if (ordinal != 2) {
return;
}
RemoteMessage.Notification notification = remoteMessage.getNotification();
String title = notification != null ? notification.getTitle() : null;
if (title == null) {
title = "";
}
RemoteMessage.Notification notification2 = remoteMessage.getNotification();
string = notification2 != null ? notification2.getBody() : null;
d(title, string != null ? string : "");
return;
}
Bundle extras = remoteMessage.toIntent().getExtras();
string = extras != null ? extras.getString("gcm.notification.response") : null;
logger.logInfo(this, "FirebaseMessagingServiceImpl", "GreenPay notification data: ".concat(string != null ? string : ""));
if (string != null) {
if (string.length() > 0) {
r6 = true;
}
}
if (!r6 || (bv1Var = (bv1) new Gson().fromJson(string, bv1.class)) == null) {
return;
}
logger.logInfo(this, "FirebaseMessagingServiceImpl handle green pay data", "data is not null");
int i = R$string.green_pay_load_balance_body_message;
String mifareId = bv1Var.getMifareId();
Double valueOf = Double.valueOf(bv1Var.getAwaitAmount());
String string3 = getString(i, mifareId, valueOf == null ? new String() : fx5.e(valueOf.doubleValue()));
fn2.u(string3, "getString(...)");
int transactionType = bv1Var.getTransactionType();
o15[] o15VarArr = o15.f;
if (transactionType == 1) {
string2 = getString(R$string.payment_success);
fn2.s(string2);
} else {
string2 = getString(R$string.success);
fn2.s(string2);
}
Context applicationContext = getApplicationContext();
fn2.t(applicationContext, "null cannot be cast to non-null type com.asis.baseapp.Application");
if (!gv.E((ak) applicationContext)) {
logger.logInfo(this, "FirebaseMessagingServiceImpl", "app is background");
d(string2, string3);
return;
} else {
logger.logInfo(this, "FirebaseMessagingServiceImpl", "app is foreground");
Intent putExtra = new Intent().setAction("green_pay_popup_action").putExtra("green_pay_success", new Gson().toJson(new GreenPayPopUpMessage(string2, string3), GreenPayPopUpMessage.class));
fn2.u(putExtra, "putExtra(...)");
sendBroadcast(putExtra);
return;
}
}
logger.logInfo(this, "FirebaseMessagingServiceImpl", "onMessageReceived: " + remoteMessage.getData());
Map<String, String> data = remoteMessage.getData();
fn2.u(data, "getData(...)");
try {
xi3Var = (xi3) new Gson().fromJson(new Gson().toJson(data), xi3.class);
} catch (Exception e) {
e.printStackTrace();
xi3Var = null;
}
if (xi3Var != null) {
Logger logger2 = Logger.INSTANCE;
logger2.logInfo(this, "FirebaseMessagingServiceImpl handleQrPassData", "response is not null");
String vTokenId = xi3Var.getVTokenId();
if (vTokenId == null) {
vTokenId = "";
}
int parseInt = Integer.parseInt(vTokenId);
String amount = xi3Var.getAmount();
if (amount == null) {
amount = "";
}
int parseInt2 = Integer.parseInt(amount);
String cardBalance = xi3Var.getCardBalance();
if (cardBalance == null) {
cardBalance = "";
}
int parseInt3 = Integer.parseInt(cardBalance);
String cardCounter = xi3Var.getCardCounter();
if (cardCounter == null) {
cardCounter = "";
}
int parseInt4 = Integer.parseInt(cardCounter);
String cardType = xi3Var.getCardType();
if (cardType == null) {
cardType = "";
}
Integer.parseInt(cardType);
String resultType = xi3Var.getResultType();
if (resultType == null) {
resultType = "";
}
Integer.parseInt(resultType);
String transferFlag = xi3Var.getTransferFlag();
if (transferFlag == null) {
transferFlag = "";
}
int parseInt5 = Integer.parseInt(transferFlag);
String tripCount = xi3Var.getTripCount();
if (tripCount == null) {
tripCount = "";
}
int parseInt6 = Integer.parseInt(tripCount);
String transferCount = xi3Var.getTransferCount();
if (transferCount == null) {
transferCount = "";
}
int parseInt7 = Integer.parseInt(transferCount);
String paymentCounter = xi3Var.getPaymentCounter();
if (paymentCounter == null) {
paymentCounter = "";
}
int parseInt8 = Integer.parseInt(paymentCounter);
String loadCounter = xi3Var.getLoadCounter();
if (loadCounter == null) {
loadCounter = "";
}
int parseInt9 = Integer.parseInt(loadCounter);
String routeId = xi3Var.getRouteId();
if (routeId == null) {
routeId = "";
}
int parseInt10 = Integer.parseInt(routeId);
String terminalId = xi3Var.getTerminalId();
if (terminalId == null) {
terminalId = "";
}
int parseInt11 = Integer.parseInt(terminalId);
String stationId = xi3Var.getStationId();
if (stationId == null) {
stationId = "";
}
int parseInt12 = Integer.parseInt(stationId);
if (!fn2.g(xi3Var.getMessageCode(), "RC2202")) {
logger2.logInfo(this, "FirebaseMessagingServiceImpl", "sendQrPassFail: " + xi3Var.getMessage());
lm5 lm5Var = this.i;
if (lm5Var == null) {
fn2.v0("watchDataProvider");
throw null;
}
String message = xi3Var.getMessage();
if (message == null) {
message = "";
}
if (lm5Var.g) {
logger2.logInfo(lm5Var, "WatchDataProvider", "sendQrPassFail message: ".concat(message));
zt0 zt0Var = w11.a;
xq2.E(ol0.a(jk2.a.plus(lm5Var.f)), null, 0, new hm5(lm5Var, message, null), 3);
}
Context applicationContext2 = getApplicationContext();
fn2.t(applicationContext2, "null cannot be cast to non-null type com.asis.baseapp.Application");
if (gv.E((ak) applicationContext2)) {
sh5 sh5Var = this.j;
if (sh5Var == null) {
fn2.v0("virtualCardRepository");
throw null;
}
String message2 = xi3Var.getMessage();
((zj5) sh5Var).d.m(new vj3(message2 != null ? message2 : ""));
return;
}
return;
}
logger2.logInfo(this, "FirebaseMessagingServiceImpl", "sendQrPassSuccess: " + parseInt2);
lm5 lm5Var2 = this.i;
if (lm5Var2 == null) {
fn2.v0("watchDataProvider");
throw null;
}
if (lm5Var2.g) {
logger2.logInfo(lm5Var2, "WatchDataProvider", "sendQrPassSuccess amount: " + parseInt2);
zt0 zt0Var2 = w11.a;
xq2.E(ol0.a(jk2.a.plus(lm5Var2.f)), null, 0, new im5(lm5Var2, parseInt2, null), 3);
}
if (this.j == null) {
fn2.v0("virtualCardRepository");
throw null;
}
DatabaseImpl databaseImpl = nt1.c;
if (databaseImpl == null) {
throw new UninitializedPropertyAccessException("VirtualCardDatabase not initialized. If you use VirtualCardDatabase, you should init VirtualCardDatabase with initDatabase method in Application class");
}
databaseImpl.d().a(parseInt);
DatabaseImpl databaseImpl2 = nt1.c;
if (databaseImpl2 == null) {
throw new UninitializedPropertyAccessException("VirtualCardDatabase not initialized. If you use VirtualCardDatabase, you should init VirtualCardDatabase with initDatabase method in Application class");
}
double d = 100;
double d2 = parseInt3 / d;
databaseImpl2.d().i(new gk5(0, parseInt, parseInt11, parseInt2 / d, d2, parseInt4, parseInt8, parseInt9, parseInt6, parseInt10, parseInt12, 0, t22.l(), parseInt7, parseInt5, 1, t22.l(), parseInt5));
DatabaseImpl databaseImpl3 = nt1.c;
if (databaseImpl3 == null) {
throw new UninitializedPropertyAccessException("VirtualCardDatabase not initialized. If you use VirtualCardDatabase, you should init VirtualCardDatabase with initDatabase method in Application class");
}
databaseImpl3.d().j(0, d2, parseInt4, parseInt8);
Context applicationContext3 = getApplicationContext();
fn2.t(applicationContext3, "null cannot be cast to non-null type com.asis.baseapp.Application");
if (!gv.E((ak) applicationContext3)) {
String string4 = getString(R$string.qr_pass_success);
fn2.u(string4, "getString(...)");
int i2 = R$string.firebase_qr_pass_notification_background;
Double valueOf2 = Double.valueOf(fn2.y0(Integer.valueOf(parseInt2)));
String str2 = valueOf2 == null ? new String() : fx5.e(valueOf2.doubleValue());
Double valueOf3 = Double.valueOf(fn2.y0(Integer.valueOf(parseInt3)));
String string5 = getString(i2, str2, valueOf3 == null ? new String() : fx5.e(valueOf3.doubleValue()));
fn2.u(string5, "getString(...)");
d(string4, string5);
return;
}
sh5 sh5Var2 = this.j;
if (sh5Var2 == null) {
fn2.v0("virtualCardRepository");
throw null;
}
((zj5) sh5Var2).c.m(new si5(d2));
sh5 sh5Var3 = this.j;
if (sh5Var3 == null) {
fn2.v0("virtualCardRepository");
throw null;
}
Double valueOf4 = Double.valueOf(fn2.y0(Integer.valueOf(parseInt3)));
String str3 = valueOf4 == null ? new String() : fx5.e(valueOf4.doubleValue());
Double valueOf5 = Double.valueOf(fn2.y0(Integer.valueOf(parseInt2)));
((zj5) sh5Var3).d.m(new wj3(str3, valueOf5 == null ? new String() : fx5.e(valueOf5.doubleValue()), parseInt5 == 2));
}
}
@Override
public final void onNewToken(String str) {
fn2.v(str, "token");
xq2.V(new aj1(), new bj1(this, str, null));
super.onNewToken(str);
}
}