mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-23 00:13:16 +00:00
Internal Utilsを通してデータを返すように
This commit is contained in:
parent
729600917c
commit
1682e06d24
|
@ -10,22 +10,19 @@ import javax.inject.Inject;
|
||||||
import dagger.hilt.android.qualifiers.ApplicationContext;
|
import dagger.hilt.android.qualifiers.ApplicationContext;
|
||||||
import one.nem.lacerta.data.repository.Commons;
|
import one.nem.lacerta.data.repository.Commons;
|
||||||
|
|
||||||
|
import one.nem.lacerta.data.utils.UtilsRepo; // Internal Utils Repo
|
||||||
|
|
||||||
public class CommonsImpl implements Commons{
|
public class CommonsImpl implements Commons{
|
||||||
|
|
||||||
private final Context applicationContext;
|
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
public CommonsImpl(@ApplicationContext Context applicationContext) {
|
UtilsRepo utilsRepo;
|
||||||
this.applicationContext = applicationContext;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public Path getExternalFilesDirPath(String type) {
|
public Path getExternalFilesDirPath(String type) {
|
||||||
return Objects.requireNonNull(applicationContext.getExternalFilesDir(type)).toPath();
|
return utilsRepo.getExternalFilesDirPath(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Path getExternalFilesDirPath() {
|
public Path getExternalFilesDirPath() {
|
||||||
return Objects.requireNonNull(applicationContext.getExternalFilesDir(null)).toPath();
|
return utilsRepo.getExternalFilesDirPath();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user