正在查看: Oolka v2.4.42 应用的 FreshchatReceiver.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Oolka v2.4.42 应用的 FreshchatReceiver.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.freshchat.consumer.sdk.receiver;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import androidx.annotation.NonNull;
import com.freshchat.consumer.sdk.service.d.h;
import com.freshchat.consumer.sdk.service.e.ae;
import com.freshchat.consumer.sdk.util.aj;
import com.freshchat.consumer.sdk.util.c.c;
import com.freshchat.consumer.sdk.util.ck;
import com.freshchat.consumer.sdk.util.cn;
import com.freshchat.consumer.sdk.util.co;
import com.freshchat.consumer.sdk.util.db;
import com.freshchat.consumer.sdk.util.ds;
import com.freshchat.consumer.sdk.util.dz;
import com.freshchat.consumer.sdk.util.j;
public class FreshchatReceiver extends BroadcastReceiver {
private void H(@NonNull Context context) {
cn.ci(context);
}
private void I(@NonNull Context context) {
if (j.aH(context.getApplicationContext())) {
com.freshchat.consumer.sdk.util.b.aq(context);
}
}
public void c(Context context, Intent intent) {
ck.a("FRESHCHAT", intent);
try {
if (f(intent)) {
h.b(context.getApplicationContext(), new ae());
} else if (g(intent)) {
if (db.cm(context.getApplicationContext())) {
c.a(context.getApplicationContext());
com.freshchat.consumer.sdk.util.b.ap(context);
}
} else if (e(intent)) {
H(context);
} else if (d(intent)) {
I(context);
} else if ("com.freshchat.consumer.sdk.actions.NotificationClicked".equals(intent.getAction())) {
d(context, intent);
}
} catch (Exception e) {
aj.a(e);
}
}
private boolean d(@NonNull Intent intent) {
if (dz.kk()) {
return a(intent, "android.intent.action.MY_PACKAGE_REPLACED");
}
return false;
}
private boolean e(@NonNull Intent intent) {
return a(intent, "android.intent.action.LOCALE_CHANGED");
}
private boolean f(@NonNull Intent intent) {
return a(intent, "android.intent.action.BOOT_COMPLETED");
}
private boolean g(Intent intent) {
return intent != null && intent.hasExtra("android.intent.extra.ALARM_COUNT");
}
@Override
public void onReceive(Context context, Intent intent) {
com.freshchat.consumer.sdk.util.h.iT().iU().execute(new a(this, context, intent));
}
private boolean a(@NonNull Intent intent, @NonNull String str) {
return intent != null && ds.a((CharSequence) str) && str.equals(intent.getAction());
}
private void d(@NonNull Context context, @NonNull Intent intent) {
if (intent != null && intent.getExtras() != null) {
String b = ck.b(intent, "FRESHCHAT_DEEPLINK");
if (ds.a((CharSequence) b)) {
com.freshchat.consumer.sdk.b.a.e(context, b);
return;
} else {
co.d("FRESHCHAT_WARNING", com.freshchat.consumer.sdk.b.c.INVALID_NOTIFICATION_CLICK_ACTION_MISSING_DEEPLINK.toString().replace("{{action_str}}", "com.freshchat.consumer.sdk.actions.NotificationClicked"));
return;
}
}
co.d("FRESHCHAT_WARNING", "Extras cannot be null in FreshchatReceiver::onReceive().");
}
}