正在查看: Perplexity v2.48.1 应用的 ProxyGoogleActivityRecognitionClient.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Perplexity v2.48.1 应用的 ProxyGoogleActivityRecognitionClient.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.mapbox.common.movement;
import android.app.PendingIntent;
import android.content.Context;
import com.google.android.gms.location.ActivityRecognition;
import com.mapbox.common.location.FailedTask;
import com.mapbox.common.location.GoogleDeviceLocationProviderKt;
import com.mapbox.common.location.IncompatibleGooglePlayServicesActivityRecognitionVersion;
import fd.d;
import java.lang.reflect.Method;
import kotlin.Lazy;
import kotlin.LazyKt;
import kotlin.Metadata;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import nd.j;
@Metadata(d1 = {"\u00000\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\t\n\u0002\b\u000b\b\u0000\u0018\u0000 \u00182\u00020\u0001:\u0001\u0018B\u000f\u0012\u0006\u0010\u0003\u001a\u00020\u0002¢\u0006\u0004\b\u0004\u0010\u0005J#\u0010\f\u001a\b\u0012\u0004\u0012\u00020\u000b0\n2\u0006\u0010\u0007\u001a\u00020\u00062\u0006\u0010\t\u001a\u00020\b¢\u0006\u0004\b\f\u0010\rJ#\u0010\u0011\u001a\b\u0012\u0004\u0012\u00020\u000b0\n2\u0006\u0010\u000f\u001a\u00020\u000e2\u0006\u0010\u0010\u001a\u00020\b¢\u0006\u0004\b\u0011\u0010\u0012J\u001b\u0010\u0013\u001a\b\u0012\u0004\u0012\u00020\u000b0\n2\u0006\u0010\t\u001a\u00020\b¢\u0006\u0004\b\u0013\u0010\u0014J\u001b\u0010\u0015\u001a\b\u0012\u0004\u0012\u00020\u000b0\n2\u0006\u0010\t\u001a\u00020\b¢\u0006\u0004\b\u0015\u0010\u0014R\u0014\u0010\u0016\u001a\u00020\u00018\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b\u0016\u0010\u0017¨\u0006\u0019"}, d2 = {"Lcom/mapbox/common/movement/ProxyGoogleActivityRecognitionClient;", "", "Landroid/content/Context;", "context", "<init>", "(Landroid/content/Context;)V", "Lfd/d;", "activityTransitionRequest", "Landroid/app/PendingIntent;", "pendingIntent", "Lnd/j;", "Ljava/lang/Void;", "requestActivityTransitionUpdates", "(Lfd/d;Landroid/app/PendingIntent;)Lnd/j;", "", "detectionIntervalMillis", "callbackIntent", "requestActivityUpdates", "(JLandroid/app/PendingIntent;)Lnd/j;", "removeActivityTransitionUpdates", "(Landroid/app/PendingIntent;)Lnd/j;", "removeActivityUpdates", "googleActivityRecognitionClient", "Ljava/lang/Object;", "Companion", "common_release"}, k = 1, mv = {1, 7, 1}, xi = 48)
public final class ProxyGoogleActivityRecognitionClient {
public static final Companion INSTANCE = new Companion(null);
private static final Lazy<Boolean> available$delegate = LazyKt.a(new Function0<Boolean>() {
public final Boolean m26invoke() {
return Boolean.valueOf(GoogleDeviceLocationProviderKt.getGooglePlayServicesHelper().isGooglePlayActivityRecognitionAvailable());
}
});
private static Method removeActivityTransitionUpdates;
private static Method removeActivityUpdates;
private static Method requestActivityTransitionUpdates;
private static Method requestActivityUpdates;
private final Object googleActivityRecognitionClient;
@Metadata(d1 = {"\u0000$\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0010\u0002\n\u0002\b\u0002\b\u0080\u0003\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002J\r\u0010\u000e\u001a\u00020\u000fH\u0000¢\u0006\u0002\b\u0010R\u001b\u0010\u0003\u001a\u00020\u00048@X\u0080\u0084\u0002¢\u0006\f\n\u0004\b\u0007\u0010\b\u001a\u0004\b\u0005\u0010\u0006R\u000e\u0010\t\u001a\u00020\nX\u0082.¢\u0006\u0002\n\u0000R\u000e\u0010\u000b\u001a\u00020\nX\u0082.¢\u0006\u0002\n\u0000R\u000e\u0010\f\u001a\u00020\nX\u0082.¢\u0006\u0002\n\u0000R\u000e\u0010\r\u001a\u00020\nX\u0082.¢\u0006\u0002\n\u0000¨\u0006\u0011"}, d2 = {"Lcom/mapbox/common/movement/ProxyGoogleActivityRecognitionClient$Companion;", "", "()V", "available", "", "getAvailable$common_release", "()Z", "available$delegate", "Lkotlin/Lazy;", "removeActivityTransitionUpdates", "Ljava/lang/reflect/Method;", "removeActivityUpdates", "requestActivityTransitionUpdates", "requestActivityUpdates", "verifyAndCacheMethods", "", "verifyAndCacheMethods$common_release", "common_release"}, k = 1, mv = {1, 7, 1}, xi = 48)
public static final class Companion {
public Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
public final boolean getAvailable$common_release() {
return ((Boolean) ProxyGoogleActivityRecognitionClient.available$delegate.getValue()).booleanValue();
}
public final void verifyAndCacheMethods$common_release() {
try {
Companion companion = ProxyGoogleActivityRecognitionClient.INSTANCE;
Method method = com.google.android.gms.location.ActivityRecognitionClient.class.getMethod("requestActivityTransitionUpdates", d.class, PendingIntent.class);
Intrinsics.g(method, "getMethod(\n \"…t::class.java\n )");
ProxyGoogleActivityRecognitionClient.requestActivityTransitionUpdates = method;
Method method2 = com.google.android.gms.location.ActivityRecognitionClient.class.getMethod("requestActivityUpdates", Long.TYPE, PendingIntent.class);
Intrinsics.g(method2, "getMethod(\n \"…::class.java,\n )");
ProxyGoogleActivityRecognitionClient.requestActivityUpdates = method2;
Method method3 = com.google.android.gms.location.ActivityRecognitionClient.class.getMethod("removeActivityTransitionUpdates", PendingIntent.class);
Intrinsics.g(method3, "getMethod(\n \"…::class.java,\n )");
ProxyGoogleActivityRecognitionClient.removeActivityTransitionUpdates = method3;
Method method4 = com.google.android.gms.location.ActivityRecognitionClient.class.getMethod("removeActivityUpdates", PendingIntent.class);
Intrinsics.g(method4, "getMethod(\n \"…t::class.java\n )");
ProxyGoogleActivityRecognitionClient.removeActivityUpdates = method4;
} catch (ClassNotFoundException e) {
throw new IncompatibleGooglePlayServicesActivityRecognitionVersion(e);
} catch (NoSuchMethodException e2) {
throw new IncompatibleGooglePlayServicesActivityRecognitionVersion(e2);
} catch (SecurityException e3) {
throw new IncompatibleGooglePlayServicesActivityRecognitionVersion(e3);
}
}
private Companion() {
}
}
public ProxyGoogleActivityRecognitionClient(Context context) {
Intrinsics.h(context, "context");
com.google.android.gms.location.ActivityRecognitionClient client = ActivityRecognition.getClient(context);
Intrinsics.g(client, "getClient(context)");
this.googleActivityRecognitionClient = client;
}
public final j removeActivityTransitionUpdates(PendingIntent pendingIntent) {
Intrinsics.h(pendingIntent, "pendingIntent");
try {
Method method = removeActivityTransitionUpdates;
if (method == null) {
Intrinsics.n("removeActivityTransitionUpdates");
throw null;
}
Object invoke = method.invoke(this.googleActivityRecognitionClient, pendingIntent);
Intrinsics.f(invoke, "null cannot be cast to non-null type com.google.android.gms.tasks.Task<java.lang.Void>");
return (j) invoke;
} catch (Exception e) {
return new FailedTask(e);
}
}
public final j removeActivityUpdates(PendingIntent pendingIntent) {
Intrinsics.h(pendingIntent, "pendingIntent");
try {
Method method = removeActivityUpdates;
if (method == null) {
Intrinsics.n("removeActivityUpdates");
throw null;
}
Object invoke = method.invoke(this.googleActivityRecognitionClient, pendingIntent);
Intrinsics.f(invoke, "null cannot be cast to non-null type com.google.android.gms.tasks.Task<java.lang.Void>");
return (j) invoke;
} catch (Exception e) {
return new FailedTask(e);
}
}
public final j requestActivityTransitionUpdates(d activityTransitionRequest, PendingIntent pendingIntent) {
Intrinsics.h(activityTransitionRequest, "activityTransitionRequest");
Intrinsics.h(pendingIntent, "pendingIntent");
try {
Method method = requestActivityTransitionUpdates;
if (method == null) {
Intrinsics.n("requestActivityTransitionUpdates");
throw null;
}
Object invoke = method.invoke(this.googleActivityRecognitionClient, activityTransitionRequest, pendingIntent);
Intrinsics.f(invoke, "null cannot be cast to non-null type com.google.android.gms.tasks.Task<java.lang.Void>");
return (j) invoke;
} catch (Exception e) {
return new FailedTask(e);
}
}
public final j requestActivityUpdates(long detectionIntervalMillis, PendingIntent callbackIntent) {
Intrinsics.h(callbackIntent, "callbackIntent");
try {
Method method = requestActivityUpdates;
if (method == null) {
Intrinsics.n("requestActivityUpdates");
throw null;
}
Object invoke = method.invoke(this.googleActivityRecognitionClient, Long.valueOf(detectionIntervalMillis), callbackIntent);
Intrinsics.f(invoke, "null cannot be cast to non-null type com.google.android.gms.tasks.Task<java.lang.Void>");
return (j) invoke;
} catch (Exception e) {
return new FailedTask(e);
}
}
}