#934 - Setting SDK Minimum to API 15. Removing TargetApi Annotations.
This commit is contained in:
@@ -12,7 +12,7 @@ POM_LICENCE_DIST=repo
|
||||
POM_DEVELOPER_ID=mapbox
|
||||
POM_DEVELOPER_NAME=Mapbox
|
||||
|
||||
ANDROID_MIN_SDK=10
|
||||
ANDROID_MIN_SDK=15
|
||||
ANDROID_BUILD_TARGET_SDK_VERSION=23
|
||||
ANDROID_BUILD_TOOLS_VERSION=23
|
||||
ANDROID_BUILD_SDK_VERSION=23
|
||||
|
||||
@@ -209,7 +209,6 @@ public class MapView extends FrameLayout implements LocationListener {
|
||||
//
|
||||
|
||||
// Common initialization code goes here
|
||||
@TargetApi(16)
|
||||
private void initialize(Context context, AttributeSet attrs) {
|
||||
|
||||
// Save the context
|
||||
@@ -236,12 +235,11 @@ public class MapView extends FrameLayout implements LocationListener {
|
||||
ActivityManager.MemoryInfo memoryInfo = new ActivityManager.MemoryInfo();
|
||||
ActivityManager activityManager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
|
||||
activityManager.getMemoryInfo(memoryInfo);
|
||||
long maxMemory = memoryInfo.availMem;
|
||||
if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
|
||||
long totalMemory = memoryInfo.totalMem;
|
||||
mNativeMapView = new NativeMapView(this, cachePath, dataPath, apkPath, mScreenDensity, availableProcessors, totalMemory);
|
||||
} else {
|
||||
throw new RuntimeException("Need to implement totalMemory on pre-Jelly Bean devices.");
|
||||
maxMemory = memoryInfo.totalMem;
|
||||
}
|
||||
mNativeMapView = new NativeMapView(this, cachePath, dataPath, apkPath, mScreenDensity, availableProcessors, maxMemory);
|
||||
|
||||
// Ensure this view is interactable
|
||||
setClickable(true);
|
||||
@@ -776,7 +774,6 @@ public class MapView extends FrameLayout implements LocationListener {
|
||||
}
|
||||
}
|
||||
|
||||
@TargetApi(9)
|
||||
private class Callbacks2 extends Callbacks implements SurfaceHolder.Callback2 {
|
||||
|
||||
// Called when we need to redraw the view
|
||||
@@ -843,7 +840,7 @@ public class MapView extends FrameLayout implements LocationListener {
|
||||
}
|
||||
|
||||
// Called when user touches the screen, all positions are absolute
|
||||
@Override @TargetApi(14)
|
||||
@Override
|
||||
public boolean onTouchEvent(@NonNull MotionEvent event) {
|
||||
// Check and ignore non touch or left clicks
|
||||
if ((android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) && (event.getButtonState() != 0) && (event.getButtonState() != MotionEvent.BUTTON_PRIMARY)) {
|
||||
@@ -1396,7 +1393,7 @@ public class MapView extends FrameLayout implements LocationListener {
|
||||
|
||||
// Called when the mouse pointer enters or exits the view
|
||||
// or when it fades in or out due to movement
|
||||
@Override @TargetApi(14)
|
||||
@Override
|
||||
public boolean onHoverEvent(@NonNull MotionEvent event) {
|
||||
switch (event.getActionMasked()) {
|
||||
case MotionEvent.ACTION_HOVER_ENTER:
|
||||
|
||||
@@ -47,7 +47,7 @@ android {
|
||||
|
||||
defaultConfig {
|
||||
applicationId "com.mapbox.mapboxgl.testapp"
|
||||
minSdkVersion 10
|
||||
minSdkVersion 15
|
||||
targetSdkVersion 23
|
||||
versionCode 4
|
||||
versionName "0.1.3"
|
||||
|
||||
Reference in New Issue
Block a user