package com.example.smart.image;
|
|
import android.content.Context;
|
|
import com.luck.picture.lib.engine.UriToFileTransformEngine;
|
import com.luck.picture.lib.interfaces.OnKeyValueResultCallbackListener;
|
import com.luck.picture.lib.utils.SandboxTransformUtils;
|
|
/**
|
* 沙盒引擎 访问沙盒外资源
|
*/
|
public class SandboxEngine implements UriToFileTransformEngine {
|
@Override
|
public void onUriToFileAsyncTransform(Context context, String srcPath, String mineType, OnKeyValueResultCallbackListener call) {
|
if (call != null) {
|
String sandboxPath = SandboxTransformUtils.copyPathToSandbox(context, srcPath, mineType);
|
call.onCallback(srcPath, sandboxPath);
|
}
|
}
|
}
|