mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Format Java code in xplat/js/react-native-github
Summary: This diff formats the Java class files inside xplat/js/react-native-github. Since google-java-format was enabled in D16071401 we want to codemode the existing code so that users don't have to deal with formatter lint noise at diff-time. ```arc f --paths-cmd 'hg files -I "**/*.java"'``` drop-conflicts Reviewed By: cpojer Differential Revision: D16071725 fbshipit-source-id: fc6e3852e45742c109f0c5ac4065d64201c74204
This commit is contained in:
committed by
Facebook Github Bot
parent
61e95e5cbf
commit
6c0f73b322
@@ -7,9 +7,7 @@ package com.facebook.react.jstasks;
|
||||
|
||||
import com.facebook.react.bridge.WritableMap;
|
||||
|
||||
/**
|
||||
* Class that holds the various parameters needed to start a JS task.
|
||||
*/
|
||||
/** Class that holds the various parameters needed to start a JS task. */
|
||||
public class HeadlessJsTaskConfig {
|
||||
private final String mTaskKey;
|
||||
private final WritableMap mData;
|
||||
@@ -18,18 +16,17 @@ public class HeadlessJsTaskConfig {
|
||||
private final HeadlessJsTaskRetryPolicy mRetryPolicy;
|
||||
|
||||
/**
|
||||
* Create a HeadlessJsTaskConfig. Equivalent to calling
|
||||
* {@link #HeadlessJsTaskConfig(String, WritableMap, long, boolean)} with no timeout (0) and
|
||||
* {@code false} for {@code allowedInBackground}.
|
||||
* Create a HeadlessJsTaskConfig. Equivalent to calling {@link #HeadlessJsTaskConfig(String,
|
||||
* WritableMap, long, boolean)} with no timeout (0) and {@code false} for {@code
|
||||
* allowedInBackground}.
|
||||
*/
|
||||
public HeadlessJsTaskConfig(String taskKey, WritableMap data) {
|
||||
this(taskKey, data, 0, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a HeadlessJsTaskConfig. Equivalent to calling
|
||||
* {@link #HeadlessJsTaskConfig(String, WritableMap, long, boolean)} with {@code false} for
|
||||
* {@code allowedInBackground}.
|
||||
* Create a HeadlessJsTaskConfig. Equivalent to calling {@link #HeadlessJsTaskConfig(String,
|
||||
* WritableMap, long, boolean)} with {@code false} for {@code allowedInBackground}.
|
||||
*/
|
||||
public HeadlessJsTaskConfig(String taskKey, WritableMap data, long timeout) {
|
||||
this(taskKey, data, timeout, false);
|
||||
@@ -39,23 +36,20 @@ public class HeadlessJsTaskConfig {
|
||||
* Create a HeadlessJsTaskConfig.
|
||||
*
|
||||
* @param taskKey the key for the JS task to execute. This is the same key that you call {@code
|
||||
* AppRegistry.registerTask} with in JS.
|
||||
* AppRegistry.registerTask} with in JS.
|
||||
* @param data a map of parameters passed to the JS task executor.
|
||||
* @param timeout the amount of time (in ms) after which the React instance should be terminated
|
||||
* regardless of whether the task has completed or not. This is meant as a safeguard against
|
||||
* accidentally keeping the device awake for long periods of time because JS crashed or some
|
||||
* request timed out. A value of 0 means no timeout (should only be used for long-running tasks
|
||||
* such as music playback).
|
||||
* regardless of whether the task has completed or not. This is meant as a safeguard against
|
||||
* accidentally keeping the device awake for long periods of time because JS crashed or some
|
||||
* request timed out. A value of 0 means no timeout (should only be used for long-running
|
||||
* tasks such as music playback).
|
||||
* @param allowedInForeground whether to allow this task to run while the app is in the foreground
|
||||
* (i.e. there is a host in resumed mode for the current ReactContext). Only set this to true if
|
||||
* you really need it. Note that tasks run in the same JS thread as UI code, so doing expensive
|
||||
* operations would degrade user experience.
|
||||
* (i.e. there is a host in resumed mode for the current ReactContext). Only set this to true
|
||||
* if you really need it. Note that tasks run in the same JS thread as UI code, so doing
|
||||
* expensive operations would degrade user experience.
|
||||
*/
|
||||
public HeadlessJsTaskConfig(
|
||||
String taskKey,
|
||||
WritableMap data,
|
||||
long timeout,
|
||||
boolean allowedInForeground) {
|
||||
String taskKey, WritableMap data, long timeout, boolean allowedInForeground) {
|
||||
this(taskKey, data, timeout, allowedInForeground, NoRetryPolicy.INSTANCE);
|
||||
}
|
||||
|
||||
@@ -63,25 +57,25 @@ public class HeadlessJsTaskConfig {
|
||||
* Create a HeadlessJsTaskConfig.
|
||||
*
|
||||
* @param taskKey the key for the JS task to execute. This is the same key that you call {@code
|
||||
* AppRegistry.registerTask} with in JS.
|
||||
* AppRegistry.registerTask} with in JS.
|
||||
* @param data a map of parameters passed to the JS task executor.
|
||||
* @param timeout the amount of time (in ms) after which the React instance should be terminated
|
||||
* regardless of whether the task has completed or not. This is meant as a safeguard against
|
||||
* accidentally keeping the device awake for long periods of time because JS crashed or some
|
||||
* request timed out. A value of 0 means no timeout (should only be used for long-running tasks
|
||||
* such as music playback).
|
||||
* regardless of whether the task has completed or not. This is meant as a safeguard against
|
||||
* accidentally keeping the device awake for long periods of time because JS crashed or some
|
||||
* request timed out. A value of 0 means no timeout (should only be used for long-running
|
||||
* tasks such as music playback).
|
||||
* @param allowedInForeground whether to allow this task to run while the app is in the foreground
|
||||
* (i.e. there is a host in resumed mode for the current ReactContext). Only set this to true if
|
||||
* you really need it. Note that tasks run in the same JS thread as UI code, so doing expensive
|
||||
* operations would degrade user experience.
|
||||
* (i.e. there is a host in resumed mode for the current ReactContext). Only set this to true
|
||||
* if you really need it. Note that tasks run in the same JS thread as UI code, so doing
|
||||
* expensive operations would degrade user experience.
|
||||
* @param retryPolicy the number of times & delays the task should be retried on error.
|
||||
*/
|
||||
public HeadlessJsTaskConfig(
|
||||
String taskKey,
|
||||
WritableMap data,
|
||||
long timeout,
|
||||
boolean allowedInForeground,
|
||||
HeadlessJsTaskRetryPolicy retryPolicy) {
|
||||
String taskKey,
|
||||
WritableMap data,
|
||||
long timeout,
|
||||
boolean allowedInForeground,
|
||||
HeadlessJsTaskRetryPolicy retryPolicy) {
|
||||
mTaskKey = taskKey;
|
||||
mData = data;
|
||||
mTimeout = timeout;
|
||||
|
||||
Reference in New Issue
Block a user