diff options
| author | Bananeweizen <bananeweizen@gmx.de> | 2012-03-04 19:56:33 +0100 |
|---|---|---|
| committer | Bananeweizen <bananeweizen@gmx.de> | 2012-03-04 19:56:33 +0100 |
| commit | 07b0b2b1e8ec7a99a3db1dfc72c9e86c4985147b (patch) | |
| tree | 33e17cb8f4505afbcc172ae8e93a1462c26a73d4 /main/src | |
| parent | 7ad0df840d00ee9dd5467564e46e5f59f64faf37 (diff) | |
| download | cgeo-07b0b2b1e8ec7a99a3db1dfc72c9e86c4985147b.zip cgeo-07b0b2b1e8ec7a99a3db1dfc72c9e86c4985147b.tar.gz cgeo-07b0b2b1e8ec7a99a3db1dfc72c9e86c4985147b.tar.bz2 | |
refactoring: cleanups
* remove unused resources
* fix some comments, layout, logging and other stuff
Diffstat (limited to 'main/src')
| -rw-r--r-- | main/src/cgeo/geocaching/Settings.java | 2 | ||||
| -rw-r--r-- | main/src/cgeo/geocaching/gcvote/GCVote.java | 16 |
2 files changed, 10 insertions, 8 deletions
diff --git a/main/src/cgeo/geocaching/Settings.java b/main/src/cgeo/geocaching/Settings.java index 397c8b1..1a58a85 100644 --- a/main/src/cgeo/geocaching/Settings.java +++ b/main/src/cgeo/geocaching/Settings.java @@ -204,10 +204,8 @@ public final class Settings { @Override public void edit(Editor edit) { if (StringUtils.isBlank(memberStatus)) { - // erase password edit.remove(KEY_MEMBER_STATUS); } else { - // save password edit.putString(KEY_MEMBER_STATUS, memberStatus); } } diff --git a/main/src/cgeo/geocaching/gcvote/GCVote.java b/main/src/cgeo/geocaching/gcvote/GCVote.java index 663fd20..c98d4d9 100644 --- a/main/src/cgeo/geocaching/gcvote/GCVote.java +++ b/main/src/cgeo/geocaching/gcvote/GCVote.java @@ -118,7 +118,7 @@ public final class GCVote { } } } catch (Exception e) { - Log.w(Settings.tag, "cgBase.getRating: Failed to parse guid"); + Log.w(Settings.tag, "GCVote.getRating: Failed to parse guid"); } if (guid == null) { continue; @@ -135,7 +135,7 @@ public final class GCVote { } } } catch (Exception e) { - Log.w(Settings.tag, "cgBase.getRating: Failed to parse loggedIn"); + Log.w(Settings.tag, "GCVote.getRating: Failed to parse loggedIn"); } float rating = 0; @@ -145,7 +145,7 @@ public final class GCVote { rating = Float.parseFloat(matcherRating.group(1)); } } catch (Exception e) { - Log.w(Settings.tag, "cgBase.getRating: Failed to parse rating"); + Log.w(Settings.tag, "GCVote.getRating: Failed to parse rating"); } if (rating <= 0) { continue; @@ -158,7 +158,7 @@ public final class GCVote { votes = Integer.parseInt(matcherVotes.group(1)); } } catch (Exception e) { - Log.w(Settings.tag, "cgBase.getRating: Failed to parse vote count"); + Log.w(Settings.tag, "GCVote.getRating: Failed to parse vote count"); } if (votes < 0) { continue; @@ -172,7 +172,7 @@ public final class GCVote { myVote = Float.parseFloat(matcherVote.group(1)); } } catch (Exception e) { - Log.w(Settings.tag, "cgBase.getRating: Failed to parse user's vote"); + Log.w(Settings.tag, "GCVote.getRating: Failed to parse user's vote"); } } @@ -183,7 +183,7 @@ public final class GCVote { } } } catch (Exception e) { - Log.e(Settings.tag, "cgBase.getRating: " + e.toString()); + Log.e(Settings.tag, "GCVote.getRating: " + e.toString()); } return ratings; @@ -238,6 +238,10 @@ public final class GCVote { } } + if (guids.isEmpty()) { + return; + } + try { final Map<String, GCVoteRating> ratings = GCVote.getRating(guids, null); |
