Files
rr3-apk/decompiled-community/sources/androidx/core/os/BundleKt.java
Daniel Elliott c080f0d97f Add Discord community version (64-bit only)
- Added realracing3-community.apk (71.57 MB)
- Removed 32-bit support (armeabi-v7a)
- Only includes arm64-v8a libraries
- Decompiled source code included
- Added README-community.md with analysis
2026-02-18 15:48:36 -08:00

95 lines
5.1 KiB
Java

package androidx.core.os;
import android.os.Bundle;
import android.os.IBinder;
import android.os.Parcelable;
import android.util.Size;
import android.util.SizeF;
import java.io.Serializable;
import kotlin.Pair;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes.dex */
public final class BundleKt {
public static final Bundle bundleOf(Pair... pairArr) {
Bundle bundle = new Bundle(pairArr.length);
for (Pair pair : pairArr) {
String str = (String) pair.component1();
Object component2 = pair.component2();
if (component2 == null) {
bundle.putString(str, null);
} else if (component2 instanceof Boolean) {
bundle.putBoolean(str, ((Boolean) component2).booleanValue());
} else if (component2 instanceof Byte) {
bundle.putByte(str, ((Number) component2).byteValue());
} else if (component2 instanceof Character) {
bundle.putChar(str, ((Character) component2).charValue());
} else if (component2 instanceof Double) {
bundle.putDouble(str, ((Number) component2).doubleValue());
} else if (component2 instanceof Float) {
bundle.putFloat(str, ((Number) component2).floatValue());
} else if (component2 instanceof Integer) {
bundle.putInt(str, ((Number) component2).intValue());
} else if (component2 instanceof Long) {
bundle.putLong(str, ((Number) component2).longValue());
} else if (component2 instanceof Short) {
bundle.putShort(str, ((Number) component2).shortValue());
} else if (component2 instanceof Bundle) {
bundle.putBundle(str, (Bundle) component2);
} else if (component2 instanceof CharSequence) {
bundle.putCharSequence(str, (CharSequence) component2);
} else if (component2 instanceof Parcelable) {
bundle.putParcelable(str, (Parcelable) component2);
} else if (component2 instanceof boolean[]) {
bundle.putBooleanArray(str, (boolean[]) component2);
} else if (component2 instanceof byte[]) {
bundle.putByteArray(str, (byte[]) component2);
} else if (component2 instanceof char[]) {
bundle.putCharArray(str, (char[]) component2);
} else if (component2 instanceof double[]) {
bundle.putDoubleArray(str, (double[]) component2);
} else if (component2 instanceof float[]) {
bundle.putFloatArray(str, (float[]) component2);
} else if (component2 instanceof int[]) {
bundle.putIntArray(str, (int[]) component2);
} else if (component2 instanceof long[]) {
bundle.putLongArray(str, (long[]) component2);
} else if (component2 instanceof short[]) {
bundle.putShortArray(str, (short[]) component2);
} else if (component2 instanceof Object[]) {
Class<?> componentType = component2.getClass().getComponentType();
Intrinsics.checkNotNull(componentType);
if (Parcelable.class.isAssignableFrom(componentType)) {
Intrinsics.checkNotNull(component2, "null cannot be cast to non-null type kotlin.Array<android.os.Parcelable>");
bundle.putParcelableArray(str, (Parcelable[]) component2);
} else if (String.class.isAssignableFrom(componentType)) {
Intrinsics.checkNotNull(component2, "null cannot be cast to non-null type kotlin.Array<kotlin.String>");
bundle.putStringArray(str, (String[]) component2);
} else if (CharSequence.class.isAssignableFrom(componentType)) {
Intrinsics.checkNotNull(component2, "null cannot be cast to non-null type kotlin.Array<kotlin.CharSequence>");
bundle.putCharSequenceArray(str, (CharSequence[]) component2);
} else if (Serializable.class.isAssignableFrom(componentType)) {
bundle.putSerializable(str, (Serializable) component2);
} else {
throw new IllegalArgumentException("Illegal value array type " + componentType.getCanonicalName() + " for key \"" + str + '\"');
}
} else if (component2 instanceof Serializable) {
bundle.putSerializable(str, (Serializable) component2);
} else if (component2 instanceof IBinder) {
bundle.putBinder(str, (IBinder) component2);
} else if (component2 instanceof Size) {
BundleApi21ImplKt.putSize(bundle, str, (Size) component2);
} else if (component2 instanceof SizeF) {
BundleApi21ImplKt.putSizeF(bundle, str, (SizeF) component2);
} else {
throw new IllegalArgumentException("Illegal value type " + component2.getClass().getCanonicalName() + " for key \"" + str + '\"');
}
}
return bundle;
}
public static final Bundle bundleOf() {
return new Bundle(0);
}
}