Skip to content

Make ModuleDataCleaner internal #51060

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
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
9 changes: 0 additions & 9 deletions packages/react-native/ReactAndroid/api/ReactAndroid.api
Original file line number Diff line number Diff line change
Expand Up @@ -2671,15 +2671,6 @@ public final class com/facebook/react/modules/blob/FileReaderModule$Companion {
public final fun getNAME ()Ljava/lang/String;
}

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
}

public abstract interface class com/facebook/react/modules/common/ModuleDataCleaner$Cleanable {
public abstract fun clearSensitiveData ()V
}

public abstract interface class com/facebook/react/modules/core/DefaultHardwareBackBtnHandler {
public abstract fun invokeDefaultOnBackPressed ()V
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ import com.facebook.react.common.ReactConstants
* Cleans sensitive user data from native modules that implement the [Cleanable] interface. This is
* useful e.g. when a user logs out from an app.
*/
public object ModuleDataCleaner {
internal object ModuleDataCleaner {

@JvmStatic
public fun cleanDataFromModules(reactContext: ReactContext) {
fun cleanDataFromModules(reactContext: ReactContext) {
reactContext.nativeModules.forEach { nativeModule ->
if (nativeModule is Cleanable) {
FLog.d(ReactConstants.TAG, "Cleaning data from ${nativeModule.getName()}")
Expand All @@ -40,7 +40,7 @@ public object ModuleDataCleaner {
* instance is destroyed. This is because logout implies that the instance is destroyed. Apps
* should enforce this.
*/
public fun interface Cleanable {
public fun clearSensitiveData()
fun interface Cleanable {
fun clearSensitiveData()
}
}
Loading