diff options
Diffstat (limited to 'platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/sources/Source.java')
-rw-r--r-- | platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/sources/Source.java | 91 |
1 files changed, 0 insertions, 91 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/sources/Source.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/sources/Source.java deleted file mode 100644 index 7d5838541b..0000000000 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/sources/Source.java +++ /dev/null @@ -1,91 +0,0 @@ -package com.mapbox.mapboxsdk.style.sources; - -import android.support.annotation.Keep; -import android.support.annotation.NonNull; -import com.mapbox.mapboxsdk.LibraryLoader; -import com.mapbox.mapboxsdk.utils.ThreadUtils; - -/** - * Base Peer class for sources. see source.hpp for the other half of the peer. - */ -public abstract class Source { - - private static final String TAG = "Mbgl-Source"; - - @Keep - private long nativePtr; - - protected boolean detached; - - static { - LibraryLoader.load(); - } - - /** - * Internal use - * - * @param nativePtr - pointer to native peer - */ - @Keep - protected Source(long nativePtr) { - checkThread(); - this.nativePtr = nativePtr; - } - - public Source() { - checkThread(); - } - - /** - * Validates if source interaction is happening on the UI thread - */ - protected void checkThread() { - ThreadUtils.checkThread(TAG); - } - - /** - * Retrieve the source id - * - * @return the source id - */ - @NonNull - public String getId() { - checkThread(); - return nativeGetId(); - } - - /** - * Retrieve the source attribution. - * <p> - * Will return an empty String if no attribution is available. - * </p> - * - * @return the string representation of the attribution in html format - */ - @NonNull - public String getAttribution() { - checkThread(); - return nativeGetAttribution(); - } - - /** - * Internal use - * - * @return the native peer pointer - */ - public long getNativePtr() { - return nativePtr; - } - - @NonNull - @Keep - protected native String nativeGetId(); - - @NonNull - @Keep - protected native String nativeGetAttribution(); - - public void setDetached() { - detached = true; - } -} |