@Override
    public boolean onOptionsItemSelected(final MenuItem item) {
        Log.v("LogCacheActivity.onOptionsItemSelected(" + item.getItemId() + "/" + item.getTitle() + ")");
        final int itemId = item.getItemId();
        if (itemId == R.id.menu_send) {
            final int logLength = ViewUtils.getEditableText(binding.log.getText()).trim().length();
            if (logLength > 0) {
                sendLogAndConfirm();
            } else {
                ViewUtils.showToast(this, R.string.cache_empty_log);
            }
        } else if (itemId == R.id.save) {
            finish(SaveMode.FORCE);
        } else if (itemId == R.id.clear) {
            clearLog();
        } else if (itemId == R.id.menu_sort_trackables_name) {
            sortTrackables(TrackableComparator.TRACKABLE_COMPARATOR_NAME);
        } else if (itemId == R.id.menu_sort_trackables_code) {
            sortTrackables(TrackableComparator.TRACKABLE_COMPARATOR_TRACKCODE);
        } else if (itemId == android.R.id.home) {
            //back arrow
            checkFinish(() -> ActivityMixin.navigateUp(this));
        } else {
            return super.onOptionsItemSelected(item);
        }
        return true;
    }
Checks whether there are favorite points available and sets the corresponding visibility of
"add to favorite" checkbox.
main/src/main/java/cgeo/geocaching/log/LogCacheActivity.java