本文整理匯總了Java中com.facebook.soloader.SoLoader.init方法的典型用法代碼示例。如果您正苦於以下問題:Java SoLoader.init方法的具體用法?Java SoLoader.init怎麽用?Java SoLoader.init使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.facebook.soloader.SoLoader
的用法示例。
在下文中一共展示了SoLoader.init方法的12個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: onCreate
import com.facebook.soloader.SoLoader; //導入方法依賴的package包/類
@Override
public void onCreate() {
super.onCreate();
SoLoader.init(this, /* native exopackage */ false);
if (!BuildConfig.DEBUG) {
CrashReport.initCrashReport(getApplicationContext(), "900019562", false);
}
}
示例2: setUp
import com.facebook.soloader.SoLoader; //導入方法依賴的package包/類
@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
));
}
示例3: initializeSoLoaderIfNecessary
import com.facebook.soloader.SoLoader; //導入方法依賴的package包/類
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);
}
示例4: initializeSoLoaderIfNecessary
import com.facebook.soloader.SoLoader; //導入方法依賴的package包/類
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);
}
示例5: onBaseContextAttached
import com.facebook.soloader.SoLoader; //導入方法依賴的package包/類
@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);
}
示例6: initialize
import com.facebook.soloader.SoLoader; //導入方法依賴的package包/類
/** 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);
}
示例7: onCreate
import com.facebook.soloader.SoLoader; //導入方法依賴的package包/類
@Override
public void onCreate() {
super.onCreate();
SoLoader.init(this, /* native exopackage */ false);
}
示例8: onCreate
import com.facebook.soloader.SoLoader; //導入方法依賴的package包/類
@Override
public void onCreate() {
super.onCreate();
SoLoader.init(this, /* native exopackage */ false);
}
示例9: onCreate
import com.facebook.soloader.SoLoader; //導入方法依賴的package包/類
@Override
public void onCreate() {
super.onCreate();
SoLoader.init(this, false);
}
示例10: onCreate
import com.facebook.soloader.SoLoader; //導入方法依賴的package包/類
@Override public void onCreate() {
super.onCreate();
SoLoader.init(this, false);
}
示例11: ReactContextBuilder
import com.facebook.soloader.SoLoader; //導入方法依賴的package包/類
public ReactContextBuilder(Context context) {
this.parentContext = context;
SoLoader.init(context, /* native exopackage */ false);
}
示例12: setUp
import com.facebook.soloader.SoLoader; //導入方法依賴的package包/類
@Override
protected void setUp() throws Exception {
super.setUp();
SoLoader.init(getContext(), /* native exopackage */ false);
ApplicationHolder.setApplication((Application) getContext().getApplicationContext());
}