[android] lift Parcelable inheritance to the OfflineRegionDefinition
This commit is contained in:
committed by
Łukasz Paczos
parent
3a77ea6ff7
commit
943cd0d66c
@@ -1,11 +1,10 @@
|
||||
package com.mapbox.mapboxsdk.offline;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import android.support.annotation.Keep;
|
||||
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
|
||||
import com.mapbox.geojson.Feature;
|
||||
import com.mapbox.geojson.Geometry;
|
||||
import com.mapbox.mapboxsdk.geometry.LatLngBounds;
|
||||
@@ -24,7 +23,7 @@ import com.mapbox.turf.TurfMeasurement;
|
||||
* <p>
|
||||
* if includeIdeographs is false, offline region will not include CJK glyphs
|
||||
*/
|
||||
public class OfflineGeometryRegionDefinition implements OfflineRegionDefinition, Parcelable {
|
||||
public class OfflineGeometryRegionDefinition implements OfflineRegionDefinition {
|
||||
|
||||
@Keep
|
||||
private String styleURL;
|
||||
@@ -104,6 +103,7 @@ public class OfflineGeometryRegionDefinition implements OfflineRegionDefinition,
|
||||
/**
|
||||
* Calculates the bounding box for the Geometry it contains
|
||||
* to retain backwards compatibility
|
||||
*
|
||||
* @return the {@link LatLngBounds} or null
|
||||
*/
|
||||
@Nullable
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
package com.mapbox.mapboxsdk.offline;
|
||||
|
||||
import android.os.Parcelable;
|
||||
import android.support.annotation.Keep;
|
||||
|
||||
import com.mapbox.mapboxsdk.geometry.LatLngBounds;
|
||||
import com.mapbox.mapboxsdk.maps.MapboxMapOptions;
|
||||
|
||||
/**
|
||||
* This is the interface that all Offline Region definitions have to implement.
|
||||
@@ -10,7 +12,7 @@ import com.mapbox.mapboxsdk.geometry.LatLngBounds;
|
||||
* For the present, a tile pyramid is the only type of offline region.
|
||||
*/
|
||||
@Keep
|
||||
public interface OfflineRegionDefinition {
|
||||
public interface OfflineRegionDefinition extends Parcelable {
|
||||
|
||||
/**
|
||||
* Gets the bounds of the OfflineRegion.
|
||||
@@ -56,7 +58,7 @@ public interface OfflineRegionDefinition {
|
||||
* Defaults to `true`
|
||||
*
|
||||
* @return true if offline region will include ideographic glyphs
|
||||
* @see MapboxMapOptions localIdeographFontFamily
|
||||
* @see MapboxMapOptions#localIdeographFontFamily(String)
|
||||
*/
|
||||
boolean getIncludeIdeographs();
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@ package com.mapbox.mapboxsdk.offline;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import android.support.annotation.Keep;
|
||||
|
||||
import android.support.annotation.NonNull;
|
||||
|
||||
import com.mapbox.mapboxsdk.geometry.LatLng;
|
||||
import com.mapbox.mapboxsdk.geometry.LatLngBounds;
|
||||
|
||||
@@ -21,7 +21,7 @@ import com.mapbox.mapboxsdk.geometry.LatLngBounds;
|
||||
* <p>
|
||||
* if includeIdeographs is false, offline region will not include CJK glyphs
|
||||
*/
|
||||
public class OfflineTilePyramidRegionDefinition implements OfflineRegionDefinition, Parcelable {
|
||||
public class OfflineTilePyramidRegionDefinition implements OfflineRegionDefinition {
|
||||
|
||||
@Keep
|
||||
private String styleURL;
|
||||
|
||||
Reference in New Issue
Block a user