isLocationEnabled
Returns the current enabled/disabled state of location.
NOTE: Calling this method on API levels prior to 20 may require the ACCESS_FINE_LOCATION or ACCESS_COARSE_LOCATION permission if run on non-standard Android devices. The vast majority of devices should not require either permission to be present for this method.
Return
true
if location is enabled or false
if location is disabled