正在查看: MedEd v5.3.6 应用的 FreshchatReceiver.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: MedEd v5.3.6 应用的 FreshchatReceiver.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.freshchat.consumer.sdk.receiver;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
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;
import com.pairip.VMRunner;
public class FreshchatReceiver extends BroadcastReceiver {
private void H(Context context) {
cn.ci(context);
}
private void I(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 void d(Context context, Intent intent) {
if (intent == null || intent.getExtras() == null) {
co.d("FRESHCHAT_WARNING", "Extras cannot be null in FreshchatReceiver::onReceive().");
return;
}
String b = ck.b(intent, "FRESHCHAT_DEEPLINK");
if (ds.a(b)) {
com.freshchat.consumer.sdk.b.a.e(context, b);
} 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"));
}
}
private boolean e(Intent intent) {
return a(intent, "android.intent.action.LOCALE_CHANGED");
}
private boolean f(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) {
VMRunner.invoke("uMciteRr6r9KtZlB", new Object[]{this, context, intent});
}
private boolean a(Intent intent, String str) {
return intent != null && ds.a(str) && str.equals(intent.getAction());
}
private boolean d(Intent intent) {
if (dz.kk()) {
return a(intent, "android.intent.action.MY_PACKAGE_REPLACED");
}
return false;
}
}