[android] - add instrumentation tests for FileSource activation/deactivation
This commit is contained in:
@@ -6,6 +6,8 @@ import android.content.pm.PackageManager;
|
||||
import android.content.res.AssetManager;
|
||||
import android.os.Environment;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.UiThread;
|
||||
|
||||
import com.mapbox.mapboxsdk.Mapbox;
|
||||
import com.mapbox.mapboxsdk.constants.MapboxConstants;
|
||||
import timber.log.Timber;
|
||||
@@ -43,6 +45,7 @@ public class FileSource {
|
||||
* @param context the context to derive the cache path from
|
||||
* @return the single instance of FileSource
|
||||
*/
|
||||
@UiThread
|
||||
public static synchronized FileSource getInstance(Context context) {
|
||||
if (INSTANCE == null) {
|
||||
String cachePath = getCachePath(context);
|
||||
@@ -122,6 +125,8 @@ public class FileSource {
|
||||
initialize(Mapbox.getAccessToken(), cachePath, assetManager);
|
||||
}
|
||||
|
||||
public native boolean isActivated();
|
||||
|
||||
public native void activate();
|
||||
|
||||
public native void deactivate();
|
||||
|
||||
Reference in New Issue
Block a user