正在查看: Namma Yatri v3.3.7 应用的 CTFirebaseMessagingReceiver.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Namma Yatri v3.3.7 应用的 CTFirebaseMessagingReceiver.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.clevertap.android.sdk.pushnotification.fcm;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.os.CountDownTimer;
import com.clevertap.android.sdk.i;
import com.clevertap.android.sdk.pushnotification.j;
import com.clevertap.android.sdk.r;
import com.google.firebase.messaging.RemoteMessage;
import java.util.concurrent.TimeUnit;
import k3.K0;
public class CTFirebaseMessagingReceiver extends BroadcastReceiver implements F3.e {
private CountDownTimer f17641a;
private String f17642b = "";
private boolean f17643c;
private BroadcastReceiver.PendingResult f17644d;
private long f17645e;
class a extends CountDownTimer {
a(long j7, long j8) {
super(j7, j8);
}
@Override
public void onFinish() {
CTFirebaseMessagingReceiver.this.d("receiver life time is expired");
}
@Override
public void onTick(long j7) {
}
}
public void d(String str) {
try {
r.s("CTRM", "got a signal to kill receiver and timer because " + str);
if (!this.f17642b.trim().isEmpty()) {
i.e2(this.f17642b);
}
long nanoTime = System.nanoTime();
if (this.f17644d == null || this.f17643c) {
r.s("CTRM", "have already informed OS to kill receiver, can not inform again else OS will get angry :-O");
return;
}
r.s("CTRM", "informing OS to kill receiver...");
this.f17644d.finish();
this.f17643c = true;
CountDownTimer countDownTimer = this.f17641a;
if (countDownTimer != null) {
countDownTimer.cancel();
}
r.s("CTRM", "informed OS to kill receiver...");
r.s("CTRM", "receiver was alive for " + TimeUnit.NANOSECONDS.toSeconds(nanoTime - this.f17645e) + " seconds");
} catch (Exception e7) {
e7.printStackTrace();
}
}
public void e(Context context, Bundle bundle) {
try {
try {
i A02 = i.A0(context, j.b(bundle));
if (A02 != null) {
k3.r.h(A02, "CTRM#flushQueueSync", "PI_R", context);
}
} catch (Exception e7) {
e7.printStackTrace();
r.t("CTRM", "Failed executing CTRM flushQueueSync thread.", e7);
}
} finally {
d("flush from receiver is done!");
}
}
@Override
public void a(boolean z6) {
r.s("CTRM", "push impression sent successfully by core, i should inform OS to kill receiver. my callback key is " + this.f17642b);
d("push impression sent successfully by core");
}
@Override
public void onReceive(final Context context, Intent intent) {
RemoteMessage remoteMessage;
final Bundle a7;
this.f17645e = System.nanoTime();
r.d("CTRM", "received a message from Firebase");
if (context == null || intent == null || (a7 = new d().a((remoteMessage = new RemoteMessage(intent.getExtras())))) == null) {
return;
}
if (remoteMessage.u0() != 2) {
r.d("CTRM", "returning from CTRM because message priority is not normal");
return;
}
long parseLong = Long.parseLong(a7.getString("ctrmt", "4500"));
this.f17644d = goAsync();
if (!i.I0(a7).f17657a) {
r.s("CTRM", "Notification payload is not from CleverTap.");
d("push is not from CleverTap.");
return;
}
if (!K0.w(remoteMessage, context)) {
r.s("CTRM", "Notification payload does not have a fallback key.");
d("isRenderFallback is false");
return;
}
String a8 = j.a(j.b(a7), j.d(a7));
this.f17642b = a8;
i.y(a8, this);
a aVar = new a(parseLong, 1000L);
this.f17641a = aVar;
aVar.start();
new Thread(new Runnable() {
@Override
public final void run() {
CTFirebaseMessagingReceiver.this.e(context, a7);
}
}).start();
}
}