Skip to content

Commit

Permalink
Merge pull request #130 from juanitobananas/SecurityException-and-not…
Browse files Browse the repository at this point in the history
…-general-Exception

Catch SecurityExceptions instead of just Exceptions
  • Loading branch information
martykan committed Aug 23, 2016
2 parents c33ca5a + 0847677 commit f4f6f42
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ protected void onDestroy() {
if (locationManager != null) {
try {
locationManager.removeUpdates(MainActivity.this);
} catch (Exception e) {
} catch (SecurityException e) {
e.printStackTrace();
}
}
Expand Down Expand Up @@ -741,7 +741,7 @@ void getCityByLocation() {
public void onClick(DialogInterface dialogInterface, int i) {
try {
locationManager.removeUpdates(MainActivity.this);
} catch (Exception e) {
} catch (SecurityException e) {
e.printStackTrace();
}
}
Expand Down

0 comments on commit f4f6f42

Please sign in to comment.