From 1fa625e9487f072b46bc5394f21cc3dca36bdd16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Mon, 11 Dec 2023 11:53:56 +0900 Subject: [PATCH] =?UTF-8?q?Context=E3=81=AE=E5=8F=96=E5=BE=97=E6=96=B9?= =?UTF-8?q?=E6=B3=95=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/one/nem/lacerta/source/pref/impl/CommonImpl.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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 index ffcdaf52..49cd07d0 100644 --- 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 @@ -16,13 +16,15 @@ import dagger.hilt.android.qualifiers.ApplicationContext; import one.nem.lacerta.source.pref.repository.Common; -@AndroidEntryPoint public class CommonImpl implements Common { - @ApplicationContext - @Inject 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, "");