Unit test fixes
This commit is contained in:
@@ -21,7 +21,6 @@ import java.util.Set;
|
||||
*/
|
||||
public class AttributionParser {
|
||||
|
||||
private static final String IMPROVE_THIS_MAP = "Improve this map";
|
||||
private final WeakReference<Context> context;
|
||||
private final Set<Attribution> attributions = new LinkedHashSet<>();
|
||||
private final String attributionData;
|
||||
@@ -120,16 +119,6 @@ public class AttributionParser {
|
||||
return isValidForImproveThisMap(url) && isValidForMapbox(url);
|
||||
}
|
||||
|
||||
/**
|
||||
* Invoked to validate if an anchor is equal to Improve this map coming from tilesets.
|
||||
*
|
||||
* @param anchor the anchor to be validated
|
||||
* @return if the url is valid
|
||||
*/
|
||||
private boolean isImproveThisMapAnchor(String anchor) {
|
||||
return anchor.equals(IMPROVE_THIS_MAP);
|
||||
}
|
||||
|
||||
/**
|
||||
* Invoked to validate if an url is valid for the improve map configuration.
|
||||
*
|
||||
|
||||
@@ -10,6 +10,7 @@ import android.util.Log;
|
||||
|
||||
import androidx.core.app.ActivityCompat;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.core.os.BuildCompat;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
@@ -55,7 +56,7 @@ public class PermissionsManager {
|
||||
}
|
||||
|
||||
public static boolean isBackgroundLocationPermissionGranted(Context context) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
|
||||
if (Build.VERSION.SDK_INT >= 29) {
|
||||
return isPermissionGranted(context, BACKGROUND_LOCATION_PERMISSION);
|
||||
}
|
||||
|
||||
@@ -106,7 +107,7 @@ public class PermissionsManager {
|
||||
permissions.add(COARSE_LOCATION_PERMISSION);
|
||||
}
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q && requestBackgroundLocation) {
|
||||
if (Build.VERSION.SDK_INT >= 29 && requestBackgroundLocation) {
|
||||
permissions.add(BACKGROUND_LOCATION_PERMISSION);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user