导航菜单

页面标题

页面副标题

Biko v2.0.23 - HeadsUpNotificationService$onStartCommand$2.java 源代码

正在查看: Biko v2.0.23 应用的 HeadsUpNotificationService$onStartCommand$2.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package app.callpe.service;

import android.R;
import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.app.Person;
import android.graphics.drawable.Icon;
import android.os.Build;
import android.text.Spannable;
import androidx.core.app.NotificationCompat;
import kotlin.Metadata;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.Ref;
import kotlinx.coroutines.CoroutineScope;
import timber.log.Timber;

@Metadata(d1 = {"\u0000\n\n\u0000\n\u0002\u0010\u0002\n\u0002\u0018\u0002\u0010\u0000\u001a\u00020\u0001*\u00020\u0002H\u008a@"}, d2 = {"<anonymous>", "", "Lkotlinx/coroutines/CoroutineScope;"}, k = 3, mv = {1, 8, 0}, xi = 48)
@DebugMetadata(c = "app.callpe.service.HeadsUpNotificationService$onStartCommand$2", f = "HeadsUpNotificationService.kt", i = {1}, l = {226, 282}, m = "invokeSuspend", n = {"notificationBuilder"}, s = {"L$0"})
final class HeadsUpNotificationService$onStartCommand$2 extends SuspendLambda implements Function2<CoroutineScope, Continuation<? super Unit>, Object> {
    final Ref.ObjectRef<String> $callerName;
    final PendingIntent $cancelCallPendingIntent;
    final PendingIntent $fullScreenPendingIntent;
    final Ref.BooleanRef $isBot;
    final Ref.ObjectRef<String> $notificationMessage;
    final Ref.ObjectRef<String> $pic;
    Object L$0;
    int label;
    final HeadsUpNotificationService this$0;

    HeadsUpNotificationService$onStartCommand$2(Ref.ObjectRef<String> objectRef, HeadsUpNotificationService headsUpNotificationService, Ref.ObjectRef<String> objectRef2, Ref.ObjectRef<String> objectRef3, PendingIntent pendingIntent, Ref.BooleanRef booleanRef, PendingIntent pendingIntent2, Continuation<? super HeadsUpNotificationService$onStartCommand$2> continuation) {
        super(2, continuation);
        this.$callerName = objectRef;
        this.this$0 = headsUpNotificationService;
        this.$pic = objectRef2;
        this.$notificationMessage = objectRef3;
        this.$fullScreenPendingIntent = pendingIntent;
        this.$isBot = booleanRef;
        this.$cancelCallPendingIntent = pendingIntent2;
    }

    public final Continuation<Unit> create(Object obj, Continuation<?> continuation) {
        return new HeadsUpNotificationService$onStartCommand$2(this.$callerName, this.this$0, this.$pic, this.$notificationMessage, this.$fullScreenPendingIntent, this.$isBot, this.$cancelCallPendingIntent, continuation);
    }

    public final Object invoke(CoroutineScope coroutineScope, Continuation<? super Unit> continuation) {
        return create(coroutineScope, continuation).invokeSuspend(Unit.INSTANCE);
    }

    public final Object invokeSuspend(Object obj) {
        String str;
        Spannable actionText;
        PendingIntent declineAction;
        Spannable actionText2;
        Object addProfilePic;
        NotificationCompat.Builder builder;
        Object addProfileIcon;
        Person.Builder builder2;
        String str2;
        PendingIntent declineAction2;
        Notification build;
        int i;
        int i2;
        int i3;
        Object coroutine_suspended = IntrinsicsKt.getCOROUTINE_SUSPENDED();
        int i4 = this.label;
        if (i4 == 0) {
            ResultKt.throwOnFailure(obj);
            if (Build.VERSION.SDK_INT < 31) {
                HeadsUpNotificationService headsUpNotificationService = this.this$0;
                HeadsUpNotificationService headsUpNotificationService2 = headsUpNotificationService;
                str = headsUpNotificationService.CHANNEL_ID;
                NotificationCompat.Builder category = new NotificationCompat.Builder(headsUpNotificationService2, str).setContentTitle((CharSequence) this.$callerName.element).setContentText((CharSequence) this.$notificationMessage.element).setPriority(2).setCategory("call");
                HeadsUpNotificationService headsUpNotificationService3 = this.this$0;
                actionText = headsUpNotificationService3.getActionText(headsUpNotificationService3, 2131951932, 2131100956);
                HeadsUpNotificationService headsUpNotificationService4 = this.this$0;
                boolean z = this.$isBot.element;
                PendingIntent pendingIntent = this.$cancelCallPendingIntent;
                Intrinsics.checkNotNullExpressionValue(pendingIntent, "cancelCallPendingIntent");
                PendingIntent pendingIntent2 = this.$fullScreenPendingIntent;
                Intrinsics.checkNotNullExpressionValue(pendingIntent2, "fullScreenPendingIntent");
                declineAction = headsUpNotificationService4.getDeclineAction(z, pendingIntent, pendingIntent2);
                NotificationCompat.Builder addAction = category.addAction(R.drawable.ic_menu_close_clear_cancel, actionText, declineAction);
                HeadsUpNotificationService headsUpNotificationService5 = this.this$0;
                actionText2 = headsUpNotificationService5.getActionText(headsUpNotificationService5, 2131951672, 2131100019);
                NotificationCompat.Builder fullScreenIntent = addAction.addAction(R.drawable.sym_action_call, actionText2, this.$fullScreenPendingIntent).setAutoCancel(true).setOngoing(true).setVisibility(1).setDefaults(3).setFullScreenIntent(this.$fullScreenPendingIntent, true);
                fullScreenIntent.setSmallIcon(FirebaseNotificationService.INSTANCE.getNotificationIcon(fullScreenIntent));
                fullScreenIntent.setCategory("call");
                fullScreenIntent.setVibrate(new long[]{0, 100, 200, 300});
                fullScreenIntent.setForegroundServiceBehavior(1);
                this.L$0 = fullScreenIntent;
                this.label = 2;
                addProfilePic = this.this$0.addProfilePic(fullScreenIntent, (String) this.$pic.element, (Continuation) this);
                if (addProfilePic == coroutine_suspended) {
                    return coroutine_suspended;
                }
                builder = fullScreenIntent;
                build = builder.build();
            } else {
                Person.Builder name = new Person.Builder().setName((CharSequence) this.$callerName.element);
                this.L$0 = name;
                this.label = 1;
                addProfileIcon = this.this$0.addProfileIcon((String) this.$pic.element, (Continuation) this);
                if (addProfileIcon == coroutine_suspended) {
                    return coroutine_suspended;
                }
                builder2 = name;
                obj = addProfileIcon;
                Person build2 = builder2.setIcon((Icon) obj).setImportant(true).build();
                Intrinsics.checkNotNullExpressionValue(build2, "Builder().setName(caller…etImportant(true).build()");
                HeadsUpNotificationService headsUpNotificationService6 = this.this$0;
                HeadsUpNotificationService headsUpNotificationService7 = headsUpNotificationService6;
                str2 = headsUpNotificationService6.CHANNEL_ID;
                Notification.Builder fullScreenIntent2 = new Notification.Builder(headsUpNotificationService7, str2).setContentTitle((CharSequence) this.$notificationMessage.element).setCategory("call").setAutoCancel(true).setOngoing(true).setVisibility(1).setFullScreenIntent(this.$fullScreenPendingIntent, true);
                HeadsUpNotificationService headsUpNotificationService8 = this.this$0;
                boolean z2 = this.$isBot.element;
                PendingIntent pendingIntent3 = this.$cancelCallPendingIntent;
                Intrinsics.checkNotNullExpressionValue(pendingIntent3, "cancelCallPendingIntent");
                PendingIntent pendingIntent4 = this.$fullScreenPendingIntent;
                Intrinsics.checkNotNullExpressionValue(pendingIntent4, "fullScreenPendingIntent");
                declineAction2 = headsUpNotificationService8.getDeclineAction(z2, pendingIntent3, pendingIntent4);
                Notification.Builder addPerson = fullScreenIntent2.setStyle(Notification.CallStyle.forIncomingCall(build2, declineAction2, this.$fullScreenPendingIntent)).addPerson(build2);
                Intrinsics.checkNotNullExpressionValue(addPerson, "Builder(this@HeadsUpNoti…addPerson(incomingCaller)");
                addPerson.setSmallIcon(FirebaseNotificationService.INSTANCE.getNotificationPersonIcon(addPerson));
                addPerson.setCategory("call");
                addPerson.setForegroundServiceBehavior(1);
                build = addPerson.build();
            }
        } else if (i4 == 1) {
            builder2 = (Person.Builder) this.L$0;
            ResultKt.throwOnFailure(obj);
            Person build22 = builder2.setIcon((Icon) obj).setImportant(true).build();
            Intrinsics.checkNotNullExpressionValue(build22, "Builder().setName(caller…etImportant(true).build()");
            HeadsUpNotificationService headsUpNotificationService62 = this.this$0;
            HeadsUpNotificationService headsUpNotificationService72 = headsUpNotificationService62;
            str2 = headsUpNotificationService62.CHANNEL_ID;
            Notification.Builder fullScreenIntent22 = new Notification.Builder(headsUpNotificationService72, str2).setContentTitle((CharSequence) this.$notificationMessage.element).setCategory("call").setAutoCancel(true).setOngoing(true).setVisibility(1).setFullScreenIntent(this.$fullScreenPendingIntent, true);
            HeadsUpNotificationService headsUpNotificationService82 = this.this$0;
            boolean z22 = this.$isBot.element;
            PendingIntent pendingIntent32 = this.$cancelCallPendingIntent;
            Intrinsics.checkNotNullExpressionValue(pendingIntent32, "cancelCallPendingIntent");
            PendingIntent pendingIntent42 = this.$fullScreenPendingIntent;
            Intrinsics.checkNotNullExpressionValue(pendingIntent42, "fullScreenPendingIntent");
            declineAction2 = headsUpNotificationService82.getDeclineAction(z22, pendingIntent32, pendingIntent42);
            Notification.Builder addPerson2 = fullScreenIntent22.setStyle(Notification.CallStyle.forIncomingCall(build22, declineAction2, this.$fullScreenPendingIntent)).addPerson(build22);
            Intrinsics.checkNotNullExpressionValue(addPerson2, "Builder(this@HeadsUpNoti…addPerson(incomingCaller)");
            addPerson2.setSmallIcon(FirebaseNotificationService.INSTANCE.getNotificationPersonIcon(addPerson2));
            addPerson2.setCategory("call");
            addPerson2.setForegroundServiceBehavior(1);
            build = addPerson2.build();
        } else {
            if (i4 != 2) {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            builder = (NotificationCompat.Builder) this.L$0;
            ResultKt.throwOnFailure(obj);
            build = builder.build();
        }
        Object systemService = this.this$0.getApplicationContext().getSystemService("notification");
        Intrinsics.checkNotNull(systemService, "null cannot be cast to non-null type android.app.NotificationManager");
        i = this.this$0.NOTIFICATION_ID;
        ((NotificationManager) systemService).notify(i, build);
        if (Build.VERSION.SDK_INT >= 29) {
            try {
                HeadsUpNotificationService headsUpNotificationService9 = this.this$0;
                i2 = headsUpNotificationService9.NOTIFICATION_ID;
                headsUpNotificationService9.startForeground(i2, build, -1);
            } catch (Exception e) {
                Timber.e(e);
            }
        } else {
            HeadsUpNotificationService headsUpNotificationService10 = this.this$0;
            i3 = headsUpNotificationService10.NOTIFICATION_ID;
            headsUpNotificationService10.startForeground(i3, build);
        }
        return Unit.INSTANCE;
    }
}