正在查看: Oolka v2.4.42 应用的 CTFirebaseMessagingReceiver.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Oolka v2.4.42 应用的 CTFirebaseMessagingReceiver.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.clevertap.android.sdk.pushnotification.fcm;
import android.annotation.SuppressLint;
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.Utils;
import com.clevertap.android.sdk.n0;
import com.clevertap.android.sdk.o;
import com.clevertap.android.sdk.pushnotification.h;
import com.clevertap.android.sdk.w1;
import com.google.firebase.messaging.RemoteMessage;
import java.util.concurrent.TimeUnit;
public class CTFirebaseMessagingReceiver extends BroadcastReceiver implements com.clevertap.android.sdk.interfaces.e {
public CountDownTimer a;
public String b = "";
public boolean c;
public BroadcastReceiver.PendingResult d;
public long e;
public class a extends CountDownTimer {
public a(long j, long j2) {
super(j, j2);
}
@Override
public void onFinish() {
CTFirebaseMessagingReceiver.this.d("receiver life time is expired");
}
@Override
public void onTick(long j) {
}
}
public void e(Context context, Bundle bundle) {
try {
try {
n0 x0 = n0.x0(context, h.b(bundle));
if (x0 != null) {
o.h(x0, "CTRM#flushQueueSync", "PI_R", context);
}
} catch (Exception e) {
e.printStackTrace();
w1.t("CTRM", "Failed executing CTRM flushQueueSync thread.", e);
}
} finally {
d("flush from receiver is done!");
}
}
@Override
@SuppressLint({"RestrictedApi"})
public void a(boolean z) {
w1.s("CTRM", "push impression sent successfully by core, i should inform OS to kill receiver. my callback key is " + this.b);
d("push impression sent successfully by core");
}
public final void d(String str) {
try {
w1.s("CTRM", "got a signal to kill receiver and timer because " + str);
if (!this.b.trim().isEmpty()) {
n0.R1(this.b);
}
long nanoTime = System.nanoTime();
if (this.d == null || this.c) {
w1.s("CTRM", "have already informed OS to kill receiver, can not inform again else OS will get angry :-O");
return;
}
w1.s("CTRM", "informing OS to kill receiver...");
this.d.finish();
this.c = true;
CountDownTimer countDownTimer = this.a;
if (countDownTimer != null) {
countDownTimer.cancel();
}
w1.s("CTRM", "informed OS to kill receiver...");
w1.s("CTRM", "receiver was alive for " + TimeUnit.NANOSECONDS.toSeconds(nanoTime - this.e) + " seconds");
} catch (Exception e) {
e.printStackTrace();
}
}
@Override
@SuppressLint({"RestrictedApi"})
public void onReceive(final Context context, Intent intent) {
RemoteMessage remoteMessage;
final Bundle a2;
this.e = System.nanoTime();
w1.d("CTRM", "received a message from Firebase");
if (context == null || intent == null || (a2 = new c().a((remoteMessage = new RemoteMessage(intent.getExtras())))) == null) {
return;
}
if (remoteMessage.getPriority() != 2) {
w1.d("CTRM", "returning from CTRM because message priority is not normal");
return;
}
long parseLong = Long.parseLong(a2.getString("ctrmt", "4500"));
this.d = goAsync();
if (!n0.E0(a2).a) {
w1.s("CTRM", "Notification payload is not from CleverTap.");
d("push is not from CleverTap.");
return;
}
if (!Utils.w(remoteMessage, context)) {
w1.s("CTRM", "Notification payload does not have a fallback key.");
d("isRenderFallback is false");
return;
}
String a3 = h.a(h.b(a2), h.d(a2));
this.b = a3;
n0.x(a3, this);
a aVar = new a(parseLong, 1000L);
this.a = aVar;
aVar.start();
new Thread(new Runnable() {
@Override
public final void run() {
CTFirebaseMessagingReceiver.this.e(context, a2);
}
}).start();
}
}