private void notifyDataSetChanged() {
        // This might get called asynchronous when the activity is shut down
        if (isFinishing()) {
            return;
        }

        if (search == null) {
            return;
        }

        cache = search.getFirstCacheFromResult(LoadFlags.LOAD_ALL_DB_ONLY);

        if (cache == null) {
            progress.dismiss();
            showToast(res.getString(R.string.err_detail_cache_find_some));
            finish();
            return;
        }

        // allow cache to notify CacheDetailActivity when it changes so it can be reloaded
        cache.setChangeNotificationHandler(new ChangeNotificationHandler(this));

        setCacheTitleBar(cache);
        setIsContentRefreshable(cache.supportsRefresh());

        // reset imagesList so Images view page will be redrawn
        imageGallery = null;
        setOrderedPages(getOrderedPages());
        reinitializeViewPager();

        // rendering done! remove progress popup if any there
        invalidateOptionsMenuCompatible();
        progress.dismiss();

        Settings.addCacheToHistory(cache.getGeocode());

        if (CacheDetailActivity.this.restartSpeechService) {
            SpeechService.toggleService(this, cache.getCoords());
            CacheDetailActivity.this.restartSpeechService = false;
        }
    }
waypoint selected in context menu. This variable will be gone when the waypoint context menu is a fragment.
main/src/main/java/cgeo/geocaching/CacheDetailActivity.java