android:fix render callback thread error
This commit is contained in:
parent
57b5c7596b
commit
0535d0d4d4
@ -74,6 +74,13 @@ public class ShaderPlugin extends DoricJavaPlugin {
|
|||||||
viewNode.blend(jsObject.getProperty("props").asObject());
|
viewNode.blend(jsObject.getProperty("props").asObject());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Looper.myQueue().addIdleHandler(new MessageQueue.IdleHandler() {
|
||||||
|
@Override
|
||||||
|
public boolean queueIdle() {
|
||||||
|
promise.resolve();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}, ThreadMode.UI).setCallback(new AsyncResult.Callback<Object>() {
|
}, ThreadMode.UI).setCallback(new AsyncResult.Callback<Object>() {
|
||||||
@ -94,13 +101,6 @@ public class ShaderPlugin extends DoricJavaPlugin {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFinish() {
|
public void onFinish() {
|
||||||
Looper.myQueue().addIdleHandler(new MessageQueue.IdleHandler() {
|
|
||||||
@Override
|
|
||||||
public boolean queueIdle() {
|
|
||||||
promise.resolve();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user