From 5dd712fc08d0ace018c44daf2aa868f210ed1188 Mon Sep 17 00:00:00 2001 From: David Vacca Date: Fri, 22 Nov 2024 17:56:31 -0800 Subject: [PATCH] Deprecate NotThreadSafeViewHierarchyUpdateDebugListener (#47747) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/47747 Deprecate NotThreadSafeViewHierarchyUpdateDebugListener as won't be available in new arch and will be deleted changelog: [internal] internal Reviewed By: javache Differential Revision: D66216730 fbshipit-source-id: 88f3346ad38b80a710d9df4ba08b63887048c8cd --- .../react/modules/debug/DidJSUpdateUiDuringFrameDetector.kt | 2 ++ .../debug/NotThreadSafeViewHierarchyUpdateDebugListener.kt | 5 ++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/debug/DidJSUpdateUiDuringFrameDetector.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/debug/DidJSUpdateUiDuringFrameDetector.kt index b8dec0416df..2b8537b62bd 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/debug/DidJSUpdateUiDuringFrameDetector.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/debug/DidJSUpdateUiDuringFrameDetector.kt @@ -4,6 +4,8 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ +@file:Suppress( + "DEPRECATION") // Suppressing deprecation of NotThreadSafeViewHierarchyUpdateDebugListener package com.facebook.react.modules.debug diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/debug/NotThreadSafeViewHierarchyUpdateDebugListener.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/debug/NotThreadSafeViewHierarchyUpdateDebugListener.kt index 9027ed465e1..894a4e59439 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/debug/NotThreadSafeViewHierarchyUpdateDebugListener.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/debug/NotThreadSafeViewHierarchyUpdateDebugListener.kt @@ -7,8 +7,6 @@ package com.facebook.react.uimanager.debug -import com.facebook.react.common.annotations.DeprecatedInNewArchitecture - /** * A listener that is notified about view hierarchy update events. This listener should only be used * for debug purposes and should not affect application state. @@ -16,7 +14,8 @@ import com.facebook.react.common.annotations.DeprecatedInNewArchitecture * NB: while [onViewHierarchyUpdateFinished] will always be called from the UI thread, there are no * guarantees what thread onViewHierarchyUpdateEnqueued is called on. */ -@DeprecatedInNewArchitecture +@Deprecated( + "NotThreadSafeViewHierarchyUpdateDebugListener will be deleted in the new architecture.") internal interface NotThreadSafeViewHierarchyUpdateDebugListener { /** Called when `UIManagerModule` enqueues a UI batch to be dispatched to the main thread. */ fun onViewHierarchyUpdateEnqueued()