what-the-bank/sources/com/google/android/gms/location/ActivityRecognitionClient.java

158 lines
8.0 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package com.google.android.gms.location;
import android.app.Activity;
import android.app.PendingIntent;
import android.content.Context;
import com.google.android.gms.common.api.Api;
import com.google.android.gms.common.api.GoogleApi;
import com.google.android.gms.common.api.internal.RemoteCall;
import com.google.android.gms.common.api.internal.StatusCallback;
import com.google.android.gms.common.api.internal.TaskApiCall;
import com.google.android.gms.common.internal.Preconditions;
import com.google.android.gms.tasks.Task;
import com.google.android.gms.tasks.TaskCompletionSource;
/* loaded from: classes2.dex */
public class ActivityRecognitionClient extends GoogleApi<Api.ApiOptions.NoOptions> {
public static final int zza = 0;
public ActivityRecognitionClient(Activity activity) {
super(activity, LocationServices.API, Api.ApiOptions.NO_OPTIONS, GoogleApi.Settings.DEFAULT_SETTINGS);
}
public Task<Void> removeActivityTransitionUpdates(final PendingIntent pendingIntent) {
return doWrite(TaskApiCall.builder().run(new RemoteCall(pendingIntent) { // from class: com.google.android.gms.location.zzd
public final PendingIntent zza;
@Override // com.google.android.gms.common.api.internal.RemoteCall
public final void accept(Object obj, Object obj2) {
PendingIntent pendingIntent2 = this.zza;
int i = ActivityRecognitionClient.zza;
zzj zzjVar = new zzj((TaskCompletionSource) obj2);
Preconditions.checkNotNull(zzjVar, "ResultHolder not provided.");
((com.google.android.gms.internal.location.zzam) ((com.google.android.gms.internal.location.zzbe) obj).getService()).zzk(pendingIntent2, new StatusCallback(zzjVar));
}
{
this.zza = pendingIntent;
}
}).setMethodKey(2406).build());
}
public Task<Void> removeActivityUpdates(final PendingIntent pendingIntent) {
return doWrite(TaskApiCall.builder().run(new RemoteCall(pendingIntent) { // from class: com.google.android.gms.location.zze
public final PendingIntent zza;
@Override // com.google.android.gms.common.api.internal.RemoteCall
public final void accept(Object obj, Object obj2) {
PendingIntent pendingIntent2 = this.zza;
int i = ActivityRecognitionClient.zza;
((com.google.android.gms.internal.location.zzbe) obj).zzv(pendingIntent2);
((TaskCompletionSource) obj2).setResult(null);
}
{
this.zza = pendingIntent;
}
}).setMethodKey(2402).build());
}
public Task<Void> removeSleepSegmentUpdates(final PendingIntent pendingIntent) {
return doWrite(TaskApiCall.builder().run(new RemoteCall(pendingIntent) { // from class: com.google.android.gms.location.zzf
public final PendingIntent zza;
@Override // com.google.android.gms.common.api.internal.RemoteCall
public final void accept(Object obj, Object obj2) {
PendingIntent pendingIntent2 = this.zza;
int i = ActivityRecognitionClient.zza;
zzj zzjVar = new zzj((TaskCompletionSource) obj2);
Preconditions.checkNotNull(pendingIntent2, "PendingIntent must be specified.");
Preconditions.checkNotNull(zzjVar, "ResultHolder not provided.");
((com.google.android.gms.internal.location.zzam) ((com.google.android.gms.internal.location.zzbe) obj).getService()).zzp(pendingIntent2, new StatusCallback(zzjVar));
}
{
this.zza = pendingIntent;
}
}).setMethodKey(2411).build());
}
public Task<Void> requestActivityTransitionUpdates(final ActivityTransitionRequest activityTransitionRequest, final PendingIntent pendingIntent) {
activityTransitionRequest.zza(getContextAttributionTag());
return doWrite(TaskApiCall.builder().run(new RemoteCall(activityTransitionRequest, pendingIntent) { // from class: com.google.android.gms.location.zzc
public final ActivityTransitionRequest zza;
public final PendingIntent zzb;
@Override // com.google.android.gms.common.api.internal.RemoteCall
public final void accept(Object obj, Object obj2) {
ActivityTransitionRequest activityTransitionRequest2 = this.zza;
PendingIntent pendingIntent2 = this.zzb;
int i = ActivityRecognitionClient.zza;
zzj zzjVar = new zzj((TaskCompletionSource) obj2);
Preconditions.checkNotNull(activityTransitionRequest2, "activityTransitionRequest must be specified.");
Preconditions.checkNotNull(pendingIntent2, "PendingIntent must be specified.");
Preconditions.checkNotNull(zzjVar, "ResultHolder not provided.");
((com.google.android.gms.internal.location.zzam) ((com.google.android.gms.internal.location.zzbe) obj).getService()).zzq(activityTransitionRequest2, pendingIntent2, new StatusCallback(zzjVar));
}
{
this.zza = activityTransitionRequest;
this.zzb = pendingIntent;
}
}).setMethodKey(2405).build());
}
public Task<Void> requestActivityUpdates(long j, final PendingIntent pendingIntent) {
zzk zzkVar = new zzk();
zzkVar.zza(j);
final zzl zzb = zzkVar.zzb();
zzb.zza(getContextAttributionTag());
return doWrite(TaskApiCall.builder().run(new RemoteCall(zzb, pendingIntent) { // from class: com.google.android.gms.location.zzh
public final zzl zza;
public final PendingIntent zzb;
@Override // com.google.android.gms.common.api.internal.RemoteCall
public final void accept(Object obj, Object obj2) {
zzl zzlVar = this.zza;
PendingIntent pendingIntent2 = this.zzb;
int i = ActivityRecognitionClient.zza;
zzj zzjVar = new zzj((TaskCompletionSource) obj2);
Preconditions.checkNotNull(zzlVar, "ActivityRecognitionRequest can't be null.");
Preconditions.checkNotNull(pendingIntent2, "PendingIntent must be specified.");
Preconditions.checkNotNull(zzjVar, "ResultHolder not provided.");
((com.google.android.gms.internal.location.zzam) ((com.google.android.gms.internal.location.zzbe) obj).getService()).zzs(zzlVar, pendingIntent2, new StatusCallback(zzjVar));
}
{
this.zza = zzb;
this.zzb = pendingIntent;
}
}).setMethodKey(2401).build());
}
public Task<Void> requestSleepSegmentUpdates(final PendingIntent pendingIntent, final SleepSegmentRequest sleepSegmentRequest) {
Preconditions.checkNotNull(pendingIntent, "PendingIntent must be specified.");
return doRead(TaskApiCall.builder().run(new RemoteCall(this, pendingIntent, sleepSegmentRequest) { // from class: com.google.android.gms.location.zzg
public final ActivityRecognitionClient zza;
public final PendingIntent zzb;
public final SleepSegmentRequest zzc;
@Override // com.google.android.gms.common.api.internal.RemoteCall
public final void accept(Object obj, Object obj2) {
ActivityRecognitionClient activityRecognitionClient = this.zza;
((com.google.android.gms.internal.location.zzam) ((com.google.android.gms.internal.location.zzbe) obj).getService()).zzt(this.zzb, this.zzc, new zzi(activityRecognitionClient, (TaskCompletionSource) obj2));
}
{
this.zza = this;
this.zzb = pendingIntent;
this.zzc = sleepSegmentRequest;
}
}).setFeatures(zzy.zzb).setMethodKey(2410).build());
}
public ActivityRecognitionClient(Context context) {
super(context, LocationServices.API, Api.ApiOptions.NO_OPTIONS, GoogleApi.Settings.DEFAULT_SETTINGS);
}
}