diff options
author | Herbert von Broeuschmeul <Herbert.Broeuschmeul@gmail.com> | 2010-11-07 17:50:18 +0100 |
---|---|---|
committer | Herbert von Broeuschmeul <Herbert.Broeuschmeul@gmail.com> | 2010-11-07 17:50:18 +0100 |
commit | e8944d1d6b26492359c03f32dcf79476ff85a4dc (patch) | |
tree | bd0669f937c4cbb9045a8d8896ff4733311f3832 /src | |
parent | 2a9ec7d9b9b4f38d2d857ea1181368ebe75796f7 (diff) | |
download | BlueGPS-e8944d1d6b26492359c03f32dcf79476ff85a4dc.zip BlueGPS-e8944d1d6b26492359c03f32dcf79476ff85a4dc.tar.gz BlueGPS-e8944d1d6b26492359c03f32dcf79476ff85a4dc.tar.bz2 |
rewrite log messages
Change log tags and level.
Add new logs
Diffstat (limited to 'src')
4 files changed, 76 insertions, 46 deletions
diff --git a/src/org/broeuschmeul/android/gps/bluetooth/provider/BlueetoothGpsManager.java b/src/org/broeuschmeul/android/gps/bluetooth/provider/BlueetoothGpsManager.java index 78c4706..60f315f 100644 --- a/src/org/broeuschmeul/android/gps/bluetooth/provider/BlueetoothGpsManager.java +++ b/src/org/broeuschmeul/android/gps/bluetooth/provider/BlueetoothGpsManager.java @@ -47,6 +47,9 @@ import android.util.Log; public class BlueetoothGpsManager {
+ private static final String LOG_TAG = "BlueGPS";
+// private static final String LOG_TAG = BlueetoothGpsManager.class.getSimpleName();
+
private class ConnectedThread extends Thread {
private final InputStream in;
@@ -55,7 +58,7 @@ public class BlueetoothGpsManager { try {
tmpIn = socket.getInputStream();
} catch (IOException e) {
- Log.e("BT test", "error while getting socket streams", e);
+ Log.e(LOG_TAG, "error while getting socket streams", e);
}
in = tmpIn;
}
@@ -65,11 +68,11 @@ public class BlueetoothGpsManager { BufferedReader reader = new BufferedReader(new InputStreamReader(in,"US-ASCII"));
String s;
while((enabled && (s = reader.readLine()) != null)){
- Log.e("BT test", "data: "+System.currentTimeMillis()+" "+s + "xxx");
+ Log.v(LOG_TAG, "data: "+System.currentTimeMillis()+" "+s);
notifyNmeaSentence(s+"\r\n");
}
} catch (IOException e) {
- Log.e("BT test", "error while getting data", e);
+ Log.e(LOG_TAG, "error while getting data", e);
} finally {
disable();
}
@@ -113,39 +116,40 @@ public class BlueetoothGpsManager { public synchronized void enable() {
if (! enabled){
+ Log.d(LOG_TAG, "enabling Bluetooth GPS manager");
final BluetoothAdapter bluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
if (bluetoothAdapter == null) {
// Device does not support Bluetooth
- Log.e("BT test", "Device does not support Bluetooth");
+ Log.e(LOG_TAG, "Device does not support Bluetooth");
disable(R.string.msg_bluetooth_unsupported);
} else if (!bluetoothAdapter.isEnabled()) {
// Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);
// startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);
- Log.e("BT test", "Bluetooth is not enabled");
+ Log.e(LOG_TAG, "Bluetooth is not enabled");
disable(R.string.msg_bluetooth_disabled);
} else if (Settings.Secure.getInt(callingService.getContentResolver(),Settings.Secure.ALLOW_MOCK_LOCATION, 0)==0){
- Log.e("BT test", "Mock location provider OFF");
+ Log.e(LOG_TAG, "Mock location provider OFF");
disable(R.string.msg_mock_location_disabled);
// } else if ( (! locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER))
// // && (sharedPreferences.getBoolean(BluetoothGpsProviderService.PREF_REPLACE_STD_GPS, true))
// ) {
-// Log.e("BT test", "GPS location provider OFF");
+// Log.e(LOG_TAG, "GPS location provider OFF");
// disable(R.string.msg_gps_provider_disabled);
} else {
BluetoothDevice gpsDevice = bluetoothAdapter.getRemoteDevice(gpsDeviceAddress);
if (gpsDevice == null){
- Log.e("BT test", "GPS device not found");
+ Log.e(LOG_TAG, "GPS device not found");
disable(R.string.msg_bluetooth_gps_unavaible);
} else {
- Log.e("BT test", "current device: "+gpsDevice.getName() + " -- " + gpsDevice.getAddress());
+ Log.e(LOG_TAG, "current device: "+gpsDevice.getName() + " -- " + gpsDevice.getAddress());
try {
gpsSocket = gpsDevice.createRfcommSocketToServiceRecord(UUID.fromString("00001101-0000-1000-8000-00805F9B34FB"));
} catch (IOException e) {
- Log.e("BT test", "Error during connection", e);
+ Log.e(LOG_TAG, "Error during connection", e);
gpsSocket = null;
}
if (gpsSocket == null){
- Log.e("BT test", "Error while establishing connection: no socket");
+ Log.e(LOG_TAG, "Error while establishing connection: no socket");
disable(R.string.msg_bluetooth_gps_unavaible);
} else {
@@ -157,19 +161,26 @@ public class BlueetoothGpsManager { try {
// Connect the device through the socket. This will block
// until it succeeds or throws an exception
+ Log.v(LOG_TAG, "connecting to socket");
gpsSocket.connect();
+ Log.d(LOG_TAG, "connected to socket");
+ Log.v(LOG_TAG, "starting socket reading thread");
connectedThread = new ConnectedThread(gpsSocket);
connectedThread.start();
+ Log.v(LOG_TAG, "socket reading thread started");
} catch (IOException connectException) {
// Unable to connect; So close everything and get out
- Log.e("BT test", "error while connecting to socket", connectException);
+ Log.e(LOG_TAG, "error while connecting to socket", connectException);
disable(R.string.msg_bluetooth_gps_unavaible);
// callingService.stopSelf();
}
}
};
this.enabled = true;
+ Log.d(LOG_TAG, "Bluetooth GPS manager enabled");
+ Log.v(LOG_TAG, "starting notification thread");
notificationPool = Executors.newSingleThreadExecutor();
+ Log.v(LOG_TAG, "starting connection to socket task");
notificationPool.execute(connectThread);
// enableMockLocationProvider(LocationManager.GPS_PROVIDER);
}
@@ -179,35 +190,40 @@ public class BlueetoothGpsManager { }
public synchronized void disable(int reasonId) {
+ Log.d(LOG_TAG, "disabling Bluetooth GPS manager reason: "+callingService.getString(reasonId));
setDisableReason(reasonId);
disable();
}
public synchronized void disable() {
if (enabled){
+ Log.d(LOG_TAG, "disabling Bluetooth GPS manager");
enabled = false;
if (gpsSocket != null){
try {
gpsSocket.close();
} catch (IOException closeException) {
- Log.e("BT test", "error while closing socket", closeException);
+ Log.e(LOG_TAG, "error while closing socket", closeException);
}
}
nmeaListeners.clear();
disableMockLocationProvider();
notificationPool.shutdown();
callingService.stopSelf();
+ Log.d(LOG_TAG, "Bluetooth GPS manager disabled");
}
}
public void enableMockLocationProvider(String gpsName){
if (parser != null){
+ Log.d(LOG_TAG, "enabling mock locations provider: "+gpsName);
parser.enableMockLocationProvider(gpsName);
}
}
public void disableMockLocationProvider(){
if (parser != null){
+ Log.d(LOG_TAG, "disabling mock locations provider");
parser.disableMockLocationProvider();
}
}
@@ -236,25 +252,30 @@ public class BlueetoothGpsManager { public boolean addNmeaListener(NmeaListener listener){
if (!nmeaListeners.contains(listener)){
+ Log.d(LOG_TAG, "adding new NMEA listener");
nmeaListeners.add(listener);
}
return true;
}
public void removeNmeaListener(NmeaListener listener){
- nmeaListeners.remove(listener);
+ Log.d(LOG_TAG, "removing NMEA listener");
+ nmeaListeners.remove(listener);
}
private void notifyNmeaSentence(final String nmeaSentence){
if (enabled){
+ Log.v(LOG_TAG, "parsing and notifying NMEA sentence: "+nmeaSentence);
try {
parser.parseNmeaSentence(nmeaSentence);
} catch (SecurityException e){
+ Log.e(LOG_TAG, "error while parsing NMEA sentence: "+nmeaSentence, e);
// a priori Mock Location is disabled
disable(R.string.msg_mock_location_disabled);
}
final long timestamp = System.currentTimeMillis();
synchronized(nmeaListeners) {
+ Log.v(LOG_TAG, "notifying NMEA sentence: "+nmeaSentence);
for(final NmeaListener listener : nmeaListeners){
notificationPool.execute(new Runnable(){
@Override
diff --git a/src/org/broeuschmeul/android/gps/bluetooth/provider/BluetoothGpsActivity.java b/src/org/broeuschmeul/android/gps/bluetooth/provider/BluetoothGpsActivity.java index 22993bb..08d2c8c 100644 --- a/src/org/broeuschmeul/android/gps/bluetooth/provider/BluetoothGpsActivity.java +++ b/src/org/broeuschmeul/android/gps/bluetooth/provider/BluetoothGpsActivity.java @@ -43,6 +43,10 @@ import android.util.Log; * */ public class BluetoothGpsActivity extends PreferenceActivity implements OnPreferenceChangeListener, OnSharedPreferenceChangeListener { + + private static final String LOG_TAG = "BlueGPS"; +// private static final String LOG_TAG = BluetoothGpsActivity.class.getSimpleName(); + private SharedPreferences sharedPref ; private BluetoothAdapter bluetoothAdapter = null; @@ -88,7 +92,7 @@ public class BluetoothGpsActivity extends PreferenceActivity implements OnPrefer // Loop through paired devices for (BluetoothDevice device : pairedDevices) { // Add the name and address to the ListPreference enties and entyValues - Log.e("BT test", "device: "+device.getName() + " -- " + device.getAddress()); + Log.d(LOG_TAG, "device: "+device.getName() + " -- " + device.getAddress()); entryValues[i] = device.getAddress(); entries[i] = device.getName(); i++; diff --git a/src/org/broeuschmeul/android/gps/bluetooth/provider/BluetoothGpsProviderService.java b/src/org/broeuschmeul/android/gps/bluetooth/provider/BluetoothGpsProviderService.java index 555ed96..ccead74 100644 --- a/src/org/broeuschmeul/android/gps/bluetooth/provider/BluetoothGpsProviderService.java +++ b/src/org/broeuschmeul/android/gps/bluetooth/provider/BluetoothGpsProviderService.java @@ -66,6 +66,9 @@ public class BluetoothGpsProviderService extends Service implements NmeaListener public static final String PREF_TRACK_FILE_DIR = "trackFileDirectory";
public static final String PREF_TRACK_FILE_PREFIX = "trackFilePrefix";
public static final String PREF_BLUETOOTH_DEVICE = "bluetoothDevice";
+
+ private static final String LOG_TAG = "BlueGPS";
+// private static final String LOG_TAG = BluetoothGpsProviderService.class.getSimpleName();
private LocationManager lm;
private BlueetoothGpsManager gpsManager = null;
@@ -88,7 +91,7 @@ public class BluetoothGpsProviderService extends Service implements NmeaListener SharedPreferences.Editor edit = sharedPreferences.edit();
String deviceAddress = sharedPreferences.getString(PREF_BLUETOOTH_DEVICE, null);
if (Config.LOGD){
- Log.d(BluetoothGpsProviderService.class.getName(), "prefs device addr: "+deviceAddress);
+ Log.d(LOG_TAG, "prefs device addr: "+deviceAddress);
}
if (ACTION_START_GPS_PROVIDER.equals(intent.getAction())){
if (gpsManager == null){
@@ -213,16 +216,16 @@ public class BluetoothGpsProviderService extends Service implements NmeaListener String trackDirName = sharedPreferences.getString(PREF_TRACK_FILE_DIR, this.getString(R.string.defaultTrackFileDirectory));
String trackFilePrefix = sharedPreferences.getString(PREF_TRACK_FILE_PREFIX, this.getString(R.string.defaultTrackFilePrefix));
trackFile = new File(trackDirName,trackFilePrefix+fmt.format(new Date()));
- Log.i(BluetoothGpsProviderService.class.getName(), "Writing the prelude of the NMEA file: "+trackFile.getAbsolutePath());
+ Log.d(BluetoothGpsProviderService.class.getName(), "Writing the prelude of the NMEA file: "+trackFile.getAbsolutePath());
File trackDir = trackFile.getParentFile();
try {
if ((! trackDir.mkdirs()) && (! trackDir.isDirectory())){
- Log.e(BluetoothGpsProviderService.class.getName(), "Error while creating parent dir of NMEA file: "+trackDir.getAbsolutePath());
+ Log.e(LOG_TAG, "Error while creating parent dir of NMEA file: "+trackDir.getAbsolutePath());
}
writer = new PrintWriter(new BufferedWriter(new FileWriter(trackFile)));
preludeWritten = true;
} catch (IOException e) {
- Log.e(BluetoothGpsProviderService.class.getName(), "Error while writing the prelude of the NMEA file: "+trackFile.getAbsolutePath(), e);
+ Log.e(LOG_TAG, "Error while writing the prelude of the NMEA file: "+trackFile.getAbsolutePath(), e);
// there was an error while writing the prelude of the NMEA file, stopping the service...
stopSelf();
// } catch (SecurityException e) {
@@ -233,7 +236,7 @@ public class BluetoothGpsProviderService extends Service implements NmeaListener }
private void endTrack(){
if (trackFile != null && writer != null){
- Log.i(BluetoothGpsProviderService.class.getName(), "Ending the NMEA file: "+trackFile.getAbsolutePath());
+ Log.d(LOG_TAG, "Ending the NMEA file: "+trackFile.getAbsolutePath());
preludeWritten = false;
writer.close();
trackFile = null;
@@ -243,7 +246,7 @@ public class BluetoothGpsProviderService extends Service implements NmeaListener if (! preludeWritten){
beginTrack();
}
- Log.d(BluetoothGpsProviderService.class.getName(), "Adding data in the NMEA file: "+ data);
+ Log.v(LOG_TAG, "Adding data in the NMEA file: "+ data);
if (trackFile != null && writer != null){
writer.print(data);
}
@@ -254,7 +257,7 @@ public class BluetoothGpsProviderService extends Service implements NmeaListener @Override
public IBinder onBind(Intent intent) {
if (Config.LOGD){
- Log.d(BluetoothGpsProviderService.class.getName(), "trying access IBinder");
+ Log.d(LOG_TAG, "trying access IBinder");
}
return null;
}
@@ -266,7 +269,7 @@ public class BluetoothGpsProviderService extends Service implements NmeaListener @Override
public void onProviderDisabled(String provider) {
- Log.e(BluetoothGpsProviderService.class.getName(), "The GPS has been disabled.....stopping the NMEA tracker service.");
+ Log.i(LOG_TAG, "The GPS has been disabled.....stopping the NMEA tracker service.");
stopSelf();
}
diff --git a/src/org/broeuschmeul/android/gps/nmea/util/NmeaParser.java b/src/org/broeuschmeul/android/gps/nmea/util/NmeaParser.java index a381ac4..d19dbde 100644 --- a/src/org/broeuschmeul/android/gps/nmea/util/NmeaParser.java +++ b/src/org/broeuschmeul/android/gps/nmea/util/NmeaParser.java @@ -36,6 +36,9 @@ import android.text.TextUtils.SimpleStringSplitter; import android.util.Log;
public class NmeaParser {
+ private static final String LOG_TAG = "BlueGPS";
+// private static final String LOG_TAG = NmeaParser.class.getSimpleName();
+
private String fixTime = null;
private long fixTimestamp;
@@ -71,27 +74,27 @@ public class NmeaParser { if (! mockGpsEnabled){
prov = lm.getProvider(mockLocationProvider);
if (prov != null){
- Log.e("BT test", "Mock provider: "+prov.getName()+" "+prov.getPowerRequirement()+" "+prov.getAccuracy()+" "+lm.isProviderEnabled(mockLocationProvider));
+ Log.v(LOG_TAG, "Mock provider: "+prov.getName()+" "+prov.getPowerRequirement()+" "+prov.getAccuracy()+" "+lm.isProviderEnabled(mockLocationProvider));
}
lm.addTestProvider(mockLocationProvider, false, true,false, false, true, true, true, Criteria.POWER_HIGH, Criteria.ACCURACY_FINE);
if ((prov == null)
// || (! LocationManager.GPS_PROVIDER.equals(mockLocationProvider))
){
- Log.e("BT test", "enabling Mock provider: "+mockLocationProvider);
+ Log.d(LOG_TAG, "enabling Mock provider: "+mockLocationProvider);
lm.setTestProviderEnabled(mockLocationProvider, true);
mockGpsAutoEnabled = true;
}
mockGpsEnabled = true;
} else {
- Log.e("BT test", "Mock provider already enabled: "+mockLocationProvider);
+ Log.d(LOG_TAG, "Mock provider already enabled: "+mockLocationProvider);
}
prov = lm.getProvider(mockLocationProvider);
if (prov != null){
- Log.e("BT test", "Mock provider: "+prov.getName()+" "+prov.getPowerRequirement()+" "+prov.getAccuracy()+" "+lm.isProviderEnabled(mockLocationProvider));
+ Log.e(LOG_TAG, "Mock provider: "+prov.getName()+" "+prov.getPowerRequirement()+" "+prov.getAccuracy()+" "+lm.isProviderEnabled(mockLocationProvider));
}
}
} catch (SecurityException e){
- Log.e("BT test", "Error while enabling Mock Mocations Provider", e);
+ Log.e(LOG_TAG, "Error while enabling Mock Mocations Provider", e);
disableMockLocationProvider();
}
}
@@ -102,34 +105,34 @@ public class NmeaParser { if (mockLocationProvider != null && mockLocationProvider != "" && mockGpsEnabled){
prov = lm.getProvider(mockLocationProvider);
if (prov != null){
- Log.e("BT test", "Mock provider: "+prov.getName()+" "+prov.getPowerRequirement()+" "+prov.getAccuracy()+" "+lm.isProviderEnabled(mockLocationProvider));
+ Log.v(LOG_TAG, "Mock provider: "+prov.getName()+" "+prov.getPowerRequirement()+" "+prov.getAccuracy()+" "+lm.isProviderEnabled(mockLocationProvider));
}
mockGpsEnabled = false;
if ( mockGpsAutoEnabled ) {
- Log.e("BT test", "disabling Mock provider: "+mockLocationProvider);
+ Log.d(LOG_TAG, "disabling Mock provider: "+mockLocationProvider);
lm.setTestProviderEnabled(mockLocationProvider, false);
}
prov = lm.getProvider(mockLocationProvider);
if (prov != null){
- Log.e("BT test", "Mock provider: "+prov.getName()+" "+prov.getPowerRequirement()+" "+prov.getAccuracy()+" "+lm.isProviderEnabled(mockLocationProvider));
+ Log.v(LOG_TAG, "Mock provider: "+prov.getName()+" "+prov.getPowerRequirement()+" "+prov.getAccuracy()+" "+lm.isProviderEnabled(mockLocationProvider));
}
lm.clearTestProviderEnabled(mockLocationProvider);
prov = lm.getProvider(mockLocationProvider);
if (prov != null){
- Log.e("BT test", "Mock provider: "+prov.getName()+" "+prov.getPowerRequirement()+" "+prov.getAccuracy()+" "+lm.isProviderEnabled(mockLocationProvider));
+ Log.v(LOG_TAG, "Mock provider: "+prov.getName()+" "+prov.getPowerRequirement()+" "+prov.getAccuracy()+" "+lm.isProviderEnabled(mockLocationProvider));
}
lm.clearTestProviderStatus(mockLocationProvider);
lm.removeTestProvider(mockLocationProvider);
prov = lm.getProvider(mockLocationProvider);
if (prov != null){
- Log.e("BT test", "Mock provider: "+prov.getName()+" "+prov.getPowerRequirement()+" "+prov.getAccuracy()+" "+lm.isProviderEnabled(mockLocationProvider));
+ Log.v(LOG_TAG, "Mock provider: "+prov.getName()+" "+prov.getPowerRequirement()+" "+prov.getAccuracy()+" "+lm.isProviderEnabled(mockLocationProvider));
}
- Log.e("BT test", "removed mock GPS");
+ Log.d(LOG_TAG, "removed mock GPS");
} else {
- Log.e("BT test", "Mock provider already disabled: "+mockLocationProvider);
+ Log.d(LOG_TAG, "Mock provider already disabled: "+mockLocationProvider);
}
} catch (SecurityException e){
- Log.e("BT test", "Error while enabling Mock Mocations Provider", e);
+ Log.e(LOG_TAG, "Error while enabling Mock Mocations Provider", e);
} finally {
mockLocationProvider = null;
mockGpsEnabled = false;
@@ -156,10 +159,10 @@ public class NmeaParser { hasGGA = false;
hasRMC=false;
if (fix != null){
- Log.e(this.getClass().getSimpleName(), "New Fix: "+System.currentTimeMillis()+" "+fix);
+ Log.v(LOG_TAG, "New Fix: "+System.currentTimeMillis()+" "+fix);
if (lm != null && mockGpsEnabled){
lm.setTestProviderLocation(mockLocationProvider, fix);
- Log.e(this.getClass().getSimpleName(), "New Fix notified to Location Manager: "+mockLocationProvider);
+ Log.v(LOG_TAG, "New Fix notified to Location Manager: "+mockLocationProvider);
}
this.fix = null;
}
@@ -168,14 +171,14 @@ public class NmeaParser { // parse NMEA Sentence
public String parseNmeaSentence(String gpsSentence) throws SecurityException {
String nmeaSentence = null;
- Log.e("BT test", "data: "+System.currentTimeMillis()+" "+gpsSentence);
+ Log.v(LOG_TAG, "data: "+System.currentTimeMillis()+" "+gpsSentence);
Pattern xx = Pattern.compile("\\$([^*$]*)\\*([0-9A-F][0-9A-F])?\r\n");
Matcher m = xx.matcher(gpsSentence);
if (m.matches()){
nmeaSentence = m.group(0);
String sentence = m.group(1);
String checkSum = m.group(2);
- Log.e("BT test", "data: "+System.currentTimeMillis()+" "+sentence+" cheksum; "+checkSum +" control: "+String.format("%X",computeChecksum(sentence)));
+ Log.v(LOG_TAG, "data: "+System.currentTimeMillis()+" "+sentence+" cheksum; "+checkSum +" control: "+String.format("%X",computeChecksum(sentence)));
SimpleStringSplitter splitter = new TextUtils.SimpleStringSplitter(',');
splitter.setString(sentence);
String command = splitter.next();
@@ -244,7 +247,7 @@ public class NmeaParser { fixTime = time;
fixTimestamp = parseNmeaTime(time);
fix.setTime(fixTimestamp);
- Log.e(this.getClass().getSimpleName(), "Fix: "+fix);
+ Log.v(LOG_TAG, "Fix: "+fix);
}
if (lat != null && !lat.equals("")){
fix.setLatitude(parseNmeaLatitude(lat,latDir));
@@ -263,7 +266,7 @@ public class NmeaParser { extras.putInt("satellites", Integer.parseInt(nbSat));
fix.setExtras(extras);
}
- Log.e(this.getClass().getSimpleName(), "Fix: "+System.currentTimeMillis()+" "+fix);
+ Log.v(LOG_TAG, "Fix: "+System.currentTimeMillis()+" "+fix);
hasGGA = true;
if (hasGGA && hasRMC){
notifyFix(fix);
@@ -315,7 +318,7 @@ public class NmeaParser { fixTime = time;
fixTimestamp = parseNmeaTime(time);
fix.setTime(fixTimestamp);
- Log.e(this.getClass().getSimpleName(), "Fix: "+fix);
+ Log.v(LOG_TAG, "Fix: "+fix);
}
if (lat != null && !lat.equals("")){
fix.setLatitude(parseNmeaLatitude(lat,latDir));
@@ -329,7 +332,7 @@ public class NmeaParser { if (bearing != null && !bearing.equals("")){
fix.setBearing(Float.parseFloat(bearing));
}
- Log.e(this.getClass().getSimpleName(), "Fix: "+System.currentTimeMillis()+" "+fix);
+ Log.v(LOG_TAG, "Fix: "+System.currentTimeMillis()+" "+fix);
hasRMC = true;
if (hasGGA && hasRMC){
notifyFix(fix);
@@ -484,8 +487,7 @@ public class NmeaParser { }
}
} catch (ParseException e) {
- // TODO Auto-generated catch block
- Log.e(this.getClass().getSimpleName(), "Error while parsing NMEA time", e);
+ Log.e(LOG_TAG, "Error while parsing NMEA time", e);
}
return timestamp;
}
|