Files
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

37 lines
1.2 KiB
Java

package com.google.android.gms.common.util;
import android.database.CharArrayBuffer;
import android.graphics.Bitmap;
import android.text.TextUtils;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.google.android.gms.common.annotation.KeepForSdk;
import java.io.ByteArrayOutputStream;
@KeepForSdk
/* loaded from: classes2.dex */
public final class DataUtils {
@KeepForSdk
public static void copyStringToBuffer(@Nullable String str, @NonNull CharArrayBuffer charArrayBuffer) {
if (TextUtils.isEmpty(str)) {
charArrayBuffer.sizeCopied = 0;
return;
}
char[] cArr = charArrayBuffer.data;
if (cArr == null || cArr.length < str.length()) {
charArrayBuffer.data = str.toCharArray();
} else {
str.getChars(0, str.length(), charArrayBuffer.data, 0);
}
charArrayBuffer.sizeCopied = str.length();
}
@NonNull
@KeepForSdk
public static byte[] loadImageBytes(@NonNull Bitmap bitmap) {
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
bitmap.compress(Bitmap.CompressFormat.JPEG, 100, byteArrayOutputStream);
return byteArrayOutputStream.toByteArray();
}
}