mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 12:23:58 +01:00
Add catch for SecurityException
This commit is contained in:
parent
e27b417a9a
commit
7592b0bae1
1 changed files with 8 additions and 2 deletions
|
|
@ -63,13 +63,19 @@ public class GPSExtractor {
|
|||
if (location != null) {
|
||||
myLocationListener.onLocationChanged(location);
|
||||
}
|
||||
} catch (IllegalArgumentException e){
|
||||
} catch (IllegalArgumentException e) {
|
||||
Log.e(TAG, "Illegal argument exception", e);
|
||||
} catch (SecurityException e) {
|
||||
Log.e(TAG, "Security exception", e);
|
||||
}
|
||||
}
|
||||
|
||||
protected void unregisterLocationManager() {
|
||||
try {
|
||||
locationManager.removeUpdates(myLocationListener);
|
||||
} catch (SecurityException e) {
|
||||
Log.e(TAG, "Security exception", e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue