From 3dec672398729cd668aff92249f1fdde231fb928 Mon Sep 17 00:00:00 2001 From: Arushi Kesarwani Date: Wed, 6 Nov 2024 10:26:16 -0800 Subject: [PATCH] Reducing visibility of SimpleSettableFuture (#47438) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/47438 As part of sustainability week effort for switching to `internal` here: https://fb.workplace.com/groups/251759413609061/permalink/872342228217440/ Reducing visibility of SimpleSettableFuture from `public` to `internal` Changelog: [Android] [Breaking] - Stable API - Make SimpleSettableFuture internal Reviewed By: javache Differential Revision: D65502193 fbshipit-source-id: 4bdd9b43684c8bc075271d76856ef848c52e6b12 --- .../react-native/ReactAndroid/api/ReactAndroid.api | 13 ------------- .../react/common/futures/SimpleSettableFuture.kt | 2 +- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/packages/react-native/ReactAndroid/api/ReactAndroid.api b/packages/react-native/ReactAndroid/api/ReactAndroid.api index 60c865e204d..e540ce715f0 100644 --- a/packages/react-native/ReactAndroid/api/ReactAndroid.api +++ b/packages/react-native/ReactAndroid/api/ReactAndroid.api @@ -1907,19 +1907,6 @@ public final class com/facebook/react/common/build/ReactBuildConfig { public static final field IS_INTERNAL_BUILD Z } -public final class com/facebook/react/common/futures/SimpleSettableFuture : java/util/concurrent/Future { - public fun ()V - public fun cancel (Z)Z - public fun get ()Ljava/lang/Object; - public fun get (JLjava/util/concurrent/TimeUnit;)Ljava/lang/Object; - public final fun getOrThrow ()Ljava/lang/Object; - public final fun getOrThrow (JLjava/util/concurrent/TimeUnit;)Ljava/lang/Object; - public fun isCancelled ()Z - public fun isDone ()Z - public final fun set (Ljava/lang/Object;)V - public final fun setException (Ljava/lang/Exception;)V -} - public abstract interface class com/facebook/react/common/mapbuffer/MapBuffer : java/lang/Iterable, kotlin/jvm/internal/markers/KMappedMarker { public static final field Companion Lcom/facebook/react/common/mapbuffer/MapBuffer$Companion; public abstract fun contains (I)Z diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/common/futures/SimpleSettableFuture.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/common/futures/SimpleSettableFuture.kt index 79c5d5c3fdc..95c093e6670 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/common/futures/SimpleSettableFuture.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/common/futures/SimpleSettableFuture.kt @@ -17,7 +17,7 @@ import java.util.concurrent.TimeoutException * A super simple Future-like class that can safely notify another Thread when a value is ready. * Does not support canceling. */ -public class SimpleSettableFuture : Future { +internal class SimpleSettableFuture : Future { private val readyLatch = CountDownLatch(1) private var result: T? = null