From c767f656836dc843d426e56fe33ad7645b5f4969 Mon Sep 17 00:00:00 2001 From: r-ca Date: Thu, 14 Dec 2023 03:18:51 +0900 Subject: [PATCH] =?UTF-8?q?utils:=20=E3=82=A2=E3=83=97=E3=83=AA=E3=81=AEEx?= =?UTF-8?q?ternalStorage=E3=81=AE=E3=83=91=E3=82=B9=E3=82=92=E5=8F=96?= =?UTF-8?q?=E5=BE=97=E3=81=A7=E3=81=8D=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB?= =?UTF-8?q?=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../one/nem/lacerta/utils/impl/DeviceInfoUtilsImpl.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/utils/src/main/java/one/nem/lacerta/utils/impl/DeviceInfoUtilsImpl.java b/utils/src/main/java/one/nem/lacerta/utils/impl/DeviceInfoUtilsImpl.java index 49c8db67..9c79fbb3 100644 --- a/utils/src/main/java/one/nem/lacerta/utils/impl/DeviceInfoUtilsImpl.java +++ b/utils/src/main/java/one/nem/lacerta/utils/impl/DeviceInfoUtilsImpl.java @@ -3,6 +3,7 @@ package one.nem.lacerta.utils.impl; import android.content.Context; import java.nio.file.Path; +import java.util.Objects; import javax.inject.Inject; @@ -19,17 +20,19 @@ public class DeviceInfoUtilsImpl implements DeviceInfoUtils { @Override public Path getExternalStorageDirectory() { - return + // TODO-rca: 結果がnullだった場合の処理を追加する? + return Objects.requireNonNull(applicationContext.getExternalFilesDir(null)).toPath(); } @Override public Path getExternalStorageDirectory(String type) { - return null; + // TODO-rca: 結果がnullだった場合の処理を追加する? + return Objects.requireNonNull(applicationContext.getExternalFilesDir(type)).toPath(); } @Override public boolean hasPermission(String permission) { - return false; + return null } @Override