From e19ee4d623e047d84b03c9616e3ea17c82c0e518 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 15:48:06 +0900 Subject: [PATCH] =?UTF-8?q?=E6=95=B4=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/com/example/childguard/TestService.java | 7 ------- 1 file changed, 7 deletions(-) diff --git a/app/src/main/java/com/example/childguard/TestService.java b/app/src/main/java/com/example/childguard/TestService.java index 1a66e62..0b4817f 100644 --- a/app/src/main/java/com/example/childguard/TestService.java +++ b/app/src/main/java/com/example/childguard/TestService.java @@ -236,13 +236,8 @@ public class TestService extends Service { } private final BroadcastReceiver receiver = new BroadcastReceiver() { - - - //PreferenceManager.getDefaultSharedPreferences("myPreferences",Context.MODE_PRIVATE); - @Override public void onReceive(Context context, Intent intent) { - // 処理対象か確認 ---------------------------------------- BluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE); if (device == null) { @@ -264,7 +259,6 @@ public class TestService extends Service { return; } // ----------------------------------------------------- - String action = intent.getAction(); // may need to chain this to a recognizing function boolean isInCar = getSharedPreferences("Bluetooth_situation", MODE_PRIVATE).getBoolean("isInCarPref", false); if (BluetoothDevice.ACTION_ACL_DISCONNECTED.equals(action) && !isInCar) { @@ -273,7 +267,6 @@ public class TestService extends Service { // 5分経過した時点でも車に乗っていない場合 Notification(context, BLUETOOTH_NOTIFICATION); }; - handler.postDelayed(notificationRunnable, 5 * 60 * 1000); // 5分をミリ秒に変換 } else if (BluetoothDevice.ACTION_ACL_CONNECTED.equals(action)) { // 再接続された場合、通知をキャンセルする