mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-14 12:11:47 +08:00
Reverted commit D3334273
Reviewed By: astreet Differential Revision: D3334273 fbshipit-source-id: a3849604ea89db74900850c294685e7da9aeeacc
This commit is contained in:
committed by
Facebook Github Bot 7
parent
757ab0b936
commit
705daabbb1
@@ -50,7 +50,6 @@ import com.facebook.react.bridge.WritableArray;
|
||||
import com.facebook.react.bridge.WritableMap;
|
||||
import com.facebook.react.bridge.WritableNativeArray;
|
||||
import com.facebook.react.bridge.WritableNativeMap;
|
||||
import com.facebook.react.bridge.annotations.ReactModule;
|
||||
import com.facebook.react.common.ReactConstants;
|
||||
|
||||
// TODO #6015104: rename to something less iOSish
|
||||
@@ -58,7 +57,6 @@ import com.facebook.react.common.ReactConstants;
|
||||
* {@link NativeModule} that allows JS to interact with the photos on the device (i.e.
|
||||
* {@link MediaStore.Images}).
|
||||
*/
|
||||
@ReactModule(name = "RKCameraRollManager")
|
||||
public class CameraRollManager extends ReactContextBaseJavaModule {
|
||||
|
||||
private static final String ERROR_UNABLE_TO_LOAD = "E_UNABLE_TO_LOAD";
|
||||
@@ -100,6 +98,11 @@ public class CameraRollManager extends ReactContextBaseJavaModule {
|
||||
super(reactContext);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "RKCameraRollManager";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getConstants() {
|
||||
return Collections.emptyMap();
|
||||
@@ -437,4 +440,5 @@ public class CameraRollManager extends ReactContextBaseJavaModule {
|
||||
node.putMap("location", location);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -46,13 +46,11 @@ import com.facebook.react.bridge.ReactMethod;
|
||||
import com.facebook.react.bridge.JSApplicationIllegalArgumentException;
|
||||
import com.facebook.react.bridge.ReadableMap;
|
||||
import com.facebook.infer.annotation.Assertions;
|
||||
import com.facebook.react.bridge.annotations.ReactModule;
|
||||
import com.facebook.react.common.ReactConstants;
|
||||
|
||||
/**
|
||||
* Native module that provides image cropping functionality.
|
||||
*/
|
||||
@ReactModule(name = "RKImageEditingManager")
|
||||
public class ImageEditingManager extends ReactContextBaseJavaModule {
|
||||
|
||||
private static final List<String> LOCAL_URI_PREFIXES = Arrays.asList(
|
||||
@@ -91,11 +89,17 @@ public class ImageEditingManager extends ReactContextBaseJavaModule {
|
||||
ExifInterface.TAG_WHITE_BALANCE
|
||||
};
|
||||
|
||||
|
||||
public ImageEditingManager(ReactApplicationContext reactContext) {
|
||||
super(reactContext);
|
||||
new CleanTask(getReactApplicationContext()).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "RKImageEditingManager";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getConstants() {
|
||||
return Collections.emptyMap();
|
||||
@@ -278,6 +282,7 @@ public class ImageEditingManager extends ReactContextBaseJavaModule {
|
||||
}
|
||||
|
||||
mSuccess.invoke(Uri.fromFile(tempFile).toString());
|
||||
|
||||
} catch (Exception e) {
|
||||
mError.invoke(e.getMessage());
|
||||
}
|
||||
|
||||
@@ -27,9 +27,7 @@ import com.facebook.react.bridge.ReactApplicationContext;
|
||||
import com.facebook.react.bridge.ReactContext;
|
||||
import com.facebook.react.bridge.ReactContextBaseJavaModule;
|
||||
import com.facebook.react.bridge.ReactMethod;
|
||||
import com.facebook.react.bridge.annotations.ReactModule;
|
||||
|
||||
@ReactModule(name = "ImageStoreManager")
|
||||
public class ImageStoreManager extends ReactContextBaseJavaModule {
|
||||
|
||||
private static final int BUFFER_SIZE = 8192;
|
||||
@@ -38,6 +36,11 @@ public class ImageStoreManager extends ReactContextBaseJavaModule {
|
||||
super(reactContext);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "ImageStoreManager";
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate the base64 representation for an image. The "tag" comes from iOS naming.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user