Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions packages/react-native/ReactAndroid/api/ReactAndroid.api
Original file line number Diff line number Diff line change
Expand Up @@ -1936,8 +1936,9 @@ public final class com/facebook/react/common/mapbuffer/WritableMapBuffer : com/f
public final fun put (IZ)Lcom/facebook/react/common/mapbuffer/WritableMapBuffer;
}

public class com/facebook/react/common/network/OkHttpCallUtil {
public static fun cancelTag (Lokhttp3/OkHttpClient;Ljava/lang/Object;)V
public final class com/facebook/react/common/network/OkHttpCallUtil {
public static final field INSTANCE Lcom/facebook/react/common/network/OkHttpCallUtil;
public static final fun cancelTag (Lokhttp3/OkHttpClient;Ljava/lang/Object;)V
}

public class com/facebook/react/config/ReactFeatureFlags {
Expand Down Expand Up @@ -5867,9 +5868,9 @@ public class com/facebook/react/views/common/ContextUtils {
public static fun findContextOfType (Landroid/content/Context;Ljava/lang/Class;)Ljava/lang/Object;
}

public class com/facebook/react/views/common/ViewUtils {
public fun <init> ()V
public static fun getTestId (Landroid/view/View;)Ljava/lang/String;
public final class com/facebook/react/views/common/ViewUtils {
public static final field INSTANCE Lcom/facebook/react/views/common/ViewUtils;
public static final fun getTestId (Landroid/view/View;)Ljava/lang/String;
}

public class com/facebook/react/views/debuggingoverlay/DebuggingOverlay : android/view/View {
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

package com.facebook.react.common.network

import okhttp3.OkHttpClient

/**
* Helper class that provides the necessary methods for canceling queued and running OkHttp calls
*/
public object OkHttpCallUtil {

@JvmStatic
public fun cancelTag(client: OkHttpClient, tag: Any) {
for (call in client.dispatcher().queuedCalls()) {
if (tag == call.request().tag()) {
call.cancel()
return
}
}
for (call in client.dispatcher().runningCalls()) {
if (tag == call.request().tag()) {
call.cancel()
return
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@
* LICENSE file in the root directory of this source tree.
*/

package com.facebook.react.uimanager;
package com.facebook.react.uimanager

import android.view.View;
import com.facebook.infer.annotation.Nullsafe;
import android.view.View

/**
* Common base class for most of the {@link ViewManager}s. It provides support for most common
Expand All @@ -18,20 +17,15 @@
*
* @param <T> the view handled by this manager
*/
@Nullsafe(Nullsafe.Mode.LOCAL)
public abstract class SimpleViewManager<T extends View>
extends BaseViewManager<T, LayoutShadowNode> {
public abstract class SimpleViewManager<T : View> : BaseViewManager<T, LayoutShadowNode>() {

@Override
public LayoutShadowNode createShadowNodeInstance() {
return new LayoutShadowNode();
override public fun createShadowNodeInstance(): LayoutShadowNode {
return LayoutShadowNode()
}

@Override
public Class<LayoutShadowNode> getShadowNodeClass() {
return LayoutShadowNode.class;
override public fun getShadowNodeClass(): Class<LayoutShadowNode> {
return LayoutShadowNode::class.java
}

@Override
public void updateExtraData(T root, Object extraData) {}
override public fun updateExtraData(root: T, extraData: Any?): Unit = Unit
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

package com.facebook.react.views.common

import android.view.View
import com.facebook.react.R

/** Class containing static methods involving manipulations of Views */
public object ViewUtils {

/**
* Returns value of testId for the given view, if present
*
* @param view View to get the testId value for
* @return the value of testId if defined for the view, otherwise null
*/
@JvmStatic
public fun getTestId(view: View?): String? = view?.getTag(R.id.react_test_id) as? String
}