リファクタ

This commit is contained in:
ろむねこ 2024-07-11 16:00:05 +09:00
parent dc7b45436c
commit 9cdfc6bc70
No known key found for this signature in database
GPG Key ID: FA1F39A1BA37D168

View File

@ -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が初期化されていない場合は何もしない
}