Commit aca61c15 by Maurits van Beusekom Committed by GitHub

Merge pull request #236 from ened/fix/235

Resolve ServiceManager issue for Android 4.4+ to <Pie
parents d4e35128 4b16c483
......@@ -80,7 +80,7 @@ final class ServiceManager {
return locationManager.isLocationEnabled();
} else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
return isLocationServiceEnablePrePie(context);
return isLocationServiceEnabledKitKat(context);
} else {
return isLocationServiceEnablePreKitKat(context);
}
......@@ -89,10 +89,11 @@ final class ServiceManager {
// Suppress deprecation warnings since it's purpose is to support to be backwards compatible with
// pre Pie versions of Android.
@SuppressWarnings("deprecation")
private static boolean isLocationServiceEnablePrePie(Context context)
private static boolean isLocationServiceEnabledKitKat(Context context)
{
if (VERSION.SDK_INT < VERSION_CODES.P)
if (Build.VERSION.SDK_INT < VERSION_CODES.KITKAT) {
return false;
}
final int locationMode;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment