148 lines
5.0 KiB
Java
148 lines
5.0 KiB
Java
|
package com.google.android.gms.measurement.internal;
|
||
|
|
||
|
import android.app.job.JobParameters;
|
||
|
import android.content.Context;
|
||
|
import android.content.Intent;
|
||
|
import android.os.IBinder;
|
||
|
import com.google.android.gms.common.internal.Preconditions;
|
||
|
import com.google.android.gms.measurement.internal.zzjt;
|
||
|
|
||
|
/* loaded from: classes.dex */
|
||
|
public final class zzju<T extends Context & zzjt> {
|
||
|
private final T zza;
|
||
|
|
||
|
public zzju(T t) {
|
||
|
Preconditions.checkNotNull(t);
|
||
|
this.zza = t;
|
||
|
}
|
||
|
|
||
|
private final zzel zzk() {
|
||
|
return zzfv.zzp(this.zza, null, null).zzay();
|
||
|
}
|
||
|
|
||
|
public final int zza(final Intent intent, int i, final int i2) {
|
||
|
zzfv zzp = zzfv.zzp(this.zza, null, null);
|
||
|
final zzel zzay = zzp.zzay();
|
||
|
if (intent == null) {
|
||
|
zzay.zzk().zza("AppMeasurementService started with null intent");
|
||
|
return 2;
|
||
|
}
|
||
|
String action = intent.getAction();
|
||
|
zzp.zzaw();
|
||
|
zzay.zzj().zzc("Local AppMeasurementService called. startId, action", Integer.valueOf(i2), action);
|
||
|
if ("com.google.android.gms.measurement.UPLOAD".equals(action)) {
|
||
|
zzh(new Runnable(this, i2, zzay, intent) { // from class: com.google.android.gms.measurement.internal.zzjq
|
||
|
public final zzju zza;
|
||
|
public final int zzb;
|
||
|
public final zzel zzc;
|
||
|
public final Intent zzd;
|
||
|
|
||
|
@Override // java.lang.Runnable
|
||
|
public final void run() {
|
||
|
this.zza.zzc(this.zzb, this.zzc, this.zzd);
|
||
|
}
|
||
|
|
||
|
{
|
||
|
this.zza = this;
|
||
|
this.zzb = i2;
|
||
|
this.zzc = zzay;
|
||
|
this.zzd = intent;
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
return 2;
|
||
|
}
|
||
|
|
||
|
public final IBinder zzb(Intent intent) {
|
||
|
if (intent == null) {
|
||
|
zzk().zzd().zza("onBind called with null intent");
|
||
|
return null;
|
||
|
}
|
||
|
String action = intent.getAction();
|
||
|
if ("com.google.android.gms.measurement.START".equals(action)) {
|
||
|
return new zzgn(zzks.zzt(this.zza), null);
|
||
|
}
|
||
|
zzk().zzk().zzb("onBind received unknown action", action);
|
||
|
return null;
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
public final /* synthetic */ void zzc(int i, zzel zzelVar, Intent intent) {
|
||
|
if (this.zza.zzc(i)) {
|
||
|
zzelVar.zzj().zzb("Local AppMeasurementService processed last upload request. StartId", Integer.valueOf(i));
|
||
|
zzk().zzj().zza("Completed wakeful intent.");
|
||
|
this.zza.zza(intent);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
public final /* synthetic */ void zzd(zzel zzelVar, JobParameters jobParameters) {
|
||
|
zzelVar.zzj().zza("AppMeasurementJobService processed last upload request.");
|
||
|
this.zza.zzb(jobParameters, false);
|
||
|
}
|
||
|
|
||
|
public final void zze() {
|
||
|
zzfv zzp = zzfv.zzp(this.zza, null, null);
|
||
|
zzel zzay = zzp.zzay();
|
||
|
zzp.zzaw();
|
||
|
zzay.zzj().zza("Local AppMeasurementService is starting up");
|
||
|
}
|
||
|
|
||
|
public final void zzf() {
|
||
|
zzfv zzp = zzfv.zzp(this.zza, null, null);
|
||
|
zzel zzay = zzp.zzay();
|
||
|
zzp.zzaw();
|
||
|
zzay.zzj().zza("Local AppMeasurementService is shutting down");
|
||
|
}
|
||
|
|
||
|
public final void zzg(Intent intent) {
|
||
|
if (intent == null) {
|
||
|
zzk().zzd().zza("onRebind called with null intent");
|
||
|
} else {
|
||
|
zzk().zzj().zzb("onRebind called. action", intent.getAction());
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public final void zzh(Runnable runnable) {
|
||
|
zzks zzt = zzks.zzt(this.zza);
|
||
|
zzt.zzaz().zzp(new zzjs(this, zzt, runnable));
|
||
|
}
|
||
|
|
||
|
public final boolean zzi(final JobParameters jobParameters) {
|
||
|
zzfv zzp = zzfv.zzp(this.zza, null, null);
|
||
|
final zzel zzay = zzp.zzay();
|
||
|
String string = jobParameters.getExtras().getString("action");
|
||
|
zzp.zzaw();
|
||
|
zzay.zzj().zzb("Local AppMeasurementJobService called. action", string);
|
||
|
if (!"com.google.android.gms.measurement.UPLOAD".equals(string)) {
|
||
|
return true;
|
||
|
}
|
||
|
zzh(new Runnable(this, zzay, jobParameters) { // from class: com.google.android.gms.measurement.internal.zzjr
|
||
|
public final zzju zza;
|
||
|
public final zzel zzb;
|
||
|
public final JobParameters zzc;
|
||
|
|
||
|
@Override // java.lang.Runnable
|
||
|
public final void run() {
|
||
|
this.zza.zzd(this.zzb, this.zzc);
|
||
|
}
|
||
|
|
||
|
{
|
||
|
this.zza = this;
|
||
|
this.zzb = zzay;
|
||
|
this.zzc = jobParameters;
|
||
|
}
|
||
|
});
|
||
|
return true;
|
||
|
}
|
||
|
|
||
|
public final boolean zzj(Intent intent) {
|
||
|
if (intent == null) {
|
||
|
zzk().zzd().zza("onUnbind called with null intent");
|
||
|
return true;
|
||
|
}
|
||
|
zzk().zzj().zzb("onUnbind called for intent. action", intent.getAction());
|
||
|
return true;
|
||
|
}
|
||
|
}
|