90 lines
3.1 KiB
Java
90 lines
3.1 KiB
Java
package com.google.android.gms.common.moduleinstall;
|
|
|
|
import android.os.Parcel;
|
|
import android.os.Parcelable;
|
|
import com.google.android.gms.common.internal.Preconditions;
|
|
import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable;
|
|
import com.google.android.gms.common.internal.safeparcel.SafeParcelWriter;
|
|
import java.lang.annotation.Retention;
|
|
import java.lang.annotation.RetentionPolicy;
|
|
|
|
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
|
/* JADX INFO: loaded from: classes2.dex */
|
|
public class ModuleInstallStatusUpdate extends AbstractSafeParcelable {
|
|
public static final Parcelable.Creator<ModuleInstallStatusUpdate> CREATOR = new zae();
|
|
private final int zaa;
|
|
private final int zab;
|
|
private final Long zac;
|
|
private final Long zad;
|
|
private final int zae;
|
|
private final ProgressInfo zaf;
|
|
|
|
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
|
@Retention(RetentionPolicy.CLASS)
|
|
public @interface InstallState {
|
|
public static final int STATE_CANCELED = 3;
|
|
public static final int STATE_COMPLETED = 4;
|
|
public static final int STATE_DOWNLOADING = 2;
|
|
public static final int STATE_DOWNLOAD_PAUSED = 7;
|
|
public static final int STATE_FAILED = 5;
|
|
public static final int STATE_INSTALLING = 6;
|
|
public static final int STATE_PENDING = 1;
|
|
public static final int STATE_UNKNOWN = 0;
|
|
}
|
|
|
|
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
|
public static class ProgressInfo {
|
|
private final long zaa;
|
|
private final long zab;
|
|
|
|
ProgressInfo(long j, long j2) {
|
|
Preconditions.checkNotZero(j2);
|
|
this.zaa = j;
|
|
this.zab = j2;
|
|
}
|
|
|
|
public long getBytesDownloaded() {
|
|
return this.zaa;
|
|
}
|
|
|
|
public long getTotalBytesToDownload() {
|
|
return this.zab;
|
|
}
|
|
}
|
|
|
|
public ModuleInstallStatusUpdate(int i, int i2, Long l, Long l2, int i3) {
|
|
this.zaa = i;
|
|
this.zab = i2;
|
|
this.zac = l;
|
|
this.zad = l2;
|
|
this.zae = i3;
|
|
this.zaf = (l == null || l2 == null || l2.longValue() == 0) ? null : new ProgressInfo(l.longValue(), l2.longValue());
|
|
}
|
|
|
|
public int getErrorCode() {
|
|
return this.zae;
|
|
}
|
|
|
|
public int getInstallState() {
|
|
return this.zab;
|
|
}
|
|
|
|
public ProgressInfo getProgressInfo() {
|
|
return this.zaf;
|
|
}
|
|
|
|
public int getSessionId() {
|
|
return this.zaa;
|
|
}
|
|
|
|
@Override // android.os.Parcelable
|
|
public void writeToParcel(Parcel parcel, int i) {
|
|
int iBeginObjectHeader = SafeParcelWriter.beginObjectHeader(parcel);
|
|
SafeParcelWriter.writeInt(parcel, 1, getSessionId());
|
|
SafeParcelWriter.writeInt(parcel, 2, getInstallState());
|
|
SafeParcelWriter.writeLongObject(parcel, 3, this.zac, false);
|
|
SafeParcelWriter.writeLongObject(parcel, 4, this.zad, false);
|
|
SafeParcelWriter.writeInt(parcel, 5, getErrorCode());
|
|
SafeParcelWriter.finishObjectHeader(parcel, iBeginObjectHeader);
|
|
}
|
|
} |