mirror of
https://github.com/ClaytonWWilson/Listify.git
synced 2025-12-13 09:48:47 +00:00
Merge pull request #161 from ClaytonWWilson/update-user-location
Added temporary fix to ACCESS_FINE_LOCATION permission error
This commit is contained in:
commit
7c23d3dfdf
@ -94,7 +94,17 @@ public class MainActivity extends AppCompatActivity implements CreateListDialogF
|
||||
0
|
||||
);
|
||||
}
|
||||
Location location = lm.getLastKnownLocation(LocationManager.GPS_PROVIDER);
|
||||
Location location;
|
||||
|
||||
while(true) {
|
||||
try {
|
||||
location = lm.getLastKnownLocation(LocationManager.GPS_PROVIDER);
|
||||
break;
|
||||
} catch(java.lang.SecurityException e) {
|
||||
//User clicked delete
|
||||
}
|
||||
}
|
||||
|
||||
if(location != null) {
|
||||
double longitude = location.getLongitude();
|
||||
double latitude = location.getLatitude();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user