@Override
    public void onClick(DialogInterface dialog, int whichButton) {
        if (whichButton != -2) {
            if (app != null) {
                app.stop(true);
            }
            app = null;
            getActivity().finish();
        }
    }
Called by the android alert dialog, terminate the activity and OpenGL
rendering

@param dialog ignored
@param whichButton the button index
jme3-android/src/main/java/com/jme3/app/AndroidHarnessFragment.java