正在查看: Aisle v12.32 应用的 FCMMessageHandler.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Aisle v12.32 应用的 FCMMessageHandler.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.aisle.app.services;
import android.app.ActivityManager;
import android.app.NotificationManager;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.PorterDuff;
import android.graphics.PorterDuffXfermode;
import android.graphics.Rect;
import android.graphics.RectF;
import android.media.RingtoneManager;
import androidx.core.app.m;
import com.google.firebase.messaging.FirebaseMessagingService;
import com.google.firebase.messaging.P;
import com.google.firebase.perf.network.FirebasePerfUrlConnection;
import java.io.IOException;
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLConnection;
import java.util.List;
import java.util.Map;
import kotlin.Metadata;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
import u4.b;
@Metadata
@SourceDebugExtension({"SMAP\nFCMMessageHandler.kt\nKotlin\n*S Kotlin\n*F\n+ 1 FCMMessageHandler.kt\ncom/aisle/app/services/FCMMessageHandler\n+ 2 OneTimeWorkRequest.kt\nandroidx/work/OneTimeWorkRequestKt\n*L\n1#1,424:1\n100#2:425\n*S KotlinDebug\n*F\n+ 1 FCMMessageHandler.kt\ncom/aisle/app/services/FCMMessageHandler\n*L\n90#1:425\n*E\n"})
public final class FCMMessageHandler extends FirebaseMessagingService {
private Context f22258a;
private b f22259b;
private final void k() {
b bVar = this.f22259b;
Intrinsics.checkNotNull(bVar);
if (bVar.f() != null) {
b bVar2 = this.f22259b;
Intrinsics.checkNotNull(bVar2);
if (bVar2.b() != null) {
b bVar3 = this.f22259b;
Intrinsics.checkNotNull(bVar3);
String f5 = bVar3.f();
Intrinsics.checkNotNull(f5);
if (f5.length() == 0) {
return;
}
b bVar4 = this.f22259b;
Intrinsics.checkNotNull(bVar4);
String b5 = bVar4.b();
Intrinsics.checkNotNull(b5);
if (b5.length() == 0) {
return;
}
try {
b bVar5 = this.f22259b;
Intrinsics.checkNotNull(bVar5);
String a5 = bVar5.a();
if (a5 != null && a5.length() != 0) {
b bVar6 = this.f22259b;
Intrinsics.checkNotNull(bVar6);
Bitmap n5 = n(bVar6.a());
if (n5 != null) {
l(n5);
return;
} else {
l(BitmapFactory.decodeResource(getResources(), 2131231826));
return;
}
}
l(BitmapFactory.decodeResource(getResources(), 2131231826));
} catch (Exception e5) {
e5.printStackTrace();
}
}
}
}
private final void l(android.graphics.Bitmap r8) {
throw new UnsupportedOperationException("Method not decompiled: com.aisle.app.services.FCMMessageHandler.l(android.graphics.Bitmap):void");
}
private final void m(P.b bVar) {
Context baseContext = getBaseContext();
m.e u5 = new m.e(baseContext).t(2131231360).n(BitmapFactory.decodeResource(getResources(), 2131755008)).u(RingtoneManager.getDefaultUri(2));
Intrinsics.checkNotNull(bVar);
m.e i5 = u5.j(bVar.c()).i(bVar.a());
Intrinsics.checkNotNullExpressionValue(i5, "setContentText(...)");
Object systemService = baseContext.getSystemService("notification");
Intrinsics.checkNotNull(systemService, "null cannot be cast to non-null type android.app.NotificationManager");
((NotificationManager) systemService).notify(435345, i5.b());
}
private final Bitmap n(String str) {
try {
URLConnection uRLConnection = (URLConnection) FirebasePerfUrlConnection.instrument(new URL(str).openConnection());
Intrinsics.checkNotNull(uRLConnection, "null cannot be cast to non-null type java.net.HttpURLConnection");
HttpURLConnection httpURLConnection = (HttpURLConnection) uRLConnection;
httpURLConnection.setDoInput(true);
httpURLConnection.connect();
InputStream inputStream = httpURLConnection.getInputStream();
if (inputStream == null) {
return null;
}
return q(BitmapFactory.decodeStream(inputStream), 50);
} catch (IOException e5) {
e5.printStackTrace();
return null;
}
}
private final android.content.Intent o() {
throw new UnsupportedOperationException("Method not decompiled: com.aisle.app.services.FCMMessageHandler.o():android.content.Intent");
}
private final b p(Map map) {
b bVar = new b(0, null, null, null, null, null, null, null, null, null, 0, null, 0, 8191, null);
bVar.l(435345);
bVar.r((String) map.get("title"));
bVar.m((String) map.get("message"));
bVar.s((String) map.get("type"));
bVar.q((String) map.get("ref"));
bVar.n((String) map.get("notification_id"));
CharSequence charSequence = (CharSequence) map.get("conversation_id");
if (charSequence != null && charSequence.length() != 0) {
Object obj = map.get("conversation_id");
Intrinsics.checkNotNull(obj);
bVar.j(Integer.parseInt((String) obj));
}
CharSequence charSequence2 = (CharSequence) map.get("plan");
if (charSequence2 != null && charSequence2.length() != 0) {
bVar.o((String) map.get("plan"));
}
CharSequence charSequence3 = (CharSequence) map.get("plan_period");
if (charSequence3 != null && charSequence3.length() != 0) {
Object obj2 = map.get("plan_period");
Intrinsics.checkNotNull(obj2);
bVar.p(Integer.parseInt((String) obj2));
}
bVar.t((String) map.get("url"));
bVar.i((String) map.get("avatar"));
bVar.k((String) map.get("first_name"));
return bVar;
}
private final Bitmap q(Bitmap bitmap, int i5) {
if (bitmap == null) {
return null;
}
Bitmap createBitmap = Bitmap.createBitmap(bitmap.getWidth(), bitmap.getHeight(), Bitmap.Config.ARGB_8888);
Intrinsics.checkNotNullExpressionValue(createBitmap, "createBitmap(...)");
Canvas canvas = new Canvas(createBitmap);
Paint paint = new Paint();
Rect rect = new Rect(0, 0, bitmap.getWidth(), bitmap.getHeight());
RectF rectF = new RectF(rect);
float f5 = i5;
paint.setAntiAlias(true);
canvas.drawARGB(0, 0, 0, 0);
paint.setColor(-12434878);
canvas.drawRoundRect(rectF, f5, f5, paint);
paint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.SRC_IN));
canvas.drawBitmap(bitmap, rect, rect, paint);
return createBitmap;
}
private final boolean r(Context context) {
Intrinsics.checkNotNull(context);
Object systemService = context.getSystemService("activity");
Intrinsics.checkNotNull(systemService, "null cannot be cast to non-null type android.app.ActivityManager");
List<ActivityManager.RunningAppProcessInfo> runningAppProcesses = ((ActivityManager) systemService).getRunningAppProcesses();
if (runningAppProcesses == null) {
return false;
}
String packageName = context.getPackageName();
for (ActivityManager.RunningAppProcessInfo runningAppProcessInfo : runningAppProcesses) {
if (runningAppProcessInfo.importance == 100 && Intrinsics.areEqual(runningAppProcessInfo.processName, packageName)) {
return true;
}
}
return false;
}
public void onMessageReceived(com.google.firebase.messaging.P r25) {
throw new UnsupportedOperationException("Method not decompiled: com.aisle.app.services.FCMMessageHandler.onMessageReceived(com.google.firebase.messaging.P):void");
}
}