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-14505 set activity for avoid null exception #4451
TIMOB-14505 set activity for avoid null exception #4451
Conversation
@@ -252,6 +252,12 @@ public void propertyChanged(String key, Object oldValue, Object newValue, KrollP | |||
public void show(KrollDict options) | |||
{ | |||
AlertDialog dialog = dialogWrapper.getDialog(); | |||
if (dialogWrapper.getActivity() == null) { |
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.
you can move this check into the if since activity is only null if dialog is null
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.
Done
Code reviewed. Please address comments ASAP. Customer needs this by tomorrow EOD. |
modified changes |
@@ -103,9 +103,17 @@ public DialogWrapper(AlertDialog d, boolean persistent, WeakReference<TiBaseActi | |||
|
|||
public TiBaseActivity getActivity() | |||
{ | |||
return dialogActivity.get(); | |||
if (dialogActivity == null) |
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.
brackets please :)
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.
sorry my mistake .
Updated
Code reviewed and functionally tested. Request accepted |
…nAlertDialogReusing TIMOB-14505 set activity for avoid null exception
https://jira.appcelerator.org/browse/TIMOB-14505