Skip to content

Migrate to Kotlin - MultipartStreamReader #50519

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/react-native/ReactAndroid/api/ReactAndroid.api
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class com/facebook/react/CoreModulesPackage$$ReactModuleInfoProvider : co
public fun getReactModuleInfos ()Ljava/util/Map;
}

public class com/facebook/react/DebugCorePackage : com/facebook/react/BaseReactPackage, com/facebook/react/ViewManagerOnDemandReactPackage {
public final class com/facebook/react/DebugCorePackage : com/facebook/react/BaseReactPackage, com/facebook/react/ViewManagerOnDemandReactPackage {
public fun <init> ()V
public fun createViewManager (Lcom/facebook/react/bridge/ReactApplicationContext;Ljava/lang/String;)Lcom/facebook/react/uimanager/ViewManager;
public fun getModule (Ljava/lang/String;Lcom/facebook/react/bridge/ReactApplicationContext;)Lcom/facebook/react/bridge/NativeModule;
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
/*
* 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

import com.facebook.react.bridge.ModuleSpec
import com.facebook.react.bridge.NativeModule
import com.facebook.react.bridge.ReactApplicationContext
import com.facebook.react.bridge.UIManager
import com.facebook.react.module.annotations.ReactModuleList
import com.facebook.react.module.model.ReactModuleInfoProvider
import com.facebook.react.uimanager.ViewManager
import com.facebook.react.views.debuggingoverlay.DebuggingOverlayManager

/**
* Package defining core framework modules (e.g. [UIManager]). It should be used for modules that
* require special integration with other framework parts (e.g. with the list of packages to load
* view managers from).
*/
@ReactModuleList(nativeModules = [])
public class DebugCorePackage public constructor() :
BaseReactPackage(), ViewManagerOnDemandReactPackage {

/** A map of view managers that should be registered with [UIManager] */
private val viewManagersMap: Map<String, ModuleSpec> by
lazy(LazyThreadSafetyMode.NONE) {
mapOf(
DebuggingOverlayManager.REACT_CLASS to
ModuleSpec.viewManagerSpec { DebuggingOverlayManager() })
}

override fun getReactModuleInfoProvider(): ReactModuleInfoProvider = ReactModuleInfoProvider {
emptyMap()
}

public override fun getModule(
name: String,
reactContext: ReactApplicationContext
): NativeModule? = null

public override fun getViewManagers(reactContext: ReactApplicationContext): List<ModuleSpec> =
viewManagersMap.values.toList()

override fun getViewManagerNames(reactContext: ReactApplicationContext): Collection<String> =
viewManagersMap.keys

override fun createViewManager(
reactContext: ReactApplicationContext,
viewManagerName: String
): ViewManager<*, *>? =
viewManagersMap.getOrDefault(viewManagerName, null)?.provider?.get() as? ViewManager<*, *>
}
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ public void destroyRootView(View rootView) {
}

@Override
public void reload(String s) {
public void reload(String reason) {
// no-op not implemented for Bridge Mode
}

Expand Down

This file was deleted.

Loading
Loading