mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-26 17:53:14 +00:00
utils: アプリのExternalStorageのパスを取得できるようにした
This commit is contained in:
parent
2155edd15f
commit
c767f65683
|
@ -3,6 +3,7 @@ package one.nem.lacerta.utils.impl;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
|
@ -19,17 +20,19 @@ public class DeviceInfoUtilsImpl implements DeviceInfoUtils {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Path getExternalStorageDirectory() {
|
public Path getExternalStorageDirectory() {
|
||||||
return
|
// TODO-rca: 結果がnullだった場合の処理を追加する?
|
||||||
|
return Objects.requireNonNull(applicationContext.getExternalFilesDir(null)).toPath();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Path getExternalStorageDirectory(String type) {
|
public Path getExternalStorageDirectory(String type) {
|
||||||
return null;
|
// TODO-rca: 結果がnullだった場合の処理を追加する?
|
||||||
|
return Objects.requireNonNull(applicationContext.getExternalFilesDir(type)).toPath();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean hasPermission(String permission) {
|
public boolean hasPermission(String permission) {
|
||||||
return false;
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue
Block a user