Messaging: Use StandardCharsets where possible

Change-Id: I45a19c47262116d34260e1957145580a7f97168e
This commit is contained in:
Michael W
2024-12-15 16:20:55 +01:00
parent a2f67b4f7b
commit fd63d5f125
12 changed files with 33 additions and 61 deletions

View File

@@ -51,14 +51,14 @@ import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.util.Arrays;
public class ImageUtils {
private static final String TAG = LogUtil.BUGLE_TAG;
private static final int MAX_OOM_COUNT = 1;
private static final byte[] GIF87_HEADER = "GIF87a".getBytes(Charset.forName("US-ASCII"));
private static final byte[] GIF89_HEADER = "GIF89a".getBytes(Charset.forName("US-ASCII"));
private static final byte[] GIF87_HEADER = "GIF87a".getBytes(StandardCharsets.US_ASCII);
private static final byte[] GIF89_HEADER = "GIF89a".getBytes(StandardCharsets.US_ASCII);
// Used for drawBitmapWithCircleOnCanvas.
// Default color is transparent for both circle background and stroke.