X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=altosdroid%2Fsrc%2Forg%2Faltusmetrum%2FAltosDroid%2FTabMapOffline.java;h=ceabe7b447d58ce7cc9582ee4e999cfed063c482;hp=42d80ad52c4e392437519f101c89475e49741113;hb=2509b664df6a13e6ae9e6753dc9fa0d696a4f6c7;hpb=bca342577740a9d04b8419ecadcff582e77f1e61 diff --git a/altosdroid/src/org/altusmetrum/AltosDroid/TabMapOffline.java b/altosdroid/src/org/altusmetrum/AltosDroid/TabMapOffline.java index 42d80ad5..ceabe7b4 100644 --- a/altosdroid/src/org/altusmetrum/AltosDroid/TabMapOffline.java +++ b/altosdroid/src/org/altusmetrum/AltosDroid/TabMapOffline.java @@ -31,12 +31,8 @@ import android.view.*; import android.widget.*; import android.location.Location; import android.content.*; -import android.util.Log; public class TabMapOffline extends AltosDroidTab implements AltosMapInterface { - // Debugging - static final String TAG = "AltosDroid"; - static final boolean D = true; AltosDroid mAltosDroid; @@ -75,7 +71,7 @@ public class TabMapOffline extends AltosDroidTab implements AltosMapInterface { public boolean onScale(ScaleGestureDetector detector) { float f = detector.getScaleFactor(); - if (D) Log.d(TAG, String.format("onScale %f\n", f)); + AltosDebug.debug("onScale %f\n", f); if (f <= 0.8) { map.set_zoom(map.get_zoom() - 1); return true; @@ -88,12 +84,12 @@ public class TabMapOffline extends AltosDroidTab implements AltosMapInterface { } public boolean onScaleBegin(ScaleGestureDetector detector) { - if (D) Log.d(TAG, String.format("onScaleBegin %f\n", detector.getScaleFactor())); + AltosDebug.debug("onScaleBegin %f\n", detector.getScaleFactor()); return true; } public void onScaleEnd(ScaleGestureDetector detector) { - if (D) Log.d(TAG, String.format("onScaleEnd %f\n", detector.getScaleFactor())); + AltosDebug.debug("onScaleEnd %f\n", detector.getScaleFactor()); } @Override @@ -105,19 +101,19 @@ public class TabMapOffline extends AltosDroidTab implements AltosMapInterface { } if (scaling) { - if(D) Log.d(TAG, "scale in progress\n"); + if(AltosDebug.D) AltosDebug.debug("scale in progress\n"); if (event.getAction() == MotionEvent.ACTION_UP) { - if (D) Log.d(TAG, "scale finished\n"); + AltosDebug.debug("scale finished\n"); scaling = false; } return true; } if (event.getAction() == MotionEvent.ACTION_DOWN) { - if(D) Log.d(TAG, String.format("down event %g %g\n", event.getX(), event.getY())); + AltosDebug.debug("down event %g %g\n", event.getX(), event.getY()); map.touch_start((int) event.getX(), (int) event.getY(), true); } else if (event.getAction() == MotionEvent.ACTION_MOVE) { - if(D) Log.d(TAG, String.format("continue event %g %g\n", event.getX(), event.getY())); + AltosDebug.debug("continue event %g %g\n", event.getX(), event.getY()); map.touch_continue((int) event.getX(), (int) event.getY(), true); } return true;