aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/MainActivity.java
diff options
context:
space:
mode:
Diffstat (limited to 'main/src/cgeo/geocaching/MainActivity.java')
-rw-r--r--main/src/cgeo/geocaching/MainActivity.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/main/src/cgeo/geocaching/MainActivity.java b/main/src/cgeo/geocaching/MainActivity.java
index a3daf97..b6f267a 100644
--- a/main/src/cgeo/geocaching/MainActivity.java
+++ b/main/src/cgeo/geocaching/MainActivity.java
@@ -47,6 +47,7 @@ import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
+import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
@@ -141,7 +142,7 @@ public class MainActivity extends AbstractActivity {
navLocation.setText(StringUtils.join(addressParts, ", "));
}
- } catch (Exception e) {
+ } catch (RuntimeException e) {
// nothing
}
@@ -542,7 +543,7 @@ public class MainActivity extends AbstractActivity {
navAccuracy.setText(null);
navLocation.setText(res.getString(R.string.loc_trying));
}
- } catch (Exception e) {
+ } catch (RuntimeException e) {
Log.w("Failed to update location.");
}
}
@@ -721,7 +722,7 @@ public class MainActivity extends AbstractActivity {
final Geocoder geocoder = new Geocoder(MainActivity.this, Locale.getDefault());
final Geopoint coords = app.currentGeo().getCoords();
addresses = geocoder.getFromLocation(coords.getLatitude(), coords.getLongitude(), 1);
- } catch (Exception e) {
+ } catch (IOException e) {
Log.i("Failed to obtain address");
}
@@ -736,7 +737,7 @@ public class MainActivity extends AbstractActivity {
* unused here but needed since this method is referenced from XML layout
*/
public void showAbout(final View view) {
- AboutActivity_.intent(this).start();
+ startActivity(new Intent(this, AboutActivity.class));
}
/**