Google shit again.

This commit is contained in:
2021-03-17 21:42:01 +01:00
parent 4e51cbe36e
commit 810b6f03aa
5 changed files with 143 additions and 45 deletions

View File

@ -114,7 +114,14 @@ public class CellLocationChangedReceiver extends PhoneStateListener
myLocationManager = (LocationManager) AutomationService.getInstance().getSystemService(Context.LOCATION_SERVICE);
currentLocation = getLocation("coarse");
AutomationService.getInstance().getLocationProvider().setCurrentLocation(currentLocation, false);
try
{
AutomationService.getInstance().getLocationProvider().setCurrentLocation(currentLocation, false);
}
catch(NullPointerException e)
{
Miscellaneous.logEvent("e", "LocationProvider", "Location provider is null: " + Log.getStackTraceString(e), 1);
}
}
else
{
@ -123,7 +130,6 @@ public class CellLocationChangedReceiver extends PhoneStateListener
}
}
public Location getLocation(String accuracy)
{
Criteria crit = new Criteria();