Add decompiled APK source code (JADX)

- 28,932 files
- Full Java source code
- Smali files
- Resources

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-02-18 14:52:23 -08:00
parent cc210a65ea
commit f9d20bb3fc
26991 changed files with 2541449 additions and 0 deletions

View File

@@ -0,0 +1,123 @@
package com.google.firebase.encoders.json;
import com.google.firebase.encoders.DataEncoder;
import com.google.firebase.encoders.EncodingException;
import com.google.firebase.encoders.ObjectEncoder;
import com.google.firebase.encoders.ObjectEncoderContext;
import com.google.firebase.encoders.ValueEncoder;
import com.google.firebase.encoders.ValueEncoderContext;
import com.google.firebase.encoders.config.Configurator;
import com.google.firebase.encoders.config.EncoderConfig;
import java.io.IOException;
import java.io.StringWriter;
import java.io.Writer;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
import java.util.TimeZone;
/* loaded from: classes3.dex */
public final class JsonDataEncoderBuilder implements EncoderConfig {
public static final ObjectEncoder DEFAULT_FALLBACK_ENCODER = new ObjectEncoder() { // from class: com.google.firebase.encoders.json.JsonDataEncoderBuilder$$ExternalSyntheticLambda0
@Override // com.google.firebase.encoders.ObjectEncoder
public final void encode(Object obj, Object obj2) {
JsonDataEncoderBuilder.lambda$static$0(obj, (ObjectEncoderContext) obj2);
}
};
public static final ValueEncoder STRING_ENCODER = new ValueEncoder() { // from class: com.google.firebase.encoders.json.JsonDataEncoderBuilder$$ExternalSyntheticLambda1
@Override // com.google.firebase.encoders.ValueEncoder
public final void encode(Object obj, Object obj2) {
((ValueEncoderContext) obj2).add((String) obj);
}
};
public static final ValueEncoder BOOLEAN_ENCODER = new ValueEncoder() { // from class: com.google.firebase.encoders.json.JsonDataEncoderBuilder$$ExternalSyntheticLambda2
@Override // com.google.firebase.encoders.ValueEncoder
public final void encode(Object obj, Object obj2) {
JsonDataEncoderBuilder.lambda$static$2((Boolean) obj, (ValueEncoderContext) obj2);
}
};
public static final TimestampEncoder TIMESTAMP_ENCODER = new TimestampEncoder();
public final Map objectEncoders = new HashMap();
public final Map valueEncoders = new HashMap();
public ObjectEncoder fallbackEncoder = DEFAULT_FALLBACK_ENCODER;
public boolean ignoreNullValues = false;
public JsonDataEncoderBuilder ignoreNullValues(boolean z) {
this.ignoreNullValues = z;
return this;
}
public static /* synthetic */ void lambda$static$0(Object obj, ObjectEncoderContext objectEncoderContext) {
throw new EncodingException("Couldn't find encoder for type " + obj.getClass().getCanonicalName());
}
public static final class TimestampEncoder implements ValueEncoder {
public static final DateFormat rfc339;
public TimestampEncoder() {
}
static {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'", Locale.US);
rfc339 = simpleDateFormat;
simpleDateFormat.setTimeZone(TimeZone.getTimeZone("UTC"));
}
@Override // com.google.firebase.encoders.ValueEncoder
public void encode(Date date, ValueEncoderContext valueEncoderContext) {
valueEncoderContext.add(rfc339.format(date));
}
}
public static /* synthetic */ void lambda$static$2(Boolean bool, ValueEncoderContext valueEncoderContext) {
valueEncoderContext.add(bool.booleanValue());
}
public JsonDataEncoderBuilder() {
registerEncoder(String.class, STRING_ENCODER);
registerEncoder(Boolean.class, BOOLEAN_ENCODER);
registerEncoder(Date.class, TIMESTAMP_ENCODER);
}
@Override // com.google.firebase.encoders.config.EncoderConfig
public JsonDataEncoderBuilder registerEncoder(Class cls, ObjectEncoder objectEncoder) {
this.objectEncoders.put(cls, objectEncoder);
this.valueEncoders.remove(cls);
return this;
}
public JsonDataEncoderBuilder registerEncoder(Class cls, ValueEncoder valueEncoder) {
this.valueEncoders.put(cls, valueEncoder);
this.objectEncoders.remove(cls);
return this;
}
public JsonDataEncoderBuilder configureWith(Configurator configurator) {
configurator.configure(this);
return this;
}
public DataEncoder build() {
return new DataEncoder() { // from class: com.google.firebase.encoders.json.JsonDataEncoderBuilder.1
@Override // com.google.firebase.encoders.DataEncoder
public void encode(Object obj, Writer writer) {
JsonValueObjectEncoderContext jsonValueObjectEncoderContext = new JsonValueObjectEncoderContext(writer, JsonDataEncoderBuilder.this.objectEncoders, JsonDataEncoderBuilder.this.valueEncoders, JsonDataEncoderBuilder.this.fallbackEncoder, JsonDataEncoderBuilder.this.ignoreNullValues);
jsonValueObjectEncoderContext.add(obj, false);
jsonValueObjectEncoderContext.close();
}
@Override // com.google.firebase.encoders.DataEncoder
public String encode(Object obj) {
StringWriter stringWriter = new StringWriter();
try {
encode(obj, stringWriter);
} catch (IOException unused) {
}
return stringWriter.toString();
}
};
}
}

View File

@@ -0,0 +1,285 @@
package com.google.firebase.encoders.json;
import android.util.Base64;
import android.util.JsonWriter;
import com.google.firebase.encoders.EncodingException;
import com.google.firebase.encoders.FieldDescriptor;
import com.google.firebase.encoders.ObjectEncoder;
import com.google.firebase.encoders.ObjectEncoderContext;
import com.google.firebase.encoders.ValueEncoder;
import com.google.firebase.encoders.ValueEncoderContext;
import java.io.Writer;
import java.util.Collection;
import java.util.Date;
import java.util.Iterator;
import java.util.Map;
/* loaded from: classes3.dex */
public final class JsonValueObjectEncoderContext implements ObjectEncoderContext, ValueEncoderContext {
public final ObjectEncoder fallbackEncoder;
public final boolean ignoreNullValues;
public final JsonWriter jsonWriter;
public final Map objectEncoders;
public final Map valueEncoders;
public JsonValueObjectEncoderContext childContext = null;
public boolean active = true;
public JsonValueObjectEncoderContext(Writer writer, Map map, Map map2, ObjectEncoder objectEncoder, boolean z) {
this.jsonWriter = new JsonWriter(writer);
this.objectEncoders = map;
this.valueEncoders = map2;
this.fallbackEncoder = objectEncoder;
this.ignoreNullValues = z;
}
public JsonValueObjectEncoderContext add(String str, Object obj) {
if (this.ignoreNullValues) {
return internalAddIgnoreNullValues(str, obj);
}
return internalAdd(str, obj);
}
public JsonValueObjectEncoderContext add(String str, double d) {
maybeUnNest();
this.jsonWriter.name(str);
return add(d);
}
public JsonValueObjectEncoderContext add(String str, int i) {
maybeUnNest();
this.jsonWriter.name(str);
return add(i);
}
public JsonValueObjectEncoderContext add(String str, long j) {
maybeUnNest();
this.jsonWriter.name(str);
return add(j);
}
public JsonValueObjectEncoderContext add(String str, boolean z) {
maybeUnNest();
this.jsonWriter.name(str);
return add(z);
}
@Override // com.google.firebase.encoders.ObjectEncoderContext
public ObjectEncoderContext add(FieldDescriptor fieldDescriptor, Object obj) {
return add(fieldDescriptor.getName(), obj);
}
@Override // com.google.firebase.encoders.ObjectEncoderContext
public ObjectEncoderContext add(FieldDescriptor fieldDescriptor, double d) {
return add(fieldDescriptor.getName(), d);
}
@Override // com.google.firebase.encoders.ObjectEncoderContext
public ObjectEncoderContext add(FieldDescriptor fieldDescriptor, int i) {
return add(fieldDescriptor.getName(), i);
}
@Override // com.google.firebase.encoders.ObjectEncoderContext
public ObjectEncoderContext add(FieldDescriptor fieldDescriptor, long j) {
return add(fieldDescriptor.getName(), j);
}
@Override // com.google.firebase.encoders.ObjectEncoderContext
public ObjectEncoderContext add(FieldDescriptor fieldDescriptor, boolean z) {
return add(fieldDescriptor.getName(), z);
}
@Override // com.google.firebase.encoders.ValueEncoderContext
public JsonValueObjectEncoderContext add(String str) {
maybeUnNest();
this.jsonWriter.value(str);
return this;
}
public JsonValueObjectEncoderContext add(double d) {
maybeUnNest();
this.jsonWriter.value(d);
return this;
}
public JsonValueObjectEncoderContext add(int i) {
maybeUnNest();
this.jsonWriter.value(i);
return this;
}
public JsonValueObjectEncoderContext add(long j) {
maybeUnNest();
this.jsonWriter.value(j);
return this;
}
@Override // com.google.firebase.encoders.ValueEncoderContext
public JsonValueObjectEncoderContext add(boolean z) {
maybeUnNest();
this.jsonWriter.value(z);
return this;
}
public JsonValueObjectEncoderContext add(byte[] bArr) {
maybeUnNest();
if (bArr == null) {
this.jsonWriter.nullValue();
} else {
this.jsonWriter.value(Base64.encodeToString(bArr, 2));
}
return this;
}
public JsonValueObjectEncoderContext add(Object obj, boolean z) {
int i = 0;
if (z && cannotBeInline(obj)) {
Object[] objArr = new Object[1];
objArr[0] = obj == null ? null : obj.getClass();
throw new EncodingException(String.format("%s cannot be encoded inline", objArr));
}
if (obj == null) {
this.jsonWriter.nullValue();
return this;
}
if (obj instanceof Number) {
this.jsonWriter.value((Number) obj);
return this;
}
if (obj.getClass().isArray()) {
if (obj instanceof byte[]) {
return add((byte[]) obj);
}
this.jsonWriter.beginArray();
if (obj instanceof int[]) {
int length = ((int[]) obj).length;
while (i < length) {
this.jsonWriter.value(r6[i]);
i++;
}
} else if (obj instanceof long[]) {
long[] jArr = (long[]) obj;
int length2 = jArr.length;
while (i < length2) {
add(jArr[i]);
i++;
}
} else if (obj instanceof double[]) {
double[] dArr = (double[]) obj;
int length3 = dArr.length;
while (i < length3) {
this.jsonWriter.value(dArr[i]);
i++;
}
} else if (obj instanceof boolean[]) {
boolean[] zArr = (boolean[]) obj;
int length4 = zArr.length;
while (i < length4) {
this.jsonWriter.value(zArr[i]);
i++;
}
} else if (obj instanceof Number[]) {
for (Number number : (Number[]) obj) {
add((Object) number, false);
}
} else {
for (Object obj2 : (Object[]) obj) {
add(obj2, false);
}
}
this.jsonWriter.endArray();
return this;
}
if (obj instanceof Collection) {
this.jsonWriter.beginArray();
Iterator it = ((Collection) obj).iterator();
while (it.hasNext()) {
add(it.next(), false);
}
this.jsonWriter.endArray();
return this;
}
if (obj instanceof Map) {
this.jsonWriter.beginObject();
for (Map.Entry entry : ((Map) obj).entrySet()) {
Object key = entry.getKey();
try {
add((String) key, entry.getValue());
} catch (ClassCastException e) {
throw new EncodingException(String.format("Only String keys are currently supported in maps, got %s of type %s instead.", key, key.getClass()), e);
}
}
this.jsonWriter.endObject();
return this;
}
ObjectEncoder objectEncoder = (ObjectEncoder) this.objectEncoders.get(obj.getClass());
if (objectEncoder != null) {
return doEncode(objectEncoder, obj, z);
}
ValueEncoder valueEncoder = (ValueEncoder) this.valueEncoders.get(obj.getClass());
if (valueEncoder != null) {
valueEncoder.encode(obj, this);
return this;
}
if (obj instanceof Enum) {
if (obj instanceof NumberedEnum) {
add(((NumberedEnum) obj).getNumber());
} else {
add(((Enum) obj).name());
}
return this;
}
return doEncode(this.fallbackEncoder, obj, z);
}
public JsonValueObjectEncoderContext doEncode(ObjectEncoder objectEncoder, Object obj, boolean z) {
if (!z) {
this.jsonWriter.beginObject();
}
objectEncoder.encode(obj, this);
if (!z) {
this.jsonWriter.endObject();
}
return this;
}
public final boolean cannotBeInline(Object obj) {
return obj == null || obj.getClass().isArray() || (obj instanceof Collection) || (obj instanceof Date) || (obj instanceof Enum) || (obj instanceof Number);
}
public void close() {
maybeUnNest();
this.jsonWriter.flush();
}
public final void maybeUnNest() {
if (!this.active) {
throw new IllegalStateException("Parent context used since this context was created. Cannot use this context anymore.");
}
JsonValueObjectEncoderContext jsonValueObjectEncoderContext = this.childContext;
if (jsonValueObjectEncoderContext != null) {
jsonValueObjectEncoderContext.maybeUnNest();
this.childContext.active = false;
this.childContext = null;
this.jsonWriter.endObject();
}
}
public final JsonValueObjectEncoderContext internalAdd(String str, Object obj) {
maybeUnNest();
this.jsonWriter.name(str);
if (obj == null) {
this.jsonWriter.nullValue();
return this;
}
return add(obj, false);
}
public final JsonValueObjectEncoderContext internalAddIgnoreNullValues(String str, Object obj) {
if (obj == null) {
return this;
}
maybeUnNest();
this.jsonWriter.name(str);
return add(obj, false);
}
}

View File

@@ -0,0 +1,6 @@
package com.google.firebase.encoders.json;
/* loaded from: classes3.dex */
public interface NumberedEnum {
int getNumber();
}