Commit 15d735b 1 parent 04af0b9 commit 15d735b Copy full SHA for 15d735b
File tree 3 files changed +14
-5
lines changed
packages/react-native/ReactAndroid/src
main/java/com/facebook/react
test/java/com/facebook/react/bridgeless
3 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -137,7 +137,8 @@ public SurfaceHandler getSurfaceHandler() {
137
137
return mSurfaceView .get ();
138
138
}
139
139
140
- public Task <Void > prerender () {
140
+ @ Override
141
+ public TaskInterface prerender () {
141
142
ReactHost host = mReactHost .get ();
142
143
if (host == null ) {
143
144
return Task .forError (
@@ -164,7 +165,8 @@ public TaskInterface start() {
164
165
return host .startSurface (this );
165
166
}
166
167
167
- public Task <Void > stop () {
168
+ @ Override
169
+ public TaskInterface stop () {
168
170
ReactHost host = mReactHost .get ();
169
171
if (host == null ) {
170
172
return Task .forError (
Original file line number Diff line number Diff line change @@ -14,9 +14,15 @@ interface ReactSurfaceInterface {
14
14
// the API of this interface will be completed as we analyze and refactor API of ReactSurface,
15
15
// ReactRootView, etc.
16
16
17
+ // Prerender this surface
18
+ fun prerender (): TaskInterface
19
+
17
20
// Start running this surface
18
21
fun start (): TaskInterface
19
22
23
+ // Stop running this surface
24
+ fun stop (): TaskInterface
25
+
20
26
// Get React root view of this surface
21
27
fun getView (): ViewGroup ?
22
28
}
Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ public void testAttachThrowExeption() {
77
77
@ Test
78
78
public void testPrerender () throws InterruptedException {
79
79
mReactSurface .attach (mReactHost );
80
- Task <Void > task = mReactSurface .prerender ();
80
+ Task <Void > task = ( Task < Void >) mReactSurface .prerender ();
81
81
task .waitForCompletion ();
82
82
83
83
verify (mReactHost ).prerenderSurface (mReactSurface );
@@ -102,7 +102,7 @@ public void testStop() throws InterruptedException {
102
102
Task <Void > task = (Task <Void >) mReactSurface .start ();
103
103
task .waitForCompletion ();
104
104
105
- task = mReactSurface .stop ();
105
+ task = ( Task < Void >) mReactSurface .stop ();
106
106
task .waitForCompletion ();
107
107
108
108
verify (mReactHost ).stopSurface (mReactSurface );
@@ -152,7 +152,8 @@ public void testStartStopHandlerCalls() throws InterruptedException {
152
152
153
153
assertThat (mReactSurface .isRunning ()).isTrue ();
154
154
155
- mReactSurface .stop ().waitForCompletion ();
155
+ task = (Task <Void >) mReactSurface .stop ();
156
+ task .waitForCompletion ();
156
157
157
158
assertThat (mReactSurface .isRunning ()).isFalse ();
158
159
}
You can’t perform that action at this time.
0 commit comments