Skip to content
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

fix(Android,Fabric): add missing DoNotStrip annotation to JNI-accessed methods #2290

Merged
merged 2 commits into from
Aug 9, 2024
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import android.util.Log
import android.view.View
import androidx.appcompat.widget.Toolbar
import androidx.coordinatorlayout.widget.CoordinatorLayout
import com.facebook.jni.annotations.DoNotStrip
import com.facebook.react.bridge.LifecycleEventListener
import com.facebook.react.bridge.ReactApplicationContext
import com.facebook.react.uimanager.PixelUtil
Expand All @@ -18,6 +19,7 @@ import java.lang.ref.WeakReference
* See https://github.com/software-mansion/react-native-screens/pull/2169
* for more detailed description of the issue this code solves.
*/
@DoNotStrip
internal class ScreenDummyLayoutHelper(
reactContext: ReactApplicationContext,
) : LifecycleEventListener {
Expand Down Expand Up @@ -129,6 +131,7 @@ internal class ScreenDummyLayoutHelper(
* @param fontSize font size value as passed from JS
* @return header height in dp as consumed by Yoga
*/
@DoNotStrip
private fun computeDummyLayout(
fontSize: Int,
isTitleEmpty: Boolean,
Expand Down Expand Up @@ -210,6 +213,7 @@ internal class ScreenDummyLayoutHelper(
// dummy view hierarchy.
private var weakInstance = WeakReference<ScreenDummyLayoutHelper>(null)

@DoNotStrip
@JvmStatic
fun getInstance(): ScreenDummyLayoutHelper? = weakInstance.get()
}
Expand Down
Loading