X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=altosdroid%2Fsrc%2Forg%2Faltusmetrum%2FAltosDroid%2FTelemetryLogger.java;h=28bab40122cb796a7932fc2e706aee869d78bbe1;hp=9764ab72c2f62f78630d45cb0df0021a8c7e278b;hb=06908e377b7b932bfe3f6dfc840a0a13340f32ce;hpb=4231d68bae69d9a7d1f52205002db452cd5f986d diff --git a/altosdroid/src/org/altusmetrum/AltosDroid/TelemetryLogger.java b/altosdroid/src/org/altusmetrum/AltosDroid/TelemetryLogger.java index 9764ab72..28bab401 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_6.*; +import org.altusmetrum.altoslib_7.*; 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(); } }