diff --git a/data/src/main/java/one/nem/lacerta/source/db/impl/placeholder b/data/src/main/java/one/nem/lacerta/source/db/impl/placeholder deleted file mode 100644 index e69de29b..00000000 diff --git a/data/src/main/java/one/nem/lacerta/source/db/model/placeholder b/data/src/main/java/one/nem/lacerta/source/db/model/placeholder deleted file mode 100644 index e69de29b..00000000 diff --git a/data/src/main/java/one/nem/lacerta/source/db/module/placeholder b/data/src/main/java/one/nem/lacerta/source/db/module/placeholder deleted file mode 100644 index e69de29b..00000000 diff --git a/data/src/main/java/one/nem/lacerta/source/db/repository/placeholder b/data/src/main/java/one/nem/lacerta/source/db/repository/placeholder deleted file mode 100644 index e69de29b..00000000 diff --git a/data/src/main/java/one/nem/lacerta/source/pref/impl/CommonImpl.java b/data/src/main/java/one/nem/lacerta/source/pref/impl/CommonImpl.java deleted file mode 100644 index 49cd07d0..00000000 --- a/data/src/main/java/one/nem/lacerta/source/pref/impl/CommonImpl.java +++ /dev/null @@ -1,60 +0,0 @@ -package one.nem.lacerta.source.pref.impl; - -import android.content.Context; -import android.content.SharedPreferences; - -import androidx.appcompat.app.AppCompatActivity; - -import java.util.ArrayList; -import java.util.List; -import java.util.stream.Collectors; - -import javax.inject.Inject; - -import dagger.hilt.android.AndroidEntryPoint; -import dagger.hilt.android.qualifiers.ApplicationContext; - -import one.nem.lacerta.source.pref.repository.Common; - -public class CommonImpl implements Common { - - Context applicationContext; - - @Inject - public CommonImpl(@ApplicationContext Context applicationContext) { - this.applicationContext = applicationContext; - } - - public String getStringValue(String key) { - SharedPreferences pref = applicationContext.getSharedPreferences("common", Context.MODE_PRIVATE); - return pref.getString(key, ""); - } - - public void setStringValue(String key, String value) { - SharedPreferences pref = applicationContext.getSharedPreferences("common", Context.MODE_PRIVATE); - SharedPreferences.Editor editor = pref.edit(); - editor.putString(key, value); - editor.apply(); - } - - public boolean isExist(String key) { - SharedPreferences pref = applicationContext.getSharedPreferences("common", Context.MODE_PRIVATE); - return pref.contains(key); - } - - public void remove(String key) { - SharedPreferences pref = applicationContext.getSharedPreferences("common", Context.MODE_PRIVATE); - SharedPreferences.Editor editor = pref.edit(); - editor.remove(key); - editor.apply(); - } - - public ArrayList getExistKeys() { - SharedPreferences pref = applicationContext.getSharedPreferences("common", Context.MODE_PRIVATE); - // キーだけをArrayListに切り出す - return new ArrayList<>(pref.getAll().keySet()); - } - - - -} diff --git a/data/src/main/java/one/nem/lacerta/source/pref/impl/placeholder b/data/src/main/java/one/nem/lacerta/source/pref/impl/placeholder deleted file mode 100644 index e69de29b..00000000 diff --git a/data/src/main/java/one/nem/lacerta/source/pref/model/placeholder b/data/src/main/java/one/nem/lacerta/source/pref/model/placeholder deleted file mode 100644 index e69de29b..00000000 diff --git a/data/src/main/java/one/nem/lacerta/source/pref/module/CommonModule.java b/data/src/main/java/one/nem/lacerta/source/pref/module/CommonModule.java deleted file mode 100644 index 1e5a8579..00000000 --- a/data/src/main/java/one/nem/lacerta/source/pref/module/CommonModule.java +++ /dev/null @@ -1,16 +0,0 @@ -package one.nem.lacerta.source.pref.module; - -import dagger.Binds; -import dagger.Module; -import dagger.hilt.InstallIn; -import dagger.hilt.components.SingletonComponent; -import one.nem.lacerta.source.pref.impl.CommonImpl; -import one.nem.lacerta.source.pref.repository.Common; - -@Module -@InstallIn(SingletonComponent.class) -abstract public class CommonModule { - - @Binds - public abstract Common bindCommon(CommonImpl commonImpl); -} diff --git a/data/src/main/java/one/nem/lacerta/source/pref/module/placeholder b/data/src/main/java/one/nem/lacerta/source/pref/module/placeholder deleted file mode 100644 index e69de29b..00000000 diff --git a/data/src/main/java/one/nem/lacerta/source/pref/repository/Common.java b/data/src/main/java/one/nem/lacerta/source/pref/repository/Common.java deleted file mode 100644 index dec372d0..00000000 --- a/data/src/main/java/one/nem/lacerta/source/pref/repository/Common.java +++ /dev/null @@ -1,18 +0,0 @@ -package one.nem.lacerta.source.pref.repository; - -import java.util.ArrayList; -import java.util.List; - -public interface Common { - // さまざまな用途で使うPref - - String getStringValue(String key); - - void setStringValue(String key, String value); - - boolean isExist(String key); - - void remove(String key); - - ArrayList getExistKeys(); -} diff --git a/data/src/main/java/one/nem/lacerta/source/pref/repository/placeholder b/data/src/main/java/one/nem/lacerta/source/pref/repository/placeholder deleted file mode 100644 index e69de29b..00000000