mirror of
https://github.com/apache/cordova-android.git
synced 2025-01-31 17:32:51 +08:00
fixed geolocation null bug
This commit is contained in:
parent
020178e40b
commit
4ff406f9df
@ -78,7 +78,7 @@ public class GeoListener {
|
|||||||
loc = mGps.getLocation();
|
loc = mGps.getLocation();
|
||||||
if (loc == null && mNetwork != null)
|
if (loc == null && mNetwork != null)
|
||||||
loc = mNetwork.getLocation();
|
loc = mNetwork.getLocation();
|
||||||
else
|
if(loc == null)
|
||||||
loc = new Location(LocationManager.NETWORK_PROVIDER);
|
loc = new Location(LocationManager.NETWORK_PROVIDER);
|
||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user