public boolean isSelectionEmpty() {
        for (int sectionIndex : selectionStateBySection.keySet()) {
            SectionSelectionState state = selectionStateBySection.get(sectionIndex);

            if (state.section) {
                return false;
            } else {
                for (int i = 0, s = state.items.size(); i < s; i++) {
                    if (state.items.valueAt(i)) {
                        return false;
                    }
                }
                if (state.footer) {
                    return false;
                }
            }
        }

        return true;
    }
Quick check if selection is empty

@return true iff the selection state is empty
android/modules/module_common/src/main/java/github/tornaco/android/thanos/widget/section/SectioningAdapter.java