Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit da2ccb49 authored by Daisuke Miyakawa's avatar Daisuke Miyakawa Committed by Android (Google) Code Review
Browse files

Merge "Fix NPE when Spinner is reused."

parents 6dabe240 3f10b1c8
Loading
Loading
Loading
Loading
+3 −4
Original line number Original line Diff line number Diff line
@@ -144,7 +144,6 @@ public class Spinner extends AbsSpinner implements OnClickListener {
        
        
        if (mPopup != null && mPopup.isShowing()) {
        if (mPopup != null && mPopup.isShowing()) {
            mPopup.dismiss();
            mPopup.dismiss();
            mPopup = null;
        }
        }
    }
    }


@@ -316,7 +315,6 @@ public class Spinner extends AbsSpinner implements OnClickListener {
    public void onClick(DialogInterface dialog, int which) {
    public void onClick(DialogInterface dialog, int which) {
        setSelection(which);
        setSelection(which);
        dialog.dismiss();
        dialog.dismiss();
        mPopup = null;
    }
    }


    /**
    /**
@@ -543,6 +541,7 @@ public class Spinner extends AbsSpinner implements OnClickListener {
            }
            }
        }
        }


        @Override
        public void show() {
        public void show() {
            if (mHintView == null) {
            if (mHintView == null) {
                final TextView textView = (TextView) LayoutInflater.from(getContext()).inflate(
                final TextView textView = (TextView) LayoutInflater.from(getContext()).inflate(