-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Fix the crash issue on the Android platform caused by an invalid context. #18036
Conversation
✅ Package size is not changedInterface Check ReportThis pull request does not change any public interfaces ! |
@cocos-robot run test cases |
@bofeng-song, Please check the result of
Task Details
|
@bofeng-song, Please check the result of
Task Details
|
@@ -104,7 +104,7 @@ bool ADPFManager::initializePowerManager() { | |||
#endif | |||
|
|||
JNIEnv *env = cc::JniHelper::getEnv(); | |||
auto *javaGameActivity = cc::JniHelper::getActivity(); | |||
auto *javaGameActivity = cc::JniHelper::getContext(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shall we also rename the variable name to auto *javaContext
?
@cocos-robot run test cases |
@bofeng-song, Please check the result of
Task Details
|
@bofeng-song, Please check the result of
Task Details
|
看了下pr内容. 感觉这个bug是底层最初设计就有问题. 该用application context的地方, 错误的使用了Activity. 如果是这样, 那这个bug岂不是已经存在好几年了, 从cocos支持安卓开始就有? 之前没人反馈过吗? |
Re: #
#17910
Changelog
Continuous Integration
This pull request:
Compatibility Check
This pull request: