Internal Utilsを通してデータを返すように

This commit is contained in:
ろむねこ 2023-12-12 10:47:13 +09:00
parent 729600917c
commit 1682e06d24
No known key found for this signature in database
GPG Key ID: FA1F39A1BA37D168

View File

@ -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();
} }
} }