Initial commit
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
package com.google.android.gms.common.stats;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.ComponentName;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.ServiceConnection;
|
||||
import android.util.Log;
|
||||
import com.google.android.gms.common.util.ClientLibraryUtils;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public class ConnectionTracker {
|
||||
private static final Object a = new Object();
|
||||
private static volatile ConnectionTracker b;
|
||||
|
||||
private ConnectionTracker() {
|
||||
List list = Collections.EMPTY_LIST;
|
||||
}
|
||||
|
||||
public static ConnectionTracker a() {
|
||||
if (b == null) {
|
||||
synchronized (a) {
|
||||
if (b == null) {
|
||||
b = new ConnectionTracker();
|
||||
}
|
||||
}
|
||||
}
|
||||
return b;
|
||||
}
|
||||
|
||||
public final boolean a(Context context, String str, Intent intent, ServiceConnection serviceConnection, int i) {
|
||||
ComponentName component = intent.getComponent();
|
||||
if (component == null ? false : ClientLibraryUtils.c(context, component.getPackageName())) {
|
||||
Log.w("ConnectionTracker", "Attempted to bind to a service in a STOPPED package.");
|
||||
return false;
|
||||
}
|
||||
return context.bindService(intent, serviceConnection, i);
|
||||
}
|
||||
|
||||
public boolean a(Context context, Intent intent, ServiceConnection serviceConnection, int i) {
|
||||
return a(context, context.getClass().getName(), intent, serviceConnection, i);
|
||||
}
|
||||
|
||||
@SuppressLint({"UntrackedBindService"})
|
||||
public void a(Context context, ServiceConnection serviceConnection) {
|
||||
context.unbindService(serviceConnection);
|
||||
}
|
||||
}
|
30
sources/com/google/android/gms/common/stats/StatsEvent.java
Normal file
30
sources/com/google/android/gms/common/stats/StatsEvent.java
Normal file
@@ -0,0 +1,30 @@
|
||||
package com.google.android.gms.common.stats;
|
||||
|
||||
import com.google.android.gms.common.internal.ReflectedParcelable;
|
||||
import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public abstract class StatsEvent extends AbstractSafeParcelable implements ReflectedParcelable {
|
||||
public abstract int getEventType();
|
||||
|
||||
public abstract long getTimeMillis();
|
||||
|
||||
public String toString() {
|
||||
long timeMillis = getTimeMillis();
|
||||
int eventType = getEventType();
|
||||
long zzu = zzu();
|
||||
String zzv = zzv();
|
||||
StringBuilder sb = new StringBuilder(String.valueOf(zzv).length() + 53);
|
||||
sb.append(timeMillis);
|
||||
sb.append("\t");
|
||||
sb.append(eventType);
|
||||
sb.append("\t");
|
||||
sb.append(zzu);
|
||||
sb.append(zzv);
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public abstract long zzu();
|
||||
|
||||
public abstract String zzv();
|
||||
}
|
122
sources/com/google/android/gms/common/stats/WakeLockEvent.java
Normal file
122
sources/com/google/android/gms/common/stats/WakeLockEvent.java
Normal file
@@ -0,0 +1,122 @@
|
||||
package com.google.android.gms.common.stats;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import android.text.TextUtils;
|
||||
import com.google.android.gms.common.internal.safeparcel.SafeParcelWriter;
|
||||
import java.util.List;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class WakeLockEvent extends StatsEvent {
|
||||
public static final Parcelable.Creator<WakeLockEvent> CREATOR = new zza();
|
||||
private final long mTimeout;
|
||||
private final long zzfo;
|
||||
private int zzfp;
|
||||
private final String zzfq;
|
||||
private final String zzfr;
|
||||
private final String zzfs;
|
||||
private final int zzft;
|
||||
private final List<String> zzfu;
|
||||
private final String zzfv;
|
||||
private final long zzfw;
|
||||
private int zzfx;
|
||||
private final String zzfy;
|
||||
private final float zzfz;
|
||||
private final int zzg;
|
||||
private long zzga;
|
||||
|
||||
WakeLockEvent(int i, long j, int i2, String str, int i3, List<String> list, String str2, long j2, int i4, String str3, String str4, float f, long j3, String str5) {
|
||||
this.zzg = i;
|
||||
this.zzfo = j;
|
||||
this.zzfp = i2;
|
||||
this.zzfq = str;
|
||||
this.zzfr = str3;
|
||||
this.zzfs = str5;
|
||||
this.zzft = i3;
|
||||
this.zzga = -1L;
|
||||
this.zzfu = list;
|
||||
this.zzfv = str2;
|
||||
this.zzfw = j2;
|
||||
this.zzfx = i4;
|
||||
this.zzfy = str4;
|
||||
this.zzfz = f;
|
||||
this.mTimeout = j3;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.stats.StatsEvent
|
||||
public final int getEventType() {
|
||||
return this.zzfp;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.stats.StatsEvent
|
||||
public final long getTimeMillis() {
|
||||
return this.zzfo;
|
||||
}
|
||||
|
||||
@Override // android.os.Parcelable
|
||||
public final void writeToParcel(Parcel parcel, int i) {
|
||||
int a = SafeParcelWriter.a(parcel);
|
||||
SafeParcelWriter.a(parcel, 1, this.zzg);
|
||||
SafeParcelWriter.a(parcel, 2, getTimeMillis());
|
||||
SafeParcelWriter.a(parcel, 4, this.zzfq, false);
|
||||
SafeParcelWriter.a(parcel, 5, this.zzft);
|
||||
SafeParcelWriter.b(parcel, 6, this.zzfu, false);
|
||||
SafeParcelWriter.a(parcel, 8, this.zzfw);
|
||||
SafeParcelWriter.a(parcel, 10, this.zzfr, false);
|
||||
SafeParcelWriter.a(parcel, 11, getEventType());
|
||||
SafeParcelWriter.a(parcel, 12, this.zzfv, false);
|
||||
SafeParcelWriter.a(parcel, 13, this.zzfy, false);
|
||||
SafeParcelWriter.a(parcel, 14, this.zzfx);
|
||||
SafeParcelWriter.a(parcel, 15, this.zzfz);
|
||||
SafeParcelWriter.a(parcel, 16, this.mTimeout);
|
||||
SafeParcelWriter.a(parcel, 17, this.zzfs, false);
|
||||
SafeParcelWriter.a(parcel, a);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.stats.StatsEvent
|
||||
public final long zzu() {
|
||||
return this.zzga;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.stats.StatsEvent
|
||||
public final String zzv() {
|
||||
String str = this.zzfq;
|
||||
int i = this.zzft;
|
||||
List<String> list = this.zzfu;
|
||||
String join = list == null ? "" : TextUtils.join(",", list);
|
||||
int i2 = this.zzfx;
|
||||
String str2 = this.zzfr;
|
||||
if (str2 == null) {
|
||||
str2 = "";
|
||||
}
|
||||
String str3 = this.zzfy;
|
||||
if (str3 == null) {
|
||||
str3 = "";
|
||||
}
|
||||
float f = this.zzfz;
|
||||
String str4 = this.zzfs;
|
||||
String str5 = str4 != null ? str4 : "";
|
||||
StringBuilder sb = new StringBuilder(String.valueOf(str).length() + 45 + String.valueOf(join).length() + String.valueOf(str2).length() + String.valueOf(str3).length() + String.valueOf(str5).length());
|
||||
sb.append("\t");
|
||||
sb.append(str);
|
||||
sb.append("\t");
|
||||
sb.append(i);
|
||||
sb.append("\t");
|
||||
sb.append(join);
|
||||
sb.append("\t");
|
||||
sb.append(i2);
|
||||
sb.append("\t");
|
||||
sb.append(str2);
|
||||
sb.append("\t");
|
||||
sb.append(str3);
|
||||
sb.append("\t");
|
||||
sb.append(f);
|
||||
sb.append("\t");
|
||||
sb.append(str5);
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public WakeLockEvent(long j, int i, String str, int i2, List<String> list, String str2, long j2, int i3, String str3, String str4, float f, long j3, String str5) {
|
||||
this(2, j, i, str, i2, list, str2, j2, i3, str3, str4, f, j3, str5);
|
||||
}
|
||||
}
|
88
sources/com/google/android/gms/common/stats/zza.java
Normal file
88
sources/com/google/android/gms/common/stats/zza.java
Normal file
@@ -0,0 +1,88 @@
|
||||
package com.google.android.gms.common.stats;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import com.google.android.gms.common.internal.safeparcel.SafeParcelReader;
|
||||
import java.util.ArrayList;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class zza implements Parcelable.Creator<WakeLockEvent> {
|
||||
@Override // android.os.Parcelable.Creator
|
||||
public final /* synthetic */ WakeLockEvent createFromParcel(Parcel parcel) {
|
||||
int b = SafeParcelReader.b(parcel);
|
||||
long j = 0;
|
||||
long j2 = 0;
|
||||
long j3 = 0;
|
||||
String str = null;
|
||||
ArrayList<String> arrayList = null;
|
||||
String str2 = null;
|
||||
String str3 = null;
|
||||
String str4 = null;
|
||||
String str5 = null;
|
||||
int i = 0;
|
||||
int i2 = 0;
|
||||
int i3 = 0;
|
||||
int i4 = 0;
|
||||
float f = 0.0f;
|
||||
while (parcel.dataPosition() < b) {
|
||||
int a = SafeParcelReader.a(parcel);
|
||||
switch (SafeParcelReader.a(a)) {
|
||||
case 1:
|
||||
i = SafeParcelReader.x(parcel, a);
|
||||
break;
|
||||
case 2:
|
||||
j = SafeParcelReader.z(parcel, a);
|
||||
break;
|
||||
case 3:
|
||||
case 7:
|
||||
case 9:
|
||||
default:
|
||||
SafeParcelReader.C(parcel, a);
|
||||
break;
|
||||
case 4:
|
||||
str = SafeParcelReader.n(parcel, a);
|
||||
break;
|
||||
case 5:
|
||||
i3 = SafeParcelReader.x(parcel, a);
|
||||
break;
|
||||
case 6:
|
||||
arrayList = SafeParcelReader.p(parcel, a);
|
||||
break;
|
||||
case 8:
|
||||
j2 = SafeParcelReader.z(parcel, a);
|
||||
break;
|
||||
case 10:
|
||||
str3 = SafeParcelReader.n(parcel, a);
|
||||
break;
|
||||
case 11:
|
||||
i2 = SafeParcelReader.x(parcel, a);
|
||||
break;
|
||||
case 12:
|
||||
str2 = SafeParcelReader.n(parcel, a);
|
||||
break;
|
||||
case 13:
|
||||
str4 = SafeParcelReader.n(parcel, a);
|
||||
break;
|
||||
case 14:
|
||||
i4 = SafeParcelReader.x(parcel, a);
|
||||
break;
|
||||
case 15:
|
||||
f = SafeParcelReader.u(parcel, a);
|
||||
break;
|
||||
case 16:
|
||||
j3 = SafeParcelReader.z(parcel, a);
|
||||
break;
|
||||
case 17:
|
||||
str5 = SafeParcelReader.n(parcel, a);
|
||||
break;
|
||||
}
|
||||
}
|
||||
SafeParcelReader.q(parcel, b);
|
||||
return new WakeLockEvent(i, j, i2, str, i3, arrayList, str2, j2, i4, str3, str4, f, j3, str5);
|
||||
}
|
||||
|
||||
@Override // android.os.Parcelable.Creator
|
||||
public final /* synthetic */ WakeLockEvent[] newArray(int i) {
|
||||
return new WakeLockEvent[i];
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user