fix some bug for use multi-thread in on android.
Merge pull request #4450 from Dhilan007/master

[ci skip]fix some bug for use multi-thread in on android.