X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=altosdroid%2Fsrc%2Forg%2Faltusmetrum%2FAltosDroid%2FTelemetryLogger.java;h=79020c16f4859083bbe6c1564d2caee87e7b4cf7;hp=4d793413a8983e3403775b1e6217d03b034c0435;hb=87c8bb3956897830da1f7aaca2990a9571767b73;hpb=5b976a6651f4eb05d30afc08b9e1f27c7e52ae00 diff --git a/altosdroid/src/org/altusmetrum/AltosDroid/TelemetryLogger.java b/altosdroid/src/org/altusmetrum/AltosDroid/TelemetryLogger.java index 4d793413..79020c16 100644 --- a/altosdroid/src/org/altusmetrum/AltosDroid/TelemetryLogger.java +++ b/altosdroid/src/org/altusmetrum/AltosDroid/TelemetryLogger.java @@ -1,18 +1,14 @@ package org.altusmetrum.AltosDroid; -import org.altusmetrum.altoslib_2.*; +import org.altusmetrum.altoslib_8.*; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.os.Environment; -import android.util.Log; public class TelemetryLogger { - private static final String TAG = "TelemetryLogger"; - private static final boolean D = true; - private Context context = null; private AltosLink link = null; private AltosLog logger = null; @@ -33,21 +29,21 @@ public class TelemetryLogger { private void close() { if (logger != null) { - if (D) Log.d(TAG, "Shutting down Telemetry Logging"); + AltosDebug.debug("Shutting down Telemetry Logging"); logger.close(); logger = null; } } - + void handleExternalStorageState() { String state = Environment.getExternalStorageState(); if (Environment.MEDIA_MOUNTED.equals(state)) { if (logger == null) { - if (D) Log.d(TAG, "Starting up Telemetry Logging"); + AltosDebug.debug("Starting up Telemetry Logging"); logger = new AltosLog(link); } } else { - if (D) Log.d(TAG, "External Storage not present - stopping"); + AltosDebug.debug("External Storage not present - stopping"); close(); } }