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
[TIMOB-25431] Improve getActivity() validation #10017
Conversation
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.
CR looks good to me.
7f784b2
to
97ff780
Compare
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.
CR: Pass
Looks like bad idea to me.
Probably we should check |
@drauggres, while I agree with you, the problem is too much code (especially modules) assumes this method never returns null and the stack-trace makes it look like a core problem on our end. This issue is already too wide spread. So, with this change, this method will grab the 1st launched splash-screen activity if no other child activity exists on the UI stack since it's guaranteed to exist. |
Generated by 🚫 dangerJS |
getActivity()
must always return a valid activity. There are many instances where we assumegetActivity()
to return a valid activity TiUILabel#L71, TiTableView.java#L307 etc...TiUICardView.getLayout()
JIRA Ticket