aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorSamuel Tardieu <sam@rfc1149.net>2012-04-10 22:21:28 +0200
committerSamuel Tardieu <sam@rfc1149.net>2012-04-11 23:23:15 +0200
commit6e7292562e25339087e78d9ba4c61242b60a71e6 (patch)
tree4eec6e724714254e01166fc3ae85df96bd0a5f9b /main
parentd7aab68ca106381f0e0a89c7c2e68f555ebca28e (diff)
downloadcgeo-6e7292562e25339087e78d9ba4c61242b60a71e6.zip
cgeo-6e7292562e25339087e78d9ba4c61242b60a71e6.tar.gz
cgeo-6e7292562e25339087e78d9ba4c61242b60a71e6.tar.bz2
Remove unused methods
Those methods have been flagged as unused by proguard.
Diffstat (limited to 'main')
-rw-r--r--main/src/cgeo/geocaching/CacheDetailActivity.java19
-rw-r--r--main/src/cgeo/geocaching/SearchResult.java11
-rw-r--r--main/src/cgeo/geocaching/cgBase.java49
-rw-r--r--main/src/cgeo/geocaching/cgCache.java4
-rw-r--r--main/src/cgeo/geocaching/cgData.java52
-rw-r--r--main/src/cgeo/geocaching/cgWaypoint.java4
-rw-r--r--main/src/cgeo/geocaching/cgeonavigate.java17
-rw-r--r--main/src/cgeo/geocaching/enumerations/StatusCode.java5
-rw-r--r--main/src/cgeo/geocaching/network/Login.java6
-rw-r--r--main/src/cgeo/geocaching/ui/CacheListAdapter.java11
-rw-r--r--main/src/cgeo/geocaching/utils/BaseUtils.java13
-rw-r--r--main/src/cgeo/geocaching/utils/CryptUtils.java43
12 files changed, 0 insertions, 234 deletions
diff --git a/main/src/cgeo/geocaching/CacheDetailActivity.java b/main/src/cgeo/geocaching/CacheDetailActivity.java
index dfd8dde..755115a 100644
--- a/main/src/cgeo/geocaching/CacheDetailActivity.java
+++ b/main/src/cgeo/geocaching/CacheDetailActivity.java
@@ -832,25 +832,6 @@ public class CacheDetailActivity extends AbstractActivity {
}
/**
- * Creates a {@link List} of all coordinates (cache and waypoints) for the current cache.
- *
- * @return A {@link List} of all coordinates
- */
- public List<IWaypoint> getCoordinates() {
- List<IWaypoint> coordinates = new ArrayList<IWaypoint>();
-
- // cache
- coordinates.add(cache);
-
- // waypoints
- if (cache.hasWaypoints()) {
- coordinates.addAll(cache.getWaypoints());
- }
-
- return coordinates;
- }
-
- /**
* Tries to navigate to the {@link cgCache} of this activity.
*/
private void startDefaultNavigation() {
diff --git a/main/src/cgeo/geocaching/SearchResult.java b/main/src/cgeo/geocaching/SearchResult.java
index e7c9a88..f7458fe 100644
--- a/main/src/cgeo/geocaching/SearchResult.java
+++ b/main/src/cgeo/geocaching/SearchResult.java
@@ -7,7 +7,6 @@ import cgeo.geocaching.enumerations.LoadFlags.SaveFlag;
import cgeo.geocaching.enumerations.StatusCode;
import cgeo.geocaching.gcvote.GCVote;
-import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import android.os.Parcel;
@@ -201,14 +200,4 @@ public class SearchResult implements Parcelable {
return cgeoapplication.getInstance().saveCache(cache, EnumSet.of(SaveFlag.SAVE_CACHE));
}
- /** Add the cache geocodes to the search and store them in the CacheCache */
- public void addCaches(final Set<cgCache> caches) {
- if (CollectionUtils.isEmpty(caches)) {
- return;
- }
-
- for (final cgCache cache : caches) {
- addCache(cache);
- }
- }
}
diff --git a/main/src/cgeo/geocaching/cgBase.java b/main/src/cgeo/geocaching/cgBase.java
index 090bffc..a1bb980 100644
--- a/main/src/cgeo/geocaching/cgBase.java
+++ b/main/src/cgeo/geocaching/cgBase.java
@@ -1,7 +1,6 @@
// $codepro.audit.disable logExceptions
package cgeo.geocaching;
-import cgeo.geocaching.activity.ActivityMixin;
import cgeo.geocaching.connector.ConnectorFactory;
import cgeo.geocaching.connector.gc.GCConnector;
import cgeo.geocaching.connector.gc.GCConstants;
@@ -1866,54 +1865,6 @@ public class cgBase {
}
}
- public static boolean runNavigation(Activity activity, Resources res, Settings settings, final Geopoint coords) {
- return runNavigation(activity, res, settings, coords, null);
- }
-
- public static boolean runNavigation(Activity activity, Resources res, Settings settings, final Geopoint coords, final Geopoint coordsNow) {
- if (activity == null) {
- return false;
- }
- if (settings == null) {
- return false;
- }
-
- // Google Navigation
- if (Settings.isUseGoogleNavigation()) {
- try {
- activity.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("google.navigation:ll=" + coords.getLatitude() + "," + coords.getLongitude())));
-
- return true;
- } catch (Exception e) {
- // nothing
- }
- }
-
- // Google Maps Directions
- try {
- if (coordsNow != null) {
- activity.startActivity(new Intent(Intent.ACTION_VIEW,
- Uri.parse("http://maps.google.com/maps?f=d&saddr=" + coordsNow.getLatitude() + "," + coordsNow.getLongitude() +
- "&daddr=" + coords.getLatitude() + "," + coords.getLongitude())));
- } else {
- activity.startActivity(new Intent(Intent.ACTION_VIEW,
- Uri.parse("http://maps.google.com/maps?f=d&daddr=" + coords.getLatitude() + "," + coords.getLongitude())));
- }
-
- return true;
- } catch (Exception e) {
- // nothing
- }
-
- Log.i(Settings.tag, "cgBase.runNavigation: No navigation application available.");
-
- if (res != null) {
- ActivityMixin.showToast(activity, res.getString(R.string.err_navigation_no));
- }
-
- return false;
- }
-
/**
* Generate a time string according to system-wide settings (locale, 12/24 hour)
* such as "13:24".
diff --git a/main/src/cgeo/geocaching/cgCache.java b/main/src/cgeo/geocaching/cgCache.java
index 36fd064..351fccf 100644
--- a/main/src/cgeo/geocaching/cgCache.java
+++ b/main/src/cgeo/geocaching/cgCache.java
@@ -1401,10 +1401,6 @@ public class cgCache implements ICache, IWaypoint {
cgBase.storeCache(activity, this, null, listId, false, handler);
}
- public int getZoomlevel() {
- return this.zoomlevel;
- }
-
public void setZoomlevel(int zoomlevel) {
this.zoomlevel = zoomlevel;
}
diff --git a/main/src/cgeo/geocaching/cgData.java b/main/src/cgeo/geocaching/cgData.java
index b0a3574..c72bfd5 100644
--- a/main/src/cgeo/geocaching/cgData.java
+++ b/main/src/cgeo/geocaching/cgData.java
@@ -2795,58 +2795,6 @@ public class cgData {
return geocodes;
}
- public List<String> getOfflineAll(CacheType cacheType) {
- init();
-
- List<String> geocodes = new ArrayList<String>();
-
- StringBuilder where = new StringBuilder();
-
- // cacheType limitation
- if (cacheType != CacheType.ALL) {
- where.append(cacheType);
- where.append('"');
- }
-
- // offline caches only
- if (where.length() > 0) {
- where.append(" and ");
- }
- where.append("reason >= 1");
-
- try {
- Cursor cursor = databaseRO.query(
- dbTableCaches,
- new String[] { "geocode" },
- where.toString(),
- null,
- null,
- null,
- null,
- "5000");
-
- if (cursor != null) {
- if (cursor.getCount() > 0) {
- cursor.moveToFirst();
- int index = cursor.getColumnIndex("geocode");
-
- do {
- geocodes.add(cursor.getString(index));
- } while (cursor.moveToNext());
- } else {
- cursor.close();
- return null;
- }
-
- cursor.close();
- }
- } catch (Exception e) {
- Log.e(Settings.tag, "cgData.getOfflineAll: " + e.toString());
- }
-
- return geocodes;
- }
-
public boolean markFound(String geocode) {
if (StringUtils.isBlank(geocode)) {
return false;
diff --git a/main/src/cgeo/geocaching/cgWaypoint.java b/main/src/cgeo/geocaching/cgWaypoint.java
index 8f9ec85..ee865ee 100644
--- a/main/src/cgeo/geocaching/cgWaypoint.java
+++ b/main/src/cgeo/geocaching/cgWaypoint.java
@@ -179,10 +179,6 @@ public class cgWaypoint implements IWaypoint, Comparable<cgWaypoint> {
return waypointType;
}
- public void setWaypointType(WaypointType type) {
- this.waypointType = type;
- }
-
public String getLookup() {
return lookup;
}
diff --git a/main/src/cgeo/geocaching/cgeonavigate.java b/main/src/cgeo/geocaching/cgeonavigate.java
index f5da2a1..0cbd30f 100644
--- a/main/src/cgeo/geocaching/cgeonavigate.java
+++ b/main/src/cgeo/geocaching/cgeonavigate.java
@@ -294,23 +294,6 @@ public class cgeonavigate extends AbstractActivity {
((TextView) findViewById(R.id.destination)).setText(dstCoords.toString());
}
- public void setDest(final Geopoint coords) {
- if (coords == null) {
- return;
- }
-
- title = "some place";
- setTitle();
- setDestCoords();
-
- dstCoords = coords;
- updateDistanceInfo();
- }
-
- public Geopoint getCoordinatesNow() {
- return geo.coordsNow;
- }
-
private void updateDistanceInfo() {
if (geo == null || geo.coordsNow == null || dstCoords == null) {
return;
diff --git a/main/src/cgeo/geocaching/enumerations/StatusCode.java b/main/src/cgeo/geocaching/enumerations/StatusCode.java
index d49acb2..78dfb72 100644
--- a/main/src/cgeo/geocaching/enumerations/StatusCode.java
+++ b/main/src/cgeo/geocaching/enumerations/StatusCode.java
@@ -2,7 +2,6 @@ package cgeo.geocaching.enumerations;
import cgeo.geocaching.R;
-import android.content.Context;
import android.content.res.Resources;
public enum StatusCode {
@@ -45,8 +44,4 @@ public enum StatusCode {
return res.getString(error_string);
}
- public String getErrorString(final Context context) {
- return getErrorString(context.getResources());
- }
-
}
diff --git a/main/src/cgeo/geocaching/network/Login.java b/main/src/cgeo/geocaching/network/Login.java
index d5f511d..ffefd05 100644
--- a/main/src/cgeo/geocaching/network/Login.java
+++ b/main/src/cgeo/geocaching/network/Login.java
@@ -389,10 +389,4 @@ public abstract class Login {
putViewstates(params, getViewstates(page));
}
- static public String[] requestViewstates(final String uri, final Parameters params, boolean xContentType, boolean my) {
- final HttpResponse response = Network.request(uri, params, xContentType, my, false);
-
- return getViewstates(Network.getResponseData(response));
- }
-
}
diff --git a/main/src/cgeo/geocaching/ui/CacheListAdapter.java b/main/src/cgeo/geocaching/ui/CacheListAdapter.java
index 6c03889..c6205f6 100644
--- a/main/src/cgeo/geocaching/ui/CacheListAdapter.java
+++ b/main/src/cgeo/geocaching/ui/CacheListAdapter.java
@@ -195,17 +195,6 @@ public class CacheListAdapter extends ArrayAdapter<cgCache> {
notifyDataSetChanged();
}
- public void clearFilter() {
- if (originalList != null) {
- list.clear();
- list.addAll(originalList);
-
- currentFilter = null;
- }
-
- notifyDataSetChanged();
- }
-
public boolean isFilter() {
return currentFilter != null;
}
diff --git a/main/src/cgeo/geocaching/utils/BaseUtils.java b/main/src/cgeo/geocaching/utils/BaseUtils.java
index 44c35a1..d468fc9 100644
--- a/main/src/cgeo/geocaching/utils/BaseUtils.java
+++ b/main/src/cgeo/geocaching/utils/BaseUtils.java
@@ -3,8 +3,6 @@
*/
package cgeo.geocaching.utils;
-import java.util.ArrayList;
-import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -84,17 +82,6 @@ public final class BaseUtils {
return BaseUtils.getMatch(data, p, true, 1, defaultValue, false);
}
- public static List<String> getMatches(final String data, final Pattern p, int count) {
- ArrayList<String> result = new ArrayList<String>();
- final Matcher matcher = p.matcher(data);
- while (matcher.find()) {
- for (int i = 0; i < count; i++) {
- result.add(matcher.group(i));
- }
- }
- return result;
- }
-
/**
* Searches for the pattern p in the data.
*
diff --git a/main/src/cgeo/geocaching/utils/CryptUtils.java b/main/src/cgeo/geocaching/utils/CryptUtils.java
index 87b37c4..4cf0de2 100644
--- a/main/src/cgeo/geocaching/utils/CryptUtils.java
+++ b/main/src/cgeo/geocaching/utils/CryptUtils.java
@@ -136,49 +136,6 @@ public final class CryptUtils {
return buffer;
}
- public static byte[] base64Decode(String text) {
- char[] in = text.toCharArray();
-
- int iLen = in.length;
- if (iLen % 4 != 0) {
- throw new IllegalArgumentException("Length of Base64 encoded input string is not a multiple of 4.");
- }
- while (iLen > 0 && in[iLen - 1] == '=') {
- iLen--;
- }
- int oLen = (iLen * 3) / 4;
- byte[] out = new byte[oLen];
- int ip = 0;
- int op = 0;
- while (ip < iLen) {
- int i0 = in[ip++];
- int i1 = in[ip++];
- int i2 = ip < iLen ? in[ip++] : 'A';
- int i3 = ip < iLen ? in[ip++] : 'A';
- if (i0 > 127 || i1 > 127 || i2 > 127 || i3 > 127) {
- throw new IllegalArgumentException("Illegal character in Base64 encoded data.");
- }
- int b0 = base64map2[i0];
- int b1 = base64map2[i1];
- int b2 = base64map2[i2];
- int b3 = base64map2[i3];
- if (b0 < 0 || b1 < 0 || b2 < 0 || b3 < 0) {
- throw new IllegalArgumentException("Illegal character in Base64 encoded data.");
- }
- int o0 = (b0 << 2) | (b1 >>> 4);
- int o1 = ((b1 & 0xf) << 4) | (b2 >>> 2);
- int o2 = ((b2 & 3) << 6) | b3;
- out[op++] = (byte) o0;
- if (op < oLen) {
- out[op++] = (byte) o1;
- }
- if (op < oLen) {
- out[op++] = (byte) o2;
- }
- }
- return out;
- }
-
public static String base64Encode(byte[] in) {
int iLen = in.length;
int oDataLen = (iLen * 4 + 2) / 3; // output length without padding