Fix the crash issue on the Android platform caused by an invalid context.#18036
Merged
Conversation
✅ Package size is not changedInterface Check ReportThis pull request does not change any public interfaces ! |
Contributor
|
@cocos-robot run test cases |
|
@bofeng-song, Please check the result of
Task Details
|
|
@bofeng-song, Please check the result of
Task Details
|
dumganhar
reviewed
Dec 16, 2024
|
|
||
| JNIEnv *env = cc::JniHelper::getEnv(); | ||
| auto *javaGameActivity = cc::JniHelper::getActivity(); | ||
| auto *javaGameActivity = cc::JniHelper::getContext(); |
Contributor
There was a problem hiding this comment.
Shall we also rename the variable name to auto *javaContext ?
minggo
approved these changes
Dec 16, 2024
dumganhar
approved these changes
Dec 16, 2024
Contributor
|
@cocos-robot run test cases |
|
@bofeng-song, Please check the result of
Task Details
|
|
@bofeng-song, Please check the result of
Task Details
|
Contributor
|
看了下pr内容. 感觉这个bug是底层最初设计就有问题. 该用application context的地方, 错误的使用了Activity. 如果是这样, 那这个bug岂不是已经存在好几年了, 从cocos支持安卓开始就有? 之前没人反馈过吗? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Re: #
#17910
Changelog
Continuous Integration
This pull request:
Compatibility Check
This pull request: