Delete LayoutDirectionUtil from fbsource

Summary:
LayoutDirectionUtil is part of legacy architecutre, in this diff I'm deleting it from fbsource

changelog: [internal] internal

Reviewed By: shwanton, cortinico

Differential Revision: D83984648

fbshipit-source-id: 161e4347ccab160fb1be66cba05f9474c0ad3b72
This commit is contained in:
David Vacca
2025-10-09 14:49:30 -07:00
committed by meta-codesync[bot]
parent e4da3437d9
commit e5e8e637db
2 changed files with 0 additions and 38 deletions
@@ -1,36 +0,0 @@
/*
* 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.uimanager
import android.view.View
import com.facebook.react.common.annotations.internal.LegacyArchitecture
import com.facebook.react.common.annotations.internal.LegacyArchitectureLogLevel
import com.facebook.react.common.annotations.internal.LegacyArchitectureLogger
import com.facebook.yoga.YogaDirection
@LegacyArchitecture(logLevel = LegacyArchitectureLogLevel.ERROR)
@Deprecated(
message = "This class is part of Legacy Architecture and will be removed in a future release",
level = DeprecationLevel.WARNING,
)
internal object LayoutDirectionUtil {
init {
LegacyArchitectureLogger.assertLegacyArchitecture(
"LayoutDirectionUtil",
LegacyArchitectureLogLevel.ERROR,
)
}
@JvmStatic
fun toAndroidFromYoga(direction: YogaDirection): Int =
when (direction) {
YogaDirection.LTR -> View.LAYOUT_DIRECTION_LTR
YogaDirection.RTL -> View.LAYOUT_DIRECTION_RTL
else -> View.LAYOUT_DIRECTION_INHERIT
}
}
@@ -188,8 +188,6 @@ public class NativeViewHierarchyManager {
try {
View viewToUpdate = resolveView(tag);
viewToUpdate.setLayoutDirection(LayoutDirectionUtil.toAndroidFromYoga(layoutDirection));
// Even though we have exact dimensions, we still call measure because some platform views
// (e.g.
// Switch) assume that method will always be called before onLayout and onDraw. They use it to