From 9cdfc6bc70d8fe8f8c6f8170992a574748eda1a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Thu, 11 Jul 2024 16:00:05 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=AA=E3=83=95=E3=82=A1=E3=82=AF=E3=82=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/com/example/childguard/TestService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/example/childguard/TestService.java b/app/src/main/java/com/example/childguard/TestService.java index 2d9f11d..69b1546 100644 --- a/app/src/main/java/com/example/childguard/TestService.java +++ b/app/src/main/java/com/example/childguard/TestService.java @@ -66,7 +66,7 @@ public class TestService extends Service { @Override public int onStartCommand(Intent intent, int flags, int startId) { this.userId = getSharedPreferences("app_situation", MODE_PRIVATE).getString("ID", null); - if (getSharedPreferences("app_situation", MODE_PRIVATE).getString("ID", null) == null) { + if (this.userId == null) { Log.d("onResume", "ID not initialized."); return flags; // IDが初期化されていない場合は何もしない }