From 0ad107b988427f8cf34307973095aca529865eec Mon Sep 17 00:00:00 2001 From: Peter Abbondanzo Date: Wed, 12 Jun 2024 17:06:27 -0700 Subject: [PATCH] Add Clipboard module to base packages (#44881) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/44881 Updates the companion object for `ClipboardModule` to re-export the generated parent's `NAME`. Changelog: [Internal] Differential Revision: D58426185 fbshipit-source-id: a60462a990003413f9b0c646a97026217a64b418 --- packages/react-native/ReactAndroid/api/ReactAndroid.api | 5 +++++ .../com/facebook/react/modules/clipboard/ClipboardModule.kt | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/packages/react-native/ReactAndroid/api/ReactAndroid.api b/packages/react-native/ReactAndroid/api/ReactAndroid.api index 582ef18f982de2..3112b7cf36af02 100644 --- a/packages/react-native/ReactAndroid/api/ReactAndroid.api +++ b/packages/react-native/ReactAndroid/api/ReactAndroid.api @@ -3083,11 +3083,16 @@ public final class com/facebook/react/modules/camera/ImageStoreManager$Companion } public final class com/facebook/react/modules/clipboard/ClipboardModule : com/facebook/fbreact/specs/NativeClipboardSpec { + public static final field Companion Lcom/facebook/react/modules/clipboard/ClipboardModule$Companion; + public static final field NAME Ljava/lang/String; public fun (Lcom/facebook/react/bridge/ReactApplicationContext;)V public fun getString (Lcom/facebook/react/bridge/Promise;)V public fun setString (Ljava/lang/String;)V } +public final class com/facebook/react/modules/clipboard/ClipboardModule$Companion { +} + public final class com/facebook/react/modules/common/ModuleDataCleaner { public static final field INSTANCE Lcom/facebook/react/modules/common/ModuleDataCleaner; public static final fun cleanDataFromModules (Lcom/facebook/react/bridge/ReactContext;)V diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/clipboard/ClipboardModule.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/clipboard/ClipboardModule.kt index f0f21574a144b0..9fd4e38be331d9 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/clipboard/ClipboardModule.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/clipboard/ClipboardModule.kt @@ -42,4 +42,8 @@ public class ClipboardModule(context: ReactApplicationContext) : NativeClipboard val clipdata: ClipData = ClipData.newPlainText(null, text) clipboardService.setPrimaryClip(clipdata) } + + public companion object { + public const val NAME: String = NativeClipboardSpec.NAME + } }