正在查看: Tasker v6.6.3 应用的 ServiceFCM.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Tasker v6.6.3 应用的 ServiceFCM.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.joaomgcd.oldtaskercompat.fcm;
import android.content.Context;
import android.os.Parcel;
import android.os.Parcelable;
import com.google.firebase.messaging.FirebaseMessagingService;
import com.google.firebase.messaging.RemoteMessage;
import com.joaomgcd.oldtaskercompat.fcm.ServiceFCM;
import com.joaomgcd.oldtaskercompat.fcm.b;
import com.joaomgcd.oldtaskercompat.fcm.configuration.FCMConfiguration;
import com.joaomgcd.oldtaskercompat.fcm.configuration.FCMFirebaseConfiguration;
import com.joaomgcd.oldtaskercompat.fcm.configuration.FCMServiceAccount;
import com.joaomgcd.taskerm.genericaction.GenericActionServiceCoroutine;
import com.joaomgcd.taskerm.util.b7;
import com.joaomgcd.taskerm.util.ph;
import com.joaomgcd.taskerm.util.zc;
import dd.d;
import ik.l;
import java.io.File;
import java.nio.charset.Charset;
import java.util.Map;
import java.util.concurrent.CancellationException;
import jk.p;
import net.dinglisch.android.taskerm.o7;
import uk.a0;
import uk.a2;
import uk.d1;
import uk.e2;
import uk.n0;
import uk.o0;
import vj.e0;
import vj.j;
import vj.k;
public final class ServiceFCM extends FirebaseMessagingService {
private static boolean A;
private final a0 w;
private final n0 x;
public static final Companion y = new Companion(null);
public static final int z = 8;
private static final Object B = new Object();
private static final j<d> C = k.a(new ik.a() {
public final Object e() {
d H;
H = ServiceFCM.H();
return H;
}
});
private static final j<b> D = k.a(new ik.a() {
public final Object e() {
com.joaomgcd.oldtaskercompat.fcm.b G;
G = ServiceFCM.G();
return G;
}
});
private static final j<FCMConfiguration> E = k.a(new ik.a() {
public final Object e() {
FCMConfiguration F;
F = ServiceFCM.F();
return F;
}
});
public static final class Companion {
private static final class GenericActionUpdateTokenRemotely extends GenericActionServiceCoroutine {
public static final Parcelable.Creator<GenericActionUpdateTokenRemotely> CREATOR = new a();
public static final class a implements Parcelable.Creator<GenericActionUpdateTokenRemotely> {
@Override
public final GenericActionUpdateTokenRemotely createFromParcel(Parcel parcel) {
p.i(parcel, "parcel");
parcel.readInt();
return new GenericActionUpdateTokenRemotely();
}
@Override
public final GenericActionUpdateTokenRemotely[] newArray(int i) {
return new GenericActionUpdateTokenRemotely[i];
}
}
@bk.f(c = "com.joaomgcd.oldtaskercompat.fcm.ServiceFCM$Companion$GenericActionUpdateTokenRemotely", f = "ServiceFCM.kt", l = {132, 133}, m = "execute")
static final class b extends bk.d {
Object s;
Object t;
int v;
b(zj.e<? super b> eVar) {
super(eVar);
}
public final Object t(Object obj) {
this.t = obj;
this.v |= Integer.MIN_VALUE;
return GenericActionUpdateTokenRemotely.this.execute(null, this);
}
}
public GenericActionUpdateTokenRemotely() {
super((String) null, 1, (jk.h) null);
}
public final int describeContents() {
return 0;
}
public java.lang.Object execute(android.app.Service r6, zj.e<? super com.joaomgcd.taskerm.util.pe> r7) {
throw new UnsupportedOperationException("Method not decompiled: com.joaomgcd.oldtaskercompat.fcm.ServiceFCM.Companion.GenericActionUpdateTokenRemotely.execute(android.app.Service, zj.e):java.lang.Object");
}
public final void writeToParcel(Parcel parcel, int i) {
p.i(parcel, "dest");
parcel.writeInt(1);
}
}
@bk.f(c = "com.joaomgcd.oldtaskercompat.fcm.ServiceFCM$Companion", f = "ServiceFCM.kt", l = {152}, m = "assertGoogleCloudServiceAccountValid")
static final class a extends bk.d {
Object s;
Object t;
Object u;
Object v;
int w;
Object x;
int z;
a(zj.e<? super a> eVar) {
super(eVar);
}
public final Object t(Object obj) {
this.x = obj;
this.z |= Integer.MIN_VALUE;
return Companion.this.f(null, null, this);
}
}
@bk.f(c = "com.joaomgcd.oldtaskercompat.fcm.ServiceFCM$Companion", f = "ServiceFCM.kt", l = {118}, m = "getBearerToken")
static final class b extends bk.d {
Object s;
int u;
b(zj.e<? super b> eVar) {
super(eVar);
}
public final Object t(Object obj) {
this.s = obj;
this.u |= Integer.MIN_VALUE;
return Companion.this.h(this);
}
}
@bk.f(c = "com.joaomgcd.oldtaskercompat.fcm.ServiceFCM$Companion", f = "ServiceFCM.kt", l = {102, 103}, m = "getRemoteDeviceNames")
static final class c extends bk.d {
Object s;
Object t;
boolean u;
Object v;
int x;
c(zj.e<? super c> eVar) {
super(eVar);
}
public final Object t(Object obj) {
this.v = obj;
this.x |= Integer.MIN_VALUE;
return Companion.this.o(null, false, this);
}
}
@bk.f(c = "com.joaomgcd.oldtaskercompat.fcm.ServiceFCM$Companion", f = "ServiceFCM.kt", l = {216, 217, 223, 233}, m = "runActionRemotelyByName")
static final class d extends bk.d {
int A;
Object B;
int D;
Object s;
Object t;
Object u;
Object v;
Object w;
Object x;
Object y;
Object z;
d(zj.e<? super d> eVar) {
super(eVar);
}
public final Object t(Object obj) {
this.B = obj;
this.D |= Integer.MIN_VALUE;
return Companion.this.w(null, null, null, null, this);
}
}
@bk.f(c = "com.joaomgcd.oldtaskercompat.fcm.ServiceFCM$Companion", f = "ServiceFCM.kt", l = {183, 186}, m = "sendRemoteMessageByFCMToken")
static final class e extends bk.d {
Object s;
Object t;
Object u;
Object v;
Object w;
int y;
e(zj.e<? super e> eVar) {
super(eVar);
}
public final Object t(Object obj) {
this.w = obj;
this.y |= Integer.MIN_VALUE;
return Companion.this.x(null, null, null, this);
}
}
@bk.f(c = "com.joaomgcd.oldtaskercompat.fcm.ServiceFCM$Companion", f = "ServiceFCM.kt", l = {190, 190}, m = "sendRemoteMessageByNameOrFCMToken")
static final class f extends bk.d {
Object s;
Object t;
Object u;
Object v;
Object w;
Object x;
int z;
f(zj.e<? super f> eVar) {
super(eVar);
}
public final Object t(Object obj) {
this.x = obj;
this.z |= Integer.MIN_VALUE;
return Companion.this.y(null, null, null, this);
}
}
@bk.f(c = "com.joaomgcd.oldtaskercompat.fcm.ServiceFCM$Companion", f = "ServiceFCM.kt", l = {198, 201}, m = "sendRemoteMessageToAllDevices")
static final class g extends bk.d {
Object A;
Object B;
int C;
int D;
int E;
Object F;
int H;
Object s;
Object t;
Object u;
Object v;
Object w;
Object x;
Object y;
Object z;
g(zj.e<? super g> eVar) {
super(eVar);
}
public final Object t(Object obj) {
this.F = obj;
this.H |= Integer.MIN_VALUE;
return Companion.this.z(null, null, this);
}
}
@bk.f(c = "com.joaomgcd.oldtaskercompat.fcm.ServiceFCM$Companion", f = "ServiceFCM.kt", l = {175, 176}, m = "updateTokenRemotely")
static final class h extends bk.d {
Object s;
Object t;
Object u;
int w;
h(zj.e<? super h> eVar) {
super(eVar);
}
public final Object t(Object obj) {
this.u = obj;
this.w |= Integer.MIN_VALUE;
return Companion.this.B(null, this);
}
}
public Companion(jk.h hVar) {
this();
}
public static final String d(String str) {
File N = ph.N(str);
if (N != null) {
return gk.c.d(N, (Charset) null, 1, (Object) null);
}
return null;
}
public static final Boolean g(FCMServiceAccount fCMServiceAccount) {
return Boolean.valueOf(fCMServiceAccount.isValid());
}
private final FCMConfiguration i() {
return (FCMConfiguration) ServiceFCM.E.getValue();
}
private final com.joaomgcd.oldtaskercompat.fcm.b j() {
return (com.joaomgcd.oldtaskercompat.fcm.b) ServiceFCM.D.getValue();
}
public final dd.d k() {
return (dd.d) ServiceFCM.C.getValue();
}
private final String l(final String str) {
String str2 = (String) b7.n6((l) null, new ik.a() {
public final Object e() {
String d2;
d2 = ServiceFCM.Companion.d(str);
return d2;
}
}, 1, (Object) null);
return str2 == null ? str : str2;
}
public static final Boolean u(String str) {
String l;
FCMFirebaseConfiguration fCMFirebaseConfiguration;
boolean z = false;
if (str != null && (l = ServiceFCM.y.l(str)) != null && (fCMFirebaseConfiguration = (FCMFirebaseConfiguration) eg.f.c().h(l, FCMFirebaseConfiguration.class)) != null && fCMFirebaseConfiguration.isValid()) {
z = true;
}
return Boolean.valueOf(z);
}
public final void A(Context context, String str, String str2, boolean z) {
p.i(context, "context");
i().setFCMConfigurations(context, str, str2);
if (z) {
new GenericActionUpdateTokenRemotely().runDontTrackProgress(context);
}
}
public final java.lang.Object B(android.content.Context r6, zj.e<? super com.joaomgcd.taskerm.google.drive.io.DriveMetadataV3Upload> r7) {
throw new UnsupportedOperationException("Method not decompiled: com.joaomgcd.oldtaskercompat.fcm.ServiceFCM.Companion.B(android.content.Context, zj.e):java.lang.Object");
}
public final java.lang.Object f(android.content.Context r7, java.lang.String r8, zj.e<? super vj.e0> r9) {
throw new UnsupportedOperationException("Method not decompiled: com.joaomgcd.oldtaskercompat.fcm.ServiceFCM.Companion.f(android.content.Context, java.lang.String, zj.e):java.lang.Object");
}
public final java.lang.Object h(zj.e<? super java.lang.String> r5) {
throw new UnsupportedOperationException("Method not decompiled: com.joaomgcd.oldtaskercompat.fcm.ServiceFCM.Companion.h(zj.e):java.lang.Object");
}
public final Object m(Context context, zj.e<? super String> eVar) {
s(context);
return j().e(eVar);
}
public final Object n(Context context, zj.e<? super String> eVar) {
s(context);
return j().f(eVar);
}
public final java.lang.Object o(android.content.Context r7, boolean r8, zj.e<? super java.util.List<java.lang.String>> r9) {
throw new UnsupportedOperationException("Method not decompiled: com.joaomgcd.oldtaskercompat.fcm.ServiceFCM.Companion.o(android.content.Context, boolean, zj.e):java.lang.Object");
}
public final Object p(Context context, boolean z, zj.e<? super b.C0048b> eVar) {
return j().l(context, z, eVar);
}
public final boolean q(Context context) {
p.i(context, "context");
s(context);
return i().hasFCMConfigurations(context);
}
public final void r(Context context) {
p.i(context, "context");
synchronized (ServiceFCM.B) {
String m = zc.m(context);
String l = zc.l(context);
o7.f("FCM", "Initing with service account " + m + " and firebase " + l);
FCMConfiguration.INSTANCE.setFCMConfigurations(context, m, l);
ServiceFCM.A = true;
e0 e0Var = e0.a;
}
}
public final void s(Context context) {
p.i(context, "context");
synchronized (ServiceFCM.B) {
if (ServiceFCM.A) {
return;
}
ServiceFCM.y.r(context);
e0 e0Var = e0.a;
}
}
public final boolean t(Context context, final String str) {
p.i(context, "context");
Boolean bool = (Boolean) b7.n6((l) null, new ik.a() {
public final Object e() {
Boolean u;
u = ServiceFCM.Companion.u(str);
return u;
}
}, 1, (Object) null);
if (bool != null) {
return bool.booleanValue();
}
return false;
}
public final Object v(Context context, zj.e<? super e0> eVar) {
Object i = j().i(context, eVar);
return i == ak.b.c() ? i : e0.a;
}
public final java.lang.Object w(android.content.Context r25, net.dinglisch.android.taskerm.c r26, java.lang.String r27, java.util.Map<java.lang.String, java.lang.String> r28, zj.e<? super com.joaomgcd.oldtaskercompat.fcm.remotemessage.RemoteActionResult> r29) {
throw new UnsupportedOperationException("Method not decompiled: com.joaomgcd.oldtaskercompat.fcm.ServiceFCM.Companion.w(android.content.Context, net.dinglisch.android.taskerm.c, java.lang.String, java.util.Map, zj.e):java.lang.Object");
}
public final java.lang.Object x(android.content.Context r8, java.lang.String r9, com.joaomgcd.oldtaskercompat.fcm.remotemessage.RemoteMessage r10, zj.e<? super java.util.List<java.lang.String>> r11) {
throw new UnsupportedOperationException("Method not decompiled: com.joaomgcd.oldtaskercompat.fcm.ServiceFCM.Companion.x(android.content.Context, java.lang.String, com.joaomgcd.oldtaskercompat.fcm.remotemessage.RemoteMessage, zj.e):java.lang.Object");
}
public final java.lang.Object y(android.content.Context r6, java.lang.String r7, com.joaomgcd.oldtaskercompat.fcm.remotemessage.RemoteMessage r8, zj.e<? super java.util.List<java.lang.String>> r9) {
throw new UnsupportedOperationException("Method not decompiled: com.joaomgcd.oldtaskercompat.fcm.ServiceFCM.Companion.y(android.content.Context, java.lang.String, com.joaomgcd.oldtaskercompat.fcm.remotemessage.RemoteMessage, zj.e):java.lang.Object");
}
public final java.lang.Object z(android.content.Context r18, com.joaomgcd.oldtaskercompat.fcm.remotemessage.RemoteMessage r19, zj.e<? super java.util.List<? extends java.util.List<java.lang.String>>> r20) {
throw new UnsupportedOperationException("Method not decompiled: com.joaomgcd.oldtaskercompat.fcm.ServiceFCM.Companion.z(android.content.Context, com.joaomgcd.oldtaskercompat.fcm.remotemessage.RemoteMessage, zj.e):java.lang.Object");
}
private Companion() {
}
}
public ServiceFCM() {
a0 b = e2.b((a2) null, 1, (Object) null);
this.w = b;
this.x = o0.a(d1.b().E0(b));
}
public static final FCMConfiguration F() {
return FCMConfiguration.INSTANCE;
}
public static final b G() {
return b.a;
}
public static final d H() {
return d.a;
}
public static final boolean I(Context context) {
return y.q(context);
}
public static final boolean J(Context context, String str) {
return y.t(context, str);
}
@Override
public void onDestroy() {
super.onDestroy();
a2.a.a(this.w, (CancellationException) null, 1, (Object) null);
}
@Override
public void r(RemoteMessage remoteMessage) {
p.i(remoteMessage, "message");
super.r(remoteMessage);
d k = y.k();
Map<String, String> d = remoteMessage.d();
p.h(d, "getData(...)");
Map<String, String> b = k.b(d);
if (b == null) {
return;
}
o7.f("FCM", "Received Message: " + b7.o2(b));
ServiceRemoteMessageRunner.u.a(this, b);
}
@Override
public void t(String str) {
p.i(str, "token");
super.t(str);
o7.f("FCM", "Refreshed token: " + str);
new Companion.GenericActionUpdateTokenRemotely().runDontTrackProgress(this);
}
}