@Before
public void setup() {
ModuleHolder moduleHolder = new ModuleHolder("MethodsModule",
false,
false,
false,
false,
new Provider<MethodsModule>() {
MethodsModule mModule;
@Override
public MethodsModule get() {
mModule = new MethodsModule();
return mModule;
}
});
mWrapper = new JavaModuleWrapper(null, MethodsModule.class, moduleHolder);
mMethods = mWrapper.getMethodDescriptors();
PowerMockito.mockStatic(SoLoader.class);
mArguments = PowerMockito.mock(ReadableNativeArray.class);
}
java类com.facebook.soloader.SoLoader的实例源码
BaseJavaModuleTest.java 文件源码
项目:RNLearn_Project1
阅读 38
收藏 0
点赞 0
评论 0
StaticWebpNativeLoader.java 文件源码
项目:fresco
阅读 35
收藏 0
点赞 0
评论 0
public static synchronized void ensure() {
if (!sInitialized) {
// On Android 4.1.2 the loading of the static-webp native library can fail because
// of the dependency with fb_jpegturbo. In this case we have to explicitely load that
// library
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.JELLY_BEAN) {
try {
SoLoader.loadLibrary("fb_jpegturbo");
} catch (UnsatisfiedLinkError error) {
// Head in the sand
}
}
SoLoader.loadLibrary("static-webp");
sInitialized = true;
}
}
App.java 文件源码
项目:redux-observable
阅读 33
收藏 0
点赞 0
评论 0
@Override
public void onCreate() {
super.onCreate();
initTimber();
SoLoader.init(this, false);
Stetho.initialize(
Stetho.newInitializerBuilder(this)
.enableWebKitInspector(new LithoWebKitInspector(this))
.build());
Fresco.initialize(this);
appComponent = makeAppComponent();
}
ConcealIntPreferenceTest.java 文件源码
项目:Patrons
阅读 31
收藏 0
点赞 0
评论 0
@Before public void setUp() throws Exception {
SoLoader.init(InstrumentationRegistry.getContext(), false);
final SharedPreferences prefs =
PreferenceManager.getDefaultSharedPreferences(InstrumentationRegistry.getContext());
final Crypto crypto = AndroidConceal
.get()
.createDefaultCrypto(new SharedPrefsBackedKeyChain(
InstrumentationRegistry.getContext(),
CryptoConfig.KEY_256
));
factory = new ConcealPreferenceFactory(crypto, prefs);
}
ConcealFloatPreferenceTest.java 文件源码
项目:Patrons
阅读 32
收藏 0
点赞 0
评论 0
@Before public void setUp() throws Exception {
SoLoader.init(InstrumentationRegistry.getContext(), false);
prefs = PreferenceManager.getDefaultSharedPreferences(InstrumentationRegistry.getContext());
crypto = AndroidConceal
.get()
.createDefaultCrypto(new SharedPrefsBackedKeyChain(
InstrumentationRegistry.getContext(),
CryptoConfig.KEY_256
));
}
ConcealStringPreferenceTest.java 文件源码
项目:Patrons
阅读 33
收藏 0
点赞 0
评论 0
@Before public void setUp() throws Exception {
SoLoader.init(InstrumentationRegistry.getContext(), false);
prefs = PreferenceManager.getDefaultSharedPreferences(InstrumentationRegistry.getContext());
crypto = AndroidConceal
.get()
.createDefaultCrypto(new SharedPrefsBackedKeyChain(
InstrumentationRegistry.getContext(),
CryptoConfig.KEY_256
));
}
ConcealBooleanPreferenceTest.java 文件源码
项目:Patrons
阅读 30
收藏 0
点赞 0
评论 0
@Before public void setUp() throws Exception {
SoLoader.init(InstrumentationRegistry.getContext(), false);
prefs = PreferenceManager.getDefaultSharedPreferences(InstrumentationRegistry.getContext());
crypto = AndroidConceal
.get()
.createDefaultCrypto(new SharedPrefsBackedKeyChain(
InstrumentationRegistry.getContext(),
CryptoConfig.KEY_256
));
}
ConcealLongPreferenceTest.java 文件源码
项目:Patrons
阅读 28
收藏 0
点赞 0
评论 0
@Before public void setUp() throws Exception {
SoLoader.init(InstrumentationRegistry.getContext(), false);
prefs = PreferenceManager.getDefaultSharedPreferences(InstrumentationRegistry.getContext());
crypto = AndroidConceal
.get()
.createDefaultCrypto(new SharedPrefsBackedKeyChain(
InstrumentationRegistry.getContext(),
CryptoConfig.KEY_256
));
}
ConcealStringSetPreferenceTest.java 文件源码
项目:Patrons
阅读 28
收藏 0
点赞 0
评论 0
@Before public void setUp() throws Exception {
SoLoader.init(InstrumentationRegistry.getContext(), false);
prefs = PreferenceManager.getDefaultSharedPreferences(InstrumentationRegistry.getContext());
crypto = AndroidConceal
.get()
.createDefaultCrypto(new SharedPrefsBackedKeyChain(
InstrumentationRegistry.getContext(),
CryptoConfig.KEY_256
));
}
MainApplication.java 文件源码
项目:react-native-growingio
阅读 35
收藏 0
点赞 0
评论 0
@Override
public void onCreate() {
super.onCreate();
SoLoader.init(this, /* native exopackage */ false);
GrowingIO.startWithConfiguration(this, new Configuration()
.useID()
.trackAllFragments()
.setChannel("应用商店"));
}
MainApplication.java 文件源码
项目:react-native-scan-doc
阅读 33
收藏 0
点赞 0
评论 0
@Override
public void onCreate() {
super.onCreate();
SoLoader.init(this, /* native exopackage */ false);
registerActivityLifecycleCallbacks(new LifecycleCallbacks(){
@Override
public void onActivityCreated(Activity activity, Bundle savedInstanceState) {
scanDocPackage.onActivityCreated(activity);
}
});
}
MainApplication.java 文件源码
项目:RNLearn_Project1
阅读 32
收藏 0
点赞 0
评论 0
@Override
public void onCreate() {
super.onCreate();
SoLoader.init(this, /* native exopackage */ false);
if (!BuildConfig.DEBUG) {
CrashReport.initCrashReport(getApplicationContext(), "900019562", false);
}
}
ReactInstanceManager.java 文件源码
项目:RNLearn_Project1
阅读 35
收藏 0
点赞 0
评论 0
private static void initializeSoLoaderIfNecessary(Context applicationContext) {
// Call SoLoader.initialize here, this is required for apps that does not use exopackage and
// does not use SoLoader for loading other native code except from the one used by React Native
// This way we don't need to require others to have additional initialization code and to
// subclass android.app.Application.
// Method SoLoader.init is idempotent, so if you wish to use native exopackage, just call
// SoLoader.init with appropriate args before initializing ReactInstanceManager
SoLoader.init(applicationContext, /* native exopackage */ false);
}
ReactTestAppShell.java 文件源码
项目:RNLearn_Project1
阅读 23
收藏 0
点赞 0
评论 0
@Override
protected void onBaseContextAttached() {
// This is a terrible hack. Don't copy it.
// It's unfortunate that Instagram does the same thing.
// We need to do this here because internal apps use SoLoader,
// and Open Source Buck uses ExopackageSoLoader.
// If you feel the need to copy this, we should refactor it
// into an FB-specific subclass of ExopackageApplication.
SoLoader.init(this, (ReactBuildConfig.EXOPACKAGE_FLAGS & 2) != 0);
}
ReactInstanceManager.java 文件源码
项目:RNLearn_Project1
阅读 35
收藏 0
点赞 0
评论 0
private static void initializeSoLoaderIfNecessary(Context applicationContext) {
// Call SoLoader.initialize here, this is required for apps that does not use exopackage and
// does not use SoLoader for loading other native code except from the one used by React Native
// This way we don't need to require others to have additional initialization code and to
// subclass android.app.Application.
// Method SoLoader.init is idempotent, so if you wish to use native exopackage, just call
// SoLoader.init with appropriate args before initializing ReactInstanceManager
SoLoader.init(applicationContext, /* native exopackage */ false);
}
ReactTestAppShell.java 文件源码
项目:RNLearn_Project1
阅读 32
收藏 0
点赞 0
评论 0
@Override
protected void onBaseContextAttached() {
// This is a terrible hack. Don't copy it.
// It's unfortunate that Instagram does the same thing.
// We need to do this here because internal apps use SoLoader,
// and Open Source Buck uses ExopackageSoLoader.
// If you feel the need to copy this, we should refactor it
// into an FB-specific subclass of ExopackageApplication.
SoLoader.init(this, (ReactBuildConfig.EXOPACKAGE_FLAGS & 2) != 0);
}
ReactInstanceManagerImpl.java 文件源码
项目:ReactNativeSignatureExample
阅读 33
收藏 0
点赞 0
评论 0
private static void initializeSoLoaderIfNecessary(Context applicationContext) {
// Call SoLoader.initialize here, this is required for apps that does not use exopackage and
// does not use SoLoader for loading other native code except from the one used by React Native
// This way we don't need to require others to have additional initialization code and to
// subclass android.app.Application.
// Method SoLoader.init is idempotent, so if you wish to use native exopackage, just call
// SoLoader.init with appropriate args before initializing ReactInstanceManagerImpl
SoLoader.init(applicationContext, /* native exopackage */ false);
}
MainApplication.java 文件源码
项目:native-navigation
阅读 42
收藏 0
点赞 0
评论 0
@Override
public void onCreate() {
super.onCreate();
SoLoader.init(this, /* native exopackage */ false);
ReactNavigationCoordinator coordinator = ReactNavigationCoordinator.sharedInstance;
coordinator.injectReactInstanceManager(mReactNativeHost.getReactInstanceManager());
coordinator.start(this);
}
ReactInstanceManagerImpl.java 文件源码
项目:react-native-ibeacon-android
阅读 31
收藏 0
点赞 0
评论 0
private static void initializeSoLoaderIfNecessary(Context applicationContext) {
// Call SoLoader.initialize here, this is required for apps that does not use exopackage and
// does not use SoLoader for loading other native code except from the one used by React Native
// This way we don't need to require others to have additional initialization code and to
// subclass android.app.Application.
// Method SoLoader.init is idempotent, so if you wish to use native exopackage, just call
// SoLoader.init with appropriate args before initializing ReactInstanceManagerImpl
SoLoader.init(applicationContext, /* native exopackage */ false);
}
ReactInstanceManagerImpl.java 文件源码
项目:react-native-box-loaders
阅读 31
收藏 0
点赞 0
评论 0
private static void initializeSoLoaderIfNecessary(Context applicationContext) {
// Call SoLoader.initialize here, this is required for apps that does not use exopackage and
// does not use SoLoader for loading other native code except from the one used by React Native
// This way we don't need to require others to have additional initialization code and to
// subclass android.app.Application.
// Method SoLoader.init is idempotent, so if you wish to use native exopackage, just call
// SoLoader.init with appropriate args before initializing ReactInstanceManagerImpl
SoLoader.init(applicationContext, /* native exopackage */ false);
}
XReactInstanceManagerImpl.java 文件源码
项目:Ironman
阅读 32
收藏 0
点赞 0
评论 0
private static void initializeSoLoaderIfNecessary(Context applicationContext) {
// Call SoLoader.initialize here, this is required for apps that does not use exopackage and
// does not use SoLoader for loading other native code except from the one used by React Native
// This way we don't need to require others to have additional initialization code and to
// subclass android.app.Application.
// Method SoLoader.init is idempotent, so if you wish to use native exopackage, just call
// SoLoader.init with appropriate args before initializing XReactInstanceManagerImpl
SoLoader.init(applicationContext, /* native exopackage */ false);
}
ReactTestAppShell.java 文件源码
项目:Ironman
阅读 26
收藏 0
点赞 0
评论 0
@Override
protected void onBaseContextAttached() {
// This is a terrible hack. Don't copy it.
// It's unfortunate that Instagram does the same thing.
// We need to do this here because internal apps use SoLoader,
// and Open Source Buck uses ExopackageSoLoader.
// If you feel the need to copy this, we should refactor it
// into an FB-specific subclass of ExopackageApplication.
SoLoader.init(this, (ReactBuildConfig.EXOPACKAGE_FLAGS & 2) != 0);
}
Fresco.java 文件源码
项目:fresco
阅读 30
收藏 0
点赞 0
评论 0
/** Initializes Fresco with the specified config. */
public static void initialize(
Context context,
@Nullable ImagePipelineConfig imagePipelineConfig,
@Nullable DraweeConfig draweeConfig) {
if (sIsInitialized) {
FLog.w(
TAG,
"Fresco has already been initialized! `Fresco.initialize(...)` should only be called " +
"1 single time to avoid memory leaks!");
} else {
sIsInitialized = true;
}
try {
SoLoader.init(context, 0);
} catch (IOException e) {
throw new RuntimeException("Could not initialize SoLoader", e);
}
// we should always use the application context to avoid memory leaks
context = context.getApplicationContext();
if (imagePipelineConfig == null) {
ImagePipelineFactory.initialize(context);
} else {
ImagePipelineFactory.initialize(imagePipelineConfig);
}
initializeDrawee(context, draweeConfig);
}
MainApplication.java 文件源码
项目:FingerPrint-Authentication-With-React-Native-Android
阅读 33
收藏 0
点赞 0
评论 0
@Override
public void onCreate() {
super.onCreate();
SoLoader.init(this, /* native exopackage */ false);
}
MainApplication.java 文件源码
项目:react-native-nearby
阅读 40
收藏 0
点赞 0
评论 0
@Override
public void onCreate() {
super.onCreate();
SoLoader.init(this, /* native exopackage */ false);
}
MainApplication.java 文件源码
项目:react-native-camera-android-simple
阅读 29
收藏 0
点赞 0
评论 0
@Override
public void onCreate() {
super.onCreate();
SoLoader.init(this, /* native exopackage */ false);
}
MainApplication.java 文件源码
项目:react-native-twitterkit
阅读 31
收藏 0
点赞 0
评论 0
@Override
public void onCreate() {
super.onCreate();
SoLoader.init(this, /* native exopackage */ false);
registerActivityLifecycleCallbacks(this);
}
MainApplication.java 文件源码
项目:ReduxSimple
阅读 26
收藏 0
点赞 0
评论 0
@Override
public void onCreate() {
super.onCreate();
SoLoader.init(this, /* native exopackage */ false);
}
MainApplication.java 文件源码
项目:react-native-collapsing-toolbar
阅读 37
收藏 0
点赞 0
评论 0
@Override
public void onCreate() {
super.onCreate();
SoLoader.init(this, /* native exopackage */ false);
}
MainApplication.java 文件源码
项目:react-native-system-setting
阅读 28
收藏 0
点赞 0
评论 0
@Override
public void onCreate() {
super.onCreate();
SoLoader.init(this, /* native exopackage */ false);
}