mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-22 16:03:15 +00:00
Impl実装
This commit is contained in:
parent
922168c86b
commit
960f159a31
|
@ -1,17 +1,29 @@
|
|||
package one.nem.lacerta.utils.impl;
|
||||
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
|
||||
import dagger.hilt.android.qualifiers.ApplicationContext;
|
||||
import one.nem.lacerta.utils.repository.SharedPrefUtils;
|
||||
|
||||
public class SharedPrefUtilsImpl implements SharedPrefUtils{
|
||||
|
||||
private final Context applicationContext;
|
||||
|
||||
public SharedPrefUtilsImpl(@ApplicationContext Context applicationContext) {
|
||||
this.applicationContext = applicationContext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SharedPreferences.Editor getEditor() {
|
||||
return null;
|
||||
// Editorの取得
|
||||
return applicationContext.getSharedPreferences("common", Context.MODE_PRIVATE).edit(); // TODO-rca: 決め打ちやめる?
|
||||
}
|
||||
|
||||
@Override
|
||||
public SharedPreferences.Editor getEditor(String name) {
|
||||
return null;
|
||||
// Editorの取得
|
||||
return applicationContext.getSharedPreferences(name, Context.MODE_PRIVATE).edit();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user