Reduce visibility of ReactHost.stopSurface to package only (#38695)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38695

Reduce visibility of ReactHost.stopSurface to package only

changelog: [internal] internal

Reviewed By: christophpurrer

Differential Revision: D47915446

fbshipit-source-id: 570c4d195b6f7a028aad8707a4149a94d8e9ca1d
This commit is contained in:
David Vacca
2023-08-01 08:55:40 -07:00
committed by Facebook GitHub Bot
parent 9eabf48c26
commit 7e44d2cca4
2 changed files with 9 additions and 7 deletions
@@ -239,17 +239,19 @@ public class ReactHost implements ReactHostInterface {
* @param surface The surface to stop
* @return A Task that will complete when stopSurface has been called.
*/
public Task<Boolean> stopSurface(final ReactSurface surface) {
/** package */
TaskInterface<Void> stopSurface(final ReactSurface surface) {
final String method = "stopSurface(surfaceId = " + surface.getSurfaceID() + ")";
log(method, "Schedule");
detachSurface(surface);
return callWithExistingReactInstance(
method,
reactInstance -> {
log(method, "Execute");
reactInstance.stopSurface(surface);
});
method,
reactInstance -> {
log(method, "Execute");
reactInstance.stopSurface(surface);
})
.makeVoid();
}
/**
@@ -174,7 +174,7 @@ public class ReactSurface implements ReactSurfaceInterface {
new IllegalStateException(
"Trying to call ReactSurface.stop(), but no ReactHost is attached."));
}
return host.stopSurface(this).makeVoid();
return host.stopSurface(this);
}
public int getSurfaceID() {