@@ -1055,30 +1055,30 @@ public boolean performItemClick(View view, int position, long id) {
10551055
10561056 if (mChoiceMode == CHOICE_MODE_MULTIPLE ||
10571057 (mChoiceMode == CHOICE_MODE_MULTIPLE_MODAL && mChoiceActionMode != null )) {
1058- boolean newValue = !mCheckStates .get (position , false );
1059- mCheckStates .put (position , newValue );
1058+ boolean checked = !mCheckStates .get (position , false );
1059+ mCheckStates .put (position , checked );
10601060 if (mCheckedIdStates != null && mAdapter .hasStableIds ()) {
1061- if (newValue ) {
1061+ if (checked ) {
10621062 mCheckedIdStates .put (mAdapter .getItemId (position ), position );
10631063 } else {
10641064 mCheckedIdStates .delete (mAdapter .getItemId (position ));
10651065 }
10661066 }
1067- if (newValue ) {
1067+ if (checked ) {
10681068 mCheckedItemCount ++;
10691069 } else {
10701070 mCheckedItemCount --;
10711071 }
10721072 if (mChoiceActionMode != null ) {
10731073 mMultiChoiceModeCallback .onItemCheckedStateChanged (mChoiceActionMode ,
1074- position , id , newValue );
1074+ position , id , checked );
10751075 dispatchItemClick = false ;
10761076 }
10771077 checkedStateChanged = true ;
10781078 } else if (mChoiceMode == CHOICE_MODE_SINGLE ) {
1079- boolean newValue = !mCheckStates .get (position , false );
1080- if ( newValue ) {
1081- mCheckStates . clear ();
1079+ boolean checked = !mCheckStates .get (position , false );
1080+ mCheckStates . clear ();
1081+ if ( checked ) {
10821082 mCheckStates .put (position , true );
10831083 if (mCheckedIdStates != null && mAdapter .hasStableIds ()) {
10841084 mCheckedIdStates .clear ();
0 commit comments