From 4f551611326d63b6fb5cd53e63d536c2c6f04647 Mon Sep 17 00:00:00 2001 From: David Vacca Date: Mon, 11 Nov 2024 07:03:00 -0800 Subject: [PATCH] Internalize TaskCompletionSource class (#47543) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/47543 TaskCompletionSource is public but it shouldn't, in this diff I'm making it intenral changelog: [Android][Breaking] Reduce visibility of TaskCompletionSource class Reviewed By: javache Differential Revision: D65738324 fbshipit-source-id: 61db35a408162c53398b20e45a52f3eb46de1eae --- .../react-native/ReactAndroid/api/ReactAndroid.api | 11 ----------- .../runtime/internal/bolts/TaskCompletionSource.kt | 2 +- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/packages/react-native/ReactAndroid/api/ReactAndroid.api b/packages/react-native/ReactAndroid/api/ReactAndroid.api index 14331ddd94dfbf..969a7a5a8b3706 100644 --- a/packages/react-native/ReactAndroid/api/ReactAndroid.api +++ b/packages/react-native/ReactAndroid/api/ReactAndroid.api @@ -3895,17 +3895,6 @@ public abstract interface class com/facebook/react/runtime/internal/bolts/Task$U public abstract fun unobservedException (Lcom/facebook/react/runtime/internal/bolts/Task;Lcom/facebook/react/runtime/internal/bolts/UnobservedTaskException;)V } -public final class com/facebook/react/runtime/internal/bolts/TaskCompletionSource { - public fun ()V - public final fun getTask ()Lcom/facebook/react/runtime/internal/bolts/Task; - public final fun setCancelled ()V - public final fun setError (Ljava/lang/Exception;)V - public final fun setResult (Ljava/lang/Object;)V - public final fun trySetCancelled ()Z - public final fun trySetError (Ljava/lang/Exception;)Z - public final fun trySetResult (Ljava/lang/Object;)Z -} - public final class com/facebook/react/shell/MainPackageConfig { public fun (Lcom/facebook/imagepipeline/core/ImagePipelineConfig;)V public final fun getFrescoConfig ()Lcom/facebook/imagepipeline/core/ImagePipelineConfig; diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/runtime/internal/bolts/TaskCompletionSource.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/runtime/internal/bolts/TaskCompletionSource.kt index ca4d9b7319f0f0..4964d0a88b644f 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/runtime/internal/bolts/TaskCompletionSource.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/runtime/internal/bolts/TaskCompletionSource.kt @@ -13,7 +13,7 @@ package com.facebook.react.runtime.internal.bolts * access to the consumer side through the getTask() method while isolating the Task's completion * mechanisms from the consumer. */ -public class TaskCompletionSource() { +internal class TaskCompletionSource() { /** @return the Task associated with this TaskCompletionSource. */ public val task: Task = Task()