Fixed race condition in Spinner.DialogPopup on null reference.
NullPointerException is triggered when DialogPopup is dismissed due to object mPopup being null when not showing. Race condition is triggered when dialog is dismissed before touch event to dismiss dialog has been processed properly. Fixed by adding a null check prior to accessing mPopup object. Change-Id: I3c4fe9c279d92a7103fb4f68189d1d42beedc606
This commit is contained in:
committed by
Henrik Baard
parent
fa42e774bc
commit
2f77f9c03e
@@ -837,8 +837,10 @@ public class Spinner extends AbsSpinner implements OnClickListener {
|
||||
private CharSequence mPrompt;
|
||||
|
||||
public void dismiss() {
|
||||
mPopup.dismiss();
|
||||
mPopup = null;
|
||||
if (mPopup != null) {
|
||||
mPopup.dismiss();
|
||||
mPopup = null;
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isShowing() {
|
||||
|
||||
Reference in New Issue
Block a user