Skip to content

Commit

Permalink
Move TimePickerAndroid to FB internal
Browse files Browse the repository at this point in the history
Summary:
Moving TimePickerAndroid to FB internal.

Changelog:
[Android][Changed] - Moved TimePickerAndroid to FB internal.

Reviewed By: cpojer

Differential Revision: D21504128

fbshipit-source-id: 400c6ee7cff96a0d6b4205f7806ef8951b611b8c
  • Loading branch information
Jacek Burys authored and facebook-github-bot committed May 27, 2020
1 parent 1a77943 commit c8fed9e
Show file tree
Hide file tree
Showing 16 changed files with 0 additions and 729 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2378,39 +2378,6 @@ + (RCTManagedPointer *)JS_NativeStatusBarManagerIOS_SpecGetHeightCallbackResult:

} // namespace react
} // namespace facebook
@implementation RCTCxxConvert (NativeTimePickerAndroid_TimePickerOptions)
+ (RCTManagedPointer *)JS_NativeTimePickerAndroid_TimePickerOptions:(id)json
{
return facebook::react::managedPointer<JS::NativeTimePickerAndroid::TimePickerOptions>(json);
}
@end
namespace facebook {
namespace react {


static facebook::jsi::Value __hostFunction_NativeTimePickerAndroidSpecJSI_open(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "open", @selector(open:resolve:reject:), args, count);
}


NativeTimePickerAndroidSpecJSI::NativeTimePickerAndroidSpecJSI(const ObjCTurboModule::InitParams &params)
: ObjCTurboModule(params) {

methodMap_["open"] = MethodMetadata {1, __hostFunction_NativeTimePickerAndroidSpecJSI_open};

setMethodArgConversionSelector(@"open", 0, @"JS_NativeTimePickerAndroid_TimePickerOptions:");


}

} // namespace react
} // namespace facebook
@implementation RCTCxxConvert (NativeTimePickerAndroid_TimePickerResult)
+ (RCTManagedPointer *)JS_NativeTimePickerAndroid_TimePickerResult:(id)json
{
return facebook::react::managedPointer<JS::NativeTimePickerAndroid::TimePickerResult>(json);
}
@end
namespace facebook {
namespace react {

Expand Down
92 changes: 0 additions & 92 deletions Libraries/FBReactNativeSpec/FBReactNativeSpec/FBReactNativeSpec.h
Original file line number Diff line number Diff line change
Expand Up @@ -2525,63 +2525,6 @@ namespace facebook {
};
} // namespace react
} // namespace facebook

namespace JS {
namespace NativeTimePickerAndroid {
struct TimePickerOptions {
folly::Optional<double> hour() const;
folly::Optional<double> minute() const;
folly::Optional<bool> is24Hour() const;
NSString *mode() const;

TimePickerOptions(NSDictionary *const v) : _v(v) {}
private:
NSDictionary *_v;
};
}
}

@interface RCTCxxConvert (NativeTimePickerAndroid_TimePickerOptions)
+ (RCTManagedPointer *)JS_NativeTimePickerAndroid_TimePickerOptions:(id)json;
@end
@protocol NativeTimePickerAndroidSpec <RCTBridgeModule, RCTTurboModule>

- (void)open:(JS::NativeTimePickerAndroid::TimePickerOptions &)options
resolve:(RCTPromiseResolveBlock)resolve
reject:(RCTPromiseRejectBlock)reject;

@end
namespace facebook {
namespace react {
/**
* ObjC++ class for module 'TimePickerAndroid'
*/

class JSI_EXPORT NativeTimePickerAndroidSpecJSI : public ObjCTurboModule {
public:
NativeTimePickerAndroidSpecJSI(const ObjCTurboModule::InitParams &params);

};
} // namespace react
} // namespace facebook

namespace JS {
namespace NativeTimePickerAndroid {
struct TimePickerResult {
NSString *action() const;
double hour() const;
double minute() const;

TimePickerResult(NSDictionary *const v) : _v(v) {}
private:
NSDictionary *_v;
};
}
}

@interface RCTCxxConvert (NativeTimePickerAndroid_TimePickerResult)
+ (RCTManagedPointer *)JS_NativeTimePickerAndroid_TimePickerResult:(id)json;
@end
@protocol NativeTimingSpec <RCTBridgeModule, RCTTurboModule>

- (void)createTimer:(double)callbackID
Expand Down Expand Up @@ -3797,41 +3740,6 @@ inline JS::NativeStatusBarManagerIOS::Constants::Builder::Builder(const Input i)
inline JS::NativeStatusBarManagerIOS::Constants::Builder::Builder(Constants i) : _factory(^{
return i.unsafeRawValue();
}) {}
inline folly::Optional<double> JS::NativeTimePickerAndroid::TimePickerOptions::hour() const
{
id const p = _v[@"hour"];
return RCTBridgingToOptionalDouble(p);
}
inline folly::Optional<double> JS::NativeTimePickerAndroid::TimePickerOptions::minute() const
{
id const p = _v[@"minute"];
return RCTBridgingToOptionalDouble(p);
}
inline folly::Optional<bool> JS::NativeTimePickerAndroid::TimePickerOptions::is24Hour() const
{
id const p = _v[@"is24Hour"];
return RCTBridgingToOptionalBool(p);
}
inline NSString *JS::NativeTimePickerAndroid::TimePickerOptions::mode() const
{
id const p = _v[@"mode"];
return RCTBridgingToString(p);
}
inline NSString *JS::NativeTimePickerAndroid::TimePickerResult::action() const
{
id const p = _v[@"action"];
return RCTBridgingToString(p);
}
inline double JS::NativeTimePickerAndroid::TimePickerResult::hour() const
{
id const p = _v[@"hour"];
return RCTBridgingToDouble(p);
}
inline double JS::NativeTimePickerAndroid::TimePickerResult::minute() const
{
id const p = _v[@"minute"];
return RCTBridgingToDouble(p);
}
inline JS::NativeToastAndroid::Constants::Builder::Builder(const Input i) : _factory(^{
NSMutableDictionary *d = [NSMutableDictionary new];
auto SHORT = i.SHORT.get();
Expand Down
34 changes: 0 additions & 34 deletions Libraries/TimePickerAndroid/NativeTimePickerAndroid.js

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ rn_android_library(
react_native_target("java/com/facebook/react/modules/deviceinfo:deviceinfo"),
react_native_target("java/com/facebook/react/modules/share:share"),
react_native_target("java/com/facebook/react/modules/systeminfo:systeminfo"),
react_native_target("java/com/facebook/react/modules/timepicker:timepicker"),
react_native_target("java/com/facebook/react/touch:touch"),
react_native_target("java/com/facebook/react/uimanager:uimanager"),
react_native_target("java/com/facebook/react/uimanager/annotations:annotations"),
Expand Down

This file was deleted.

This file was deleted.

Loading

0 comments on commit c8fed9e

Please sign in to comment.