Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed #17989: touch stops responding on android devices. #18165

Merged
merged 1 commit into from Aug 21, 2017

Conversation

dumganhar
Copy link

It's caused by FileUtils::getContents is invoked in different threads and we use EventDispatcher::dispatchCustomEvent in FileUtilsAndroid::getContents to send an event to EngineDataManager.
Since EngineDataManager class is only for internal use and EventDispatcher isn't thread-safe, we make EngineDataManager::onBeforeReadFile public and invoke it FileUtilsAndroid::getContents.

It's caused by `FileUtils::getContents` is invoked in different threads and we use EventDispatcher::dispatchCustomEvent in `FileUtilsAndroid::getContents` to send an event to EngineDataManager.
Since EngineDataManager class is only for internal use and EventDispatcher isn't thread-safe, we make `EngineDataManager::onBeforeReadFile` public and invoke it `FileUtilsAndroid::getContents`.
@dumganhar dumganhar requested a review from minggo August 15, 2017 06:35
@minggo minggo merged commit 8adf780 into cocos2d:v3 Aug 21, 2017
@minggo minggo added this to the 3.16 milestone Aug 21, 2017
stevetranby added a commit to stevetranby/cocos2d-x that referenced this pull request Aug 23, 2017
* commit 'e79f21cec02ebbffbf08150708ed26e524c1faf2':
  add new CMakeLists.txt to cpp-template-default (https://gist.github.com/MrCapone/ccdc1826cb7362086107e8096bfe6f90) (cocos2d#18167)
  Fixes compilation errors for android audio module while building with x86 arch. (cocos2d#18150)
  fixed GLViewImpl::getMonitorSize() for desktop platforms (cocos2d#18141)
  [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (cocos2d#18183)
  Fix android problem (cocos2d#18142)
  fix for ios audio engine (cocos2d#18146)
  fix android problem with 24 bit depth buffer on some devices (cocos2d#18148)
  Blend function for UIImageView (cocos2d#18149)
  Fix alpha blending during the animation of TransitionCrossFade. (cocos2d#18175)
  fixed cocos2d#17989: touch stops responding on android devices. (cocos2d#18165)
  [ci skip]update version and readme (cocos2d#18169)
  fix FontAtlas crash on some Android devices (cocos2d#18145)
  Add game-controller-test for win32 (cocos2d#18164)
  Fix android compile fail bug (cocos2d#18166)

# Conflicts:
#	cocos/audio/android/cutils/bitops.h
#	cocos/audio/apple/AudioEngine-inl.mm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants