From 0d04f5d1479a8411f04d3bdc4beb76017d3f44c0 Mon Sep 17 00:00:00 2001 From: Fabrizio Cucci Date: Wed, 3 Apr 2024 02:43:36 -0700 Subject: [PATCH] Kotlinify LifecycleState (#43782) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/43782 Changelog: [Internal] As part of the Sustainability Week (see [post](https://fb.workplace.com/groups/251759413609061/permalink/742797531171911/)). Reviewed By: cortinico Differential Revision: D55642371 fbshipit-source-id: d37fc2eb19635a70e60c57dc6c150aa7e713f778 --- .../common/{LifecycleState.java => LifecycleState.kt} | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) rename packages/react-native/ReactAndroid/src/main/java/com/facebook/react/common/{LifecycleState.java => LifecycleState.kt} (87%) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/common/LifecycleState.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/common/LifecycleState.kt similarity index 87% rename from packages/react-native/ReactAndroid/src/main/java/com/facebook/react/common/LifecycleState.java rename to packages/react-native/ReactAndroid/src/main/java/com/facebook/react/common/LifecycleState.kt index e106d2dbc1d..d1f62216050 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/common/LifecycleState.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/common/LifecycleState.kt @@ -5,9 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -package com.facebook.react.common; - -import com.facebook.infer.annotation.Nullsafe; +package com.facebook.react.common /** * Lifecycle state for an Activity. The state right after pause and right before resume are the @@ -23,8 +21,7 @@ import com.facebook.infer.annotation.Nullsafe; *

RESUMED is used when a ReactRootView is rendered on the screen and the user can interact with * it. */ -@Nullsafe(Nullsafe.Mode.LOCAL) -public enum LifecycleState { +public enum class LifecycleState { BEFORE_CREATE, BEFORE_RESUME, RESUMED,