Skip to content

Commit 49f5abb

Browse files
committed
chore(functions): apply google-java-format to Android source files
- Add proper blank lines between code sections - Reorder imports alphabetically - Format long lines for better readability - Add newline at end of files
1 parent bcf02eb commit 49f5abb

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
lines changed

packages/functions/android/src/main/java/io/invertase/firebase/functions/ReactNativeFirebaseFunctionsEvent.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
package io.invertase.firebase.functions;
2+
23
/*
34
* Copyright (c) 2016-present Invertase Limited & Contributors
45
*
@@ -18,6 +19,7 @@
1819
import com.facebook.react.bridge.Arguments;
1920
import com.facebook.react.bridge.WritableMap;
2021
import io.invertase.firebase.interfaces.NativeEvent;
22+
2123
public class ReactNativeFirebaseFunctionsEvent implements NativeEvent {
2224
static final String FUNCTIONS_STREAMING_EVENT = "functions_streaming_event";
2325
private static final String KEY_ID = "listenerId";
@@ -28,17 +30,20 @@ public class ReactNativeFirebaseFunctionsEvent implements NativeEvent {
2830
private WritableMap eventBody;
2931
private String appName;
3032
private int listenerId;
33+
3134
ReactNativeFirebaseFunctionsEvent(
3235
String eventName, WritableMap eventBody, String appName, int listenerId) {
3336
this.eventName = eventName;
3437
this.eventBody = eventBody;
3538
this.appName = appName;
3639
this.listenerId = listenerId;
3740
}
41+
3842
@Override
3943
public String getEventName() {
4044
return eventName;
4145
}
46+
4247
@Override
4348
public WritableMap getEventBody() {
4449
WritableMap event = Arguments.createMap();
@@ -48,8 +53,9 @@ public WritableMap getEventBody() {
4853
event.putString(KEY_EVENT_NAME, eventName);
4954
return event;
5055
}
56+
5157
@Override
5258
public String getFirebaseAppName() {
5359
return appName;
5460
}
55-
}
61+
}

packages/functions/android/src/main/java/io/invertase/firebase/functions/UniversalFirebaseFunctionsModule.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
import android.content.Context;
2121
import android.util.SparseArray;
2222
import com.facebook.react.bridge.Arguments;
23-
import com.facebook.react.bridge.WritableMap;
2423
import com.facebook.react.bridge.ReadableMap;
24+
import com.facebook.react.bridge.WritableMap;
2525
import com.google.android.gms.tasks.Task;
2626
import com.google.android.gms.tasks.Tasks;
2727
import com.google.firebase.FirebaseApp;
@@ -162,7 +162,8 @@ private void startHttpStream(
162162
getExecutor()
163163
.execute(
164164
() -> {
165-
OkHttpClient client = new OkHttpClient.Builder().retryOnConnectionFailure(true).build();
165+
OkHttpClient client =
166+
new OkHttpClient.Builder().retryOnConnectionFailure(true).build();
166167
HttpUrl parsed = HttpUrl.parse(url);
167168
if (parsed == null) {
168169
emitError(appName, listenerId, "invalid_url");

packages/functions/android/src/reactnative/java/io/invertase/firebase/functions/ReactNativeFirebaseFunctionsModule.java

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -152,19 +152,13 @@ public void httpsCallableFromUrl(
152152

153153
// -------------------- Streaming bridge (Android only) --------------------
154154
@ReactMethod
155-
public void addFunctionsStreaming(
156-
String appName,
157-
String region,
158-
Integer listenerId) {
155+
public void addFunctionsStreaming(String appName, String region, Integer listenerId) {
159156
// Optional hook: no-op, streaming is started explicitly by httpsCallableStream*
160157
// Note: appName and region are auto-prepended by the native module wrapper
161158
}
162159

163160
@ReactMethod
164-
public void removeFunctionsStreaming(
165-
String appName,
166-
String region,
167-
Integer listenerId) {
161+
public void removeFunctionsStreaming(String appName, String region, Integer listenerId) {
168162
// Note: appName and region are auto-prepended by the native module wrapper
169163
UniversalFirebaseFunctionsModule.cancelHttpsCallableStream(listenerId);
170164
}

0 commit comments

Comments
 (0)