diff --git a/utils/src/main/java/one/nem/lacerta/utils/impl/SharedPrefUtilsImpl.java b/utils/src/main/java/one/nem/lacerta/utils/impl/SharedPrefUtilsImpl.java index f976b46b..14f493a5 100644 --- a/utils/src/main/java/one/nem/lacerta/utils/impl/SharedPrefUtilsImpl.java +++ b/utils/src/main/java/one/nem/lacerta/utils/impl/SharedPrefUtilsImpl.java @@ -26,4 +26,14 @@ public class SharedPrefUtilsImpl implements SharedPrefUtils{ // Editorの取得 return applicationContext.getSharedPreferences(name, Context.MODE_PRIVATE).edit(); } + + @Override + public SharedPreferences getSharedPreferences(String name) { + return applicationContext.getSharedPreferences(name, Context.MODE_PRIVATE); + } + + @Override + public SharedPreferences getSharedPreferences() { + return applicationContext.getSharedPreferences("common", Context.MODE_PRIVATE); // TODO-rca: 決め打ちやめる? + } } diff --git a/utils/src/main/java/one/nem/lacerta/utils/repository/SharedPrefUtils.java b/utils/src/main/java/one/nem/lacerta/utils/repository/SharedPrefUtils.java index 68d21ae7..0be1859b 100644 --- a/utils/src/main/java/one/nem/lacerta/utils/repository/SharedPrefUtils.java +++ b/utils/src/main/java/one/nem/lacerta/utils/repository/SharedPrefUtils.java @@ -10,4 +10,8 @@ public interface SharedPrefUtils { // TODO-rca: 名称をenumで管理する? SharedPreferences.Editor getEditor(String name); + SharedPreferences getSharedPreferences(String name); + + SharedPreferences getSharedPreferences(); + }