From db13cc752d026819811c65f61510d46aa7227cfa Mon Sep 17 00:00:00 2001 From: natsuk4ze Date: Mon, 5 Feb 2024 09:13:34 +0900 Subject: [PATCH] Format --- .../src/main/java/studio/midoridesign/gal/GalPlugin.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/android/src/main/java/studio/midoridesign/gal/GalPlugin.java b/android/src/main/java/studio/midoridesign/gal/GalPlugin.java index 5fa07bdb..9c337ffd 100644 --- a/android/src/main/java/studio/midoridesign/gal/GalPlugin.java +++ b/android/src/main/java/studio/midoridesign/gal/GalPlugin.java @@ -77,7 +77,8 @@ public void onMethodCall(@NonNull MethodCall call, @NonNull Result result) { case "putImageBytes": { new Thread(() -> { try { - putMediaBytes(call.argument("bytes"), call.argument("album"), call.argument("name")); + putMediaBytes(call.argument("bytes"), call.argument("album"), + call.argument("name")); new Handler(Looper.getMainLooper()).post(() -> result.success(null)); } catch (Exception e) { handleError(e, result); @@ -125,7 +126,8 @@ private void putMedia(String path, String album, boolean isImage) } } - private void putMediaBytes(byte[] bytes, String album, String name) throws IOException, SecurityException { + private void putMediaBytes(byte[] bytes, String album, String name) + throws IOException, SecurityException { ImageFormat imageFormat = Imaging.guessFormat(bytes); String extension = "." + imageFormat.getDefaultExtension().toLowerCase(); try (InputStream in = new ByteArrayInputStream(bytes)) {