public void showClusterDialog(final ClusterRunner clusterRunner) {
   createDialogData();
   final ArrayList<Integer> actions = mActions;
   new AlertDialog.Builder(mContext)
       .setTitle(R.string.group_by)
       .setItems(
           mTitles,
           new DialogInterface.OnClickListener() {
             @Override
             public void onClick(DialogInterface dialog, int which) {
               // Need to lock rendering when operations invoked by system UI (main thread) are
               // modifying slot data used in GL thread for rendering.
               mActivity.getGLRoot().lockRenderThread();
               try {
                 clusterRunner.doCluster(actions.get(which).intValue());
               } finally {
                 mActivity.getGLRoot().unlockRenderThread();
               }
             }
           })
       .create()
       .show();
 }