Skip to content

Commit 48216b2

Browse files
NickGerlemanfacebook-github-bot
authored andcommitted
FabricUIManager.prepareLayout() -> FabricUIManager.prepareTextLayout() (#51787)
Summary: Pull Request resolved: #51787 Feedback left on D75826792 Changelog: [Internal] Reviewed By: mdvacca Differential Revision: D75896711 fbshipit-source-id: bc55e1e6b4beefbe7071fe3186caeeb49f74a9cd
1 parent add1113 commit 48216b2

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

  • packages/react-native

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManager.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -642,7 +642,7 @@ public long measureText(
642642
@AnyThread
643643
@ThreadConfined(ANY)
644644
@UnstableReactNativeAPI
645-
public PreparedLayout prepareLayout(
645+
public PreparedLayout prepareTextLayout(
646646
int surfaceId,
647647
ReadableMapBuffer attributedString,
648648
ReadableMapBuffer paragraphAttributes,
@@ -651,7 +651,7 @@ public PreparedLayout prepareLayout(
651651
float minHeight,
652652
float maxHeight) {
653653
SurfaceMountingManager surfaceMountingManager =
654-
mMountingManager.getSurfaceManagerEnforced(surfaceId, "prepareLayout");
654+
mMountingManager.getSurfaceManagerEnforced(surfaceId, "prepareTextLayout");
655655
ViewManager textViewManager = mViewManagerRegistry.get(ReactTextViewManager.REACT_CLASS);
656656

657657
return TextLayoutManager.createPreparedLayout(

packages/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/android/react/renderer/textlayoutmanager/TextLayoutManager.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ TextLayoutManager::PreparedLayout TextLayoutManager::prepareLayout(
300300
const auto& fabricUIManager =
301301
contextContainer_->at<jni::global_ref<jobject>>("FabricUIManager");
302302

303-
static auto prepareLayout =
303+
static auto prepareTextLayout =
304304
jni::findClassStatic("com/facebook/react/fabric/FabricUIManager")
305305
->getMethod<JPreparedLayout::javaobject(
306306
jint,
@@ -309,7 +309,7 @@ TextLayoutManager::PreparedLayout TextLayoutManager::prepareLayout(
309309
jfloat,
310310
jfloat,
311311
jfloat,
312-
jfloat)>("prepareLayout");
312+
jfloat)>("prepareTextLayout");
313313

314314
auto attributedStringMB =
315315
JReadableMapBuffer::createWithContents(toMapBuffer(attributedString));
@@ -321,7 +321,7 @@ TextLayoutManager::PreparedLayout TextLayoutManager::prepareLayout(
321321

322322
// T222682416: We don't have any global cache here. We should investigate
323323
// whether that is desirable
324-
return {jni::make_global(prepareLayout(
324+
return {jni::make_global(prepareTextLayout(
325325
fabricUIManager,
326326
layoutContext.surfaceId,
327327
attributedStringMB.get(),

0 commit comments

Comments
 (0)