From 43f27d329603e100bda66a30e2d4455407ed076f Mon Sep 17 00:00:00 2001 From: James Barr Date: Tue, 31 Oct 2023 11:16:28 -0700 Subject: [PATCH] Use core-annotated method approach instead of renaming --- .../src/main/kotlin/com/uber/rib/core/RibActivity.kt | 2 +- .../src/main/kotlin/com/uber/rib/core/ViewRouter.kt | 4 ---- .../rib-base/src/main/kotlin/com/uber/rib/core/Router.kt | 3 ++- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/android/libraries/rib-android/src/main/kotlin/com/uber/rib/core/RibActivity.kt b/android/libraries/rib-android/src/main/kotlin/com/uber/rib/core/RibActivity.kt index 88740a4c8..cdec97e19 100644 --- a/android/libraries/rib-android/src/main/kotlin/com/uber/rib/core/RibActivity.kt +++ b/android/libraries/rib-android/src/main/kotlin/com/uber/rib/core/RibActivity.kt @@ -104,7 +104,7 @@ public abstract class RibActivity : override fun onSaveInstanceState(outState: android.os.Bundle) { super.onSaveInstanceState(outState) _callbacksFlow.tryEmit(createOnSaveInstanceStateEvent(outState)) - router?.dispatchSaveInstanceState(Bundle(outState)) + router?.saveInstanceStateInternal(Bundle(outState)) ?: throw NullPointerException("Router should not be null") } diff --git a/android/libraries/rib-android/src/main/kotlin/com/uber/rib/core/ViewRouter.kt b/android/libraries/rib-android/src/main/kotlin/com/uber/rib/core/ViewRouter.kt index 01288b3e3..ec0f74657 100644 --- a/android/libraries/rib-android/src/main/kotlin/com/uber/rib/core/ViewRouter.kt +++ b/android/libraries/rib-android/src/main/kotlin/com/uber/rib/core/ViewRouter.kt @@ -47,8 +47,4 @@ abstract class ViewRouter> : Router { XRay.apply(this, view) } } - - internal fun dispatchSaveInstanceState(outState: Bundle) { - saveInstanceState(outState) - } } diff --git a/android/libraries/rib-base/src/main/kotlin/com/uber/rib/core/Router.kt b/android/libraries/rib-base/src/main/kotlin/com/uber/rib/core/Router.kt index 372c4d50c..948d2441c 100644 --- a/android/libraries/rib-base/src/main/kotlin/com/uber/rib/core/Router.kt +++ b/android/libraries/rib-base/src/main/kotlin/com/uber/rib/core/Router.kt @@ -229,7 +229,8 @@ protected constructor( return children } - internal fun saveInstanceStateInternal(outState: Bundle) { + @CoreFriendModuleApi + public fun saveInstanceStateInternal(outState: Bundle) { saveInstanceState(outState) }