utils: アプリのコンテキストを取得するようにした

This commit is contained in:
r-ca 2023-12-14 03:16:38 +09:00
parent 6f3639702a
commit 2b97ecf1fd
No known key found for this signature in database
GPG Key ID: 6A72911AC73464A9

View File

@ -1,10 +1,18 @@
package one.nem.lacerta.utils.impl; package one.nem.lacerta.utils.impl;
import android.content.Context;
import java.nio.file.Path; import java.nio.file.Path;
import dagger.hilt.android.qualifiers.ApplicationContext;
import one.nem.lacerta.utils.repository.DeviceInfoUtils; import one.nem.lacerta.utils.repository.DeviceInfoUtils;
public class DeviceInfoUtilsImpl implements DeviceInfoUtils { public class DeviceInfoUtilsImpl implements DeviceInfoUtils {
private final Context applicationContext;
public DeviceInfoUtilsImpl(@ApplicationContext Context applicationContext) {
this.applicationContext = applicationContext;
}
@Override @Override
public Path getExternalStorageDirectory() { public Path getExternalStorageDirectory() {