mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
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:
committed by
Facebook GitHub Bot
parent
9eabf48c26
commit
7e44d2cca4
+8
-6
@@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+1
-1
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user