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

TIMOB-14505 set activity for avoid null exception #4451

Conversation

bijupmb
Copy link
Contributor

@bijupmb bijupmb commented Jul 12, 2013

@@ -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) {
Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@hieupham007
Copy link
Contributor

Code reviewed. Please address comments ASAP. Customer needs this by tomorrow EOD.

@bijupmb
Copy link
Contributor Author

bijupmb commented Jul 18, 2013

modified changes

@@ -103,9 +103,17 @@ public DialogWrapper(AlertDialog d, boolean persistent, WeakReference<TiBaseActi

public TiBaseActivity getActivity()
{
return dialogActivity.get();
if (dialogActivity == null)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

brackets please :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry my mistake .
Updated

@hieupham007
Copy link
Contributor

Code reviewed and functionally tested. Request accepted

hieupham007 added a commit that referenced this pull request Jul 19, 2013
…nAlertDialogReusing

TIMOB-14505 set activity for avoid null exception
@hieupham007 hieupham007 merged commit 40fdfbb into tidev:master Jul 19, 2013
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