diff options
author | Samuel Tardieu <sam@rfc1149.net> | 2011-09-28 18:50:45 +0200 |
---|---|---|
committer | Samuel Tardieu <sam@rfc1149.net> | 2011-09-29 09:35:48 +0200 |
commit | 9b18a8a8bf8e5598062e71235e7b92e26350c55c (patch) | |
tree | d30529ee963f329f4a210b7dfa2d0c19b76424b6 /main | |
parent | 99d55447ee5e63fa3a322f454672ac4b432debe0 (diff) | |
download | cgeo-9b18a8a8bf8e5598062e71235e7b92e26350c55c.zip cgeo-9b18a8a8bf8e5598062e71235e7b92e26350c55c.tar.gz cgeo-9b18a8a8bf8e5598062e71235e7b92e26350c55c.tar.bz2 |
Access static fields through static accesses
Diffstat (limited to 'main')
-rw-r--r-- | main/src/cgeo/geocaching/UnknownTagsHandler.java | 4 | ||||
-rw-r--r-- | main/src/cgeo/geocaching/cgBase.java | 3 | ||||
-rw-r--r-- | main/src/cgeo/geocaching/cgCacheListAdapter.java | 3 | ||||
-rw-r--r-- | main/src/cgeo/geocaching/cgeoauth.java | 5 | ||||
-rw-r--r-- | main/src/cgeo/geocaching/cgeodetail.java | 2 |
5 files changed, 10 insertions, 7 deletions
diff --git a/main/src/cgeo/geocaching/UnknownTagsHandler.java b/main/src/cgeo/geocaching/UnknownTagsHandler.java index 6fab349..e0e5351 100644 --- a/main/src/cgeo/geocaching/UnknownTagsHandler.java +++ b/main/src/cgeo/geocaching/UnknownTagsHandler.java @@ -4,7 +4,7 @@ import org.xml.sax.XMLReader; import android.text.Editable; import android.text.Html.TagHandler; -import android.text.Spannable; +import android.text.Spanned; import android.text.style.StrikethroughSpan; public class UnknownTagsHandler implements TagHandler { @@ -25,7 +25,7 @@ public class UnknownTagsHandler implements TagHandler { strikePos = length; } else { if (strikePos > UNDEFINED_POSITION) { - output.setSpan(new StrikethroughSpan(), strikePos, length, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); + output.setSpan(new StrikethroughSpan(), strikePos, length, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); strikePos = UNDEFINED_POSITION; } } diff --git a/main/src/cgeo/geocaching/cgBase.java b/main/src/cgeo/geocaching/cgBase.java index 6e7877b..8adede9 100644 --- a/main/src/cgeo/geocaching/cgBase.java +++ b/main/src/cgeo/geocaching/cgBase.java @@ -52,6 +52,7 @@ import android.os.Handler; import android.os.Message; import android.text.Html; import android.text.Spannable; +import android.text.Spanned; import android.text.format.DateUtils; import android.text.style.StrikethroughSpan; import android.util.Log; @@ -863,7 +864,7 @@ public class cgBase { if (cache.nameSp == null) { cache.nameSp = (new Spannable.Factory()).newSpannable(cache.name); if (cache.disabled || cache.archived) { // strike - cache.nameSp.setSpan(new StrikethroughSpan(), 0, cache.nameSp.toString().length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); + cache.nameSp.setSpan(new StrikethroughSpan(), 0, cache.nameSp.toString().length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); } } diff --git a/main/src/cgeo/geocaching/cgCacheListAdapter.java b/main/src/cgeo/geocaching/cgCacheListAdapter.java index 98b5e5b..d361822 100644 --- a/main/src/cgeo/geocaching/cgCacheListAdapter.java +++ b/main/src/cgeo/geocaching/cgCacheListAdapter.java @@ -16,6 +16,7 @@ import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.drawable.Drawable; import android.text.Spannable; +import android.text.Spanned; import android.text.style.StrikethroughSpan; import android.util.DisplayMetrics; import android.util.Log; @@ -463,7 +464,7 @@ public class cgCacheListAdapter extends ArrayAdapter<cgCache> { if (cache.nameSp == null) { cache.nameSp = (new Spannable.Factory()).newSpannable(cache.name); if (cache.disabled || cache.archived) { // strike - cache.nameSp.setSpan(new StrikethroughSpan(), 0, cache.nameSp.toString().length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); + cache.nameSp.setSpan(new StrikethroughSpan(), 0, cache.nameSp.toString().length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); } } diff --git a/main/src/cgeo/geocaching/cgeoauth.java b/main/src/cgeo/geocaching/cgeoauth.java index 832fa78..3d8b15b 100644 --- a/main/src/cgeo/geocaching/cgeoauth.java +++ b/main/src/cgeo/geocaching/cgeoauth.java @@ -22,6 +22,7 @@ import java.io.InputStream; import java.io.InputStreamReader; import java.io.OutputStream; import java.io.OutputStreamWriter; +import java.net.HttpURLConnection; import java.net.URL; import java.net.URLConnection; import java.util.HashMap; @@ -164,7 +165,7 @@ public class cgeoauth extends AbstractActivity { // connection.setHostnameVerifier(base.doNotVerify); connection.setReadTimeout(30000); connection.setRequestMethod(method); - HttpsURLConnection.setFollowRedirects(true); + HttpURLConnection.setFollowRedirects(true); connection.setDoInput(true); connection.setDoOutput(false); @@ -261,7 +262,7 @@ public class cgeoauth extends AbstractActivity { // connection.setHostnameVerifier(base.doNotVerify); connection.setReadTimeout(30000); connection.setRequestMethod(method); - HttpsURLConnection.setFollowRedirects(true); + HttpURLConnection.setFollowRedirects(true); connection.setDoOutput(true); connection.setDoInput(true); diff --git a/main/src/cgeo/geocaching/cgeodetail.java b/main/src/cgeo/geocaching/cgeodetail.java index c2a231f..0704057 100644 --- a/main/src/cgeo/geocaching/cgeodetail.java +++ b/main/src/cgeo/geocaching/cgeodetail.java @@ -658,7 +658,7 @@ public class cgeodetail extends AbstractActivity { itemName.setText(res.getString(R.string.cache_name)); Spannable span = (new Spannable.Factory()).newSpannable(Html.fromHtml(cache.name).toString()); if (cache.disabled || cache.archived) { // strike - span.setSpan(new StrikethroughSpan(), 0, span.toString().length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); + span.setSpan(new StrikethroughSpan(), 0, span.toString().length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); } itemValue.setText(span); detailsList.addView(itemLayout); |