Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into tvos-cli-link-fix-2
Browse files Browse the repository at this point in the history
  • Loading branch information
douglowder committed Jan 30, 2018
2 parents 3a76c94 + 22efd95 commit 0b50ff8
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 3 deletions.
4 changes: 4 additions & 0 deletions Libraries/Text/TextInput/Multiline/RCTUITextView.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ NS_ASSUME_NONNULL_BEGIN

@property (nonatomic, assign) CGFloat preferredMaxLayoutWidth;

// The `clearButtonMode` property actually is not supported yet;
// it's declared here only to conform to the interface.
@property (nonatomic, assign) UITextFieldViewMode clearButtonMode;

@end

NS_ASSUME_NONNULL_END
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/

package com.facebook.react.modules.network;

import okhttp3.OkHttpClient;

public interface OkHttpClientFactory {
OkHttpClient createNewNetworkModuleClient();
};
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ public class OkHttpClientProvider {
// Centralized OkHttpClient for all networking requests.
private static @Nullable OkHttpClient sClient;

// User-provided OkHttpClient factory
private static @Nullable OkHttpClientFactory sFactory;

public static void setOkHttpClientFactory(OkHttpClientFactory factory) {
sFactory = factory;
}

public static OkHttpClient getOkHttpClient() {
if (sClient == null) {
sClient = createClient();
Expand All @@ -46,6 +53,10 @@ public static void replaceOkHttpClient(OkHttpClient client) {
}

public static OkHttpClient createClient() {
if (sFactory != null) {
return sFactory.createNewNetworkModuleClient();
}

// No timeouts by default
OkHttpClient.Builder client = new OkHttpClient.Builder()
.connectTimeout(0, TimeUnit.MILLISECONDS)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ rn_android_library(
],
provided_deps = [
react_native_dep("third-party/android/support/v4:lib-support-v4"),
react_native_dep("third-party/android/support-annotations:android-support-annotations"),
],
required_for_source_only_abi = True,
visibility = [
Expand Down
2 changes: 1 addition & 1 deletion local-cli/bundle/buildBundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ async function buildBundle(
getPolyfills: config.getPolyfills,
getTransformOptions: config.getTransformOptions,
globalTransformCache: null,
hasteImpl: config.hasteImpl,
hasteImplModulePath: config.hasteImplModulePath,
maxWorkers: args.maxWorkers,
platforms: defaultPlatforms.concat(platforms),
postMinifyProcess: config.postMinifyProcess,
Expand Down
2 changes: 1 addition & 1 deletion local-cli/dependencies/dependencies.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function dependencies(argv, config, args, packagerInstance) {
dynamicDepsInPackages: config.dynamicDepsInPackages,
getPolyfills: config.getPolyfills,
getTransformOptions: config.getTransformOptions,
hasteImpl: config.hasteImpl,
hasteImplModulePath: config.hasteImplModulePath,
postMinifyProcess: config.postMinifyProcess,
transformModulePath: transformModulePath,
extraNodeModules: config.extraNodeModules,
Expand Down
2 changes: 1 addition & 1 deletion local-cli/server/runServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ function getPackagerServer(args, config, reporter) {
getPolyfills: config.getPolyfills,
getTransformOptions: config.getTransformOptions,
globalTransformCache: null,
hasteImpl: config.hasteImpl,
hasteImplModulePath: config.hasteImplModulePath,
maxWorkers: args.maxWorkers,
platforms: defaultPlatforms.concat(args.platforms),
polyfillModuleNames: config.getPolyfillModuleNames(),
Expand Down

0 comments on commit 0b50ff8

Please sign in to comment.