// Path: app/src/main/java/app/openconnect/FragActivity.java
// public class FragActivity extends Activity {
// 
// 	public static final String TAG = "OpenConnect";
// 
// 	public static final String EXTRA_FRAGMENT_NAME = "app.openconnect.fragment_name";
// 
// 	public static final String FRAGMENT_PREFIX = "app.openconnect.fragments.";
// 
// 	@Override
// 	public void onCreate(Bundle savedInstanceState) {
// 		super.onCreate(savedInstanceState);
// 
// 		if(savedInstanceState == null) {
// 			try {
// 				String fragName = getIntent().getStringExtra(EXTRA_FRAGMENT_NAME);
// 				Fragment frag = (Fragment)Class.forName(FRAGMENT_PREFIX + fragName).newInstance();
// 				getFragmentManager().beginTransaction().add(android.R.id.content, frag).commit();
// 			} catch (Exception e) {
// 				Log.e(TAG, "unable to create fragment", e);
// 				finish();
// 			}
// 		}
//     }
// 
// }


import android.view.Menu;
import android.view.MenuItem;
import app.openconnect.FragActivity;
import app.openconnect.R;
import org.acra.ACRA;
import org.acra.ACRAConfiguration;
import org.acra.ErrorReporter;
import android.content.Context;
import android.content.Intent;

	private void sendProblemReport() {
		ACRAConfiguration cfg = ACRA.getConfig();
		cfg.setResDialogText(R.string.problem_dialog_text);
		cfg.setResDialogCommentPrompt(R.string.problem_dialog_comment_prompt);
		ACRA.setConfig(cfg);
		ACRA.getErrorReporter().handleException(null);

		ErrorReporter er = ACRA.getErrorReporter();
		er.putCustomData("cause", "sendProblemReport");
		er.handleException(null);

		// FIXME: we really want to restore the default strings after the report dialog
		// is finished, but changing them here would override the problem_dialog_* strings
		// set above.
		//ACRA.setConfig(ACRA.getNewDefaultConfig((Application)getApplicationContext()));
	}

	public boolean onOptionsItemSelected(MenuItem item) {
		final int itemId = item.getItemId();
		if (itemId == MENU_ABOUT) {
			return startFragActivity("AboutFragment");
		} else if (itemId == MENU_SECURID) {
			return startFragActivity("TokenParentFragment");
		} else if (itemId == MENU_REPORT_PROBLEM) {
			sendProblemReport();
			return true;
		} else if (itemId == MENU_SETTINGS) {
			return startFragActivity("GeneralSettings");
		} else {
// Path: app/src/main/java/app/openconnect/FragActivity.java
// public class FragActivity extends Activity {
// 
// 	public static final String TAG = "OpenConnect";
// 
// 	public static final String EXTRA_FRAGMENT_NAME = "app.openconnect.fragment_name";
// 
// 	public static final String FRAGMENT_PREFIX = "app.openconnect.fragments.";
// 
// 	@Override
// 	public void onCreate(Bundle savedInstanceState) {
// 		super.onCreate(savedInstanceState);
// 
// 		if(savedInstanceState == null) {
// 			try {
// 				String fragName = getIntent().getStringExtra(EXTRA_FRAGMENT_NAME);
// 				Fragment frag = (Fragment)Class.forName(FRAGMENT_PREFIX + fragName).newInstance();
// 				getFragmentManager().beginTransaction().add(android.R.id.content, frag).commit();
// 			} catch (Exception e) {
// 				Log.e(TAG, "unable to create fragment", e);
// 				finish();
// 			}
// 		}
//     }
// 
// }


// Path: app/src/main/java/app/openconnect/fragments/CommonMenu.java
import android.view.Menu;
import android.view.MenuItem;
import app.openconnect.FragActivity;
import app.openconnect.R;
import org.acra.ACRA;
import org.acra.ACRAConfiguration;
import org.acra.ErrorReporter;
import android.content.Context;
import android.content.Intent;


	private void sendProblemReport() {
		ACRAConfiguration cfg = ACRA.getConfig();
		cfg.setResDialogText(R.string.problem_dialog_text);
		cfg.setResDialogCommentPrompt(R.string.problem_dialog_comment_prompt);
		ACRA.setConfig(cfg);
		ACRA.getErrorReporter().handleException(null);

		ErrorReporter er = ACRA.getErrorReporter();
		er.putCustomData("cause", "sendProblemReport");
		er.handleException(null);

		// FIXME: we really want to restore the default strings after the report dialog
		// is finished, but changing them here would override the problem_dialog_* strings
		// set above.
		//ACRA.setConfig(ACRA.getNewDefaultConfig((Application)getApplicationContext()));
	}

	public boolean onOptionsItemSelected(MenuItem item) {
		final int itemId = item.getItemId();
		if (itemId == MENU_ABOUT) {
			return startFragActivity("AboutFragment");
		} else if (itemId == MENU_SECURID) {
			return startFragActivity("TokenParentFragment");
		} else if (itemId == MENU_REPORT_PROBLEM) {
			sendProblemReport();
			return true;
		} else if (itemId == MENU_SETTINGS) {
			return startFragActivity("GeneralSettings");
		} else {
			return false;