Dependent change caused by refactor of FolderSelectors

b/9174917

Change-Id: I1d644fe52b3b3e0c3428c6007d4c591a87a45e6c
This commit is contained in:
Jin Cao 2014-05-19 12:41:00 -07:00
parent ed6e6cc274
commit cd4a94b7e1

View File

@ -100,7 +100,7 @@ public class FolderPickerDialog implements OnClickListener, OnMultiChoiceClickLi
*/
public void update(FolderSelectorAdapter.FolderRow row) {
// Update the UI
final boolean add = !row.isPresent();
final boolean add = !row.isSelected();
if (!add) {
// This would remove the check on a single radio button, so just
// return.
@ -111,11 +111,11 @@ public class FolderPickerDialog implements OnClickListener, OnMultiChoiceClickLi
for (int i = 0; i < mAdapter.getCount(); i++) {
Object item = mAdapter.getItem(i);
if (item instanceof FolderRow) {
((FolderRow)item).setIsPresent(false);
((FolderRow)item).setIsSelected(false);
}
}
mCheckedState.clear();
row.setIsPresent(add);
row.setIsSelected(add);
mAdapter.notifyDataSetChanged();
mCheckedState.put(row.getFolder(), add);