簡素化

This commit is contained in:
ろむねこ 2024-07-11 15:47:24 +09:00
parent 0a2cabd0af
commit cff730b60a
No known key found for this signature in database
GPG Key ID: FA1F39A1BA37D168

View File

@ -270,12 +270,9 @@ public class TestService extends Service {
boolean isInCar = pref.getBoolean("isInCarPref", false);
if (BluetoothDevice.ACTION_ACL_DISCONNECTED.equals(action) && !isInCar) {
// bluetoothが切断されたときに乗車状態のとき
notificationRunnable = new Runnable() {
@Override
public void run() {
notificationRunnable = () -> {
// 5分経過した時点でも車に乗っていない場合
Notification(context, BLUETOOTH_NOTIFICATION);
}
};
handler.postDelayed(notificationRunnable, 5 * 60 * 1000); // 5分をミリ秒に変換