[android] - add instrumentation tests for FileSource activation/deactivation

This commit is contained in:
Tobrun
2018-01-17 14:51:05 +01:00
committed by Tobrun
parent 17e5ae84af
commit 06213d9145
10 changed files with 202 additions and 40 deletions

View File

@@ -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();