private static void setFoundState(final Activity activity, final Geocache cache, final boolean foundState, final boolean dnfState, @Nullable final Runnable notifyDataSetChanged) {
        cache.setFound(foundState);
        cache.setDNF(dnfState);
        if (!cache.isOffline()) {
            // store to default list if not yet stored
            cache.setLists(Collections.singleton(StoredList.STANDARD_LIST_ID));
        }
        DataStore.saveCache(cache, LoadFlags.SAVE_ALL);
        ViewUtils.showShortToast(activity, R.string.cache_foundstate_updated);
        if (notifyDataSetChanged != null) {
            notifyDataSetChanged.run();
        }
    }
Methods to be implemented by the activity to react to the cache menu selections.
main/src/main/java/cgeo/geocaching/CacheMenuHandler.java