// Path: app/src/main/java/app/openconnect/core/OpenVPN.java
// public class OpenVPN {
// 
// 	public static void logError(String msg) {
// 	}
// 
// 	public static void logError(int ressourceId, Object... args) {
// 	}
// 
// 	public static void logInfo(String message) {
// 	}
// 
// 	public static void logInfo(int ressourceId, Object... args) {
// 	}
// 
//     public enum ConnectionStatus {
//         LEVEL_CONNECTED,
//         LEVEL_VPNPAUSED,
//         LEVEL_CONNECTING_SERVER_REPLIED,
//         LEVEL_CONNECTING_NO_SERVER_REPLY_YET,
//         LEVEL_NONETWORK,
// 		LEVEL_NOTCONNECTED,
// 		LEVEL_AUTH_FAILED,
// 		LEVEL_WAITING_FOR_USER_INPUT,
// 		UNKNOWN_LEVEL
//     }
// }


import android.content.Intent;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager.NameNotFoundException;
import android.net.Uri;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import app.openconnect.R;
import app.openconnect.core.OpenVPN;
import java.io.File;
import java.util.ArrayList;
import android.app.Fragment;
import android.content.Context;
		return v;
	}

	public void emailMiniDumps()
	{
		//need to "send multiple" to get more than one attachment
		final Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND_MULTIPLE);
		emailIntent.setType("*/*");
		emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, 
				new String[]{"Kevin Cernekee <cernekee@gmail.com>"});

		String version;
		String name="ics-openconnect";
		try {
			PackageInfo packageinfo = getActivity().getPackageManager().getPackageInfo(getActivity().getPackageName(), 0);
			version = packageinfo.versionName;
			name = packageinfo.applicationInfo.name;
		} catch (NameNotFoundException e) {
			version = "error fetching version";
		}


		emailIntent.putExtra(Intent.EXTRA_SUBJECT, String.format("%s %s Minidump",name,version));

		emailIntent.putExtra(Intent.EXTRA_TEXT, "Please describe the issue you have experienced");

		ArrayList<Uri> uris = new ArrayList<Uri>();

		File ldump = getLastestDump(getActivity());
		if(ldump==null) {
// Path: app/src/main/java/app/openconnect/core/OpenVPN.java
// public class OpenVPN {
// 
// 	public static void logError(String msg) {
// 	}
// 
// 	public static void logError(int ressourceId, Object... args) {
// 	}
// 
// 	public static void logInfo(String message) {
// 	}
// 
// 	public static void logInfo(int ressourceId, Object... args) {
// 	}
// 
//     public enum ConnectionStatus {
//         LEVEL_CONNECTED,
//         LEVEL_VPNPAUSED,
//         LEVEL_CONNECTING_SERVER_REPLIED,
//         LEVEL_CONNECTING_NO_SERVER_REPLY_YET,
//         LEVEL_NONETWORK,
// 		LEVEL_NOTCONNECTED,
// 		LEVEL_AUTH_FAILED,
// 		LEVEL_WAITING_FOR_USER_INPUT,
// 		UNKNOWN_LEVEL
//     }
// }


// Path: app/src/main/java/app/openconnect/fragments/SendDumpFragment.java
import android.content.Intent;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager.NameNotFoundException;
import android.net.Uri;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import app.openconnect.R;
import app.openconnect.core.OpenVPN;
import java.io.File;
import java.util.ArrayList;
import android.app.Fragment;
import android.content.Context;

		return v;
	}

	public void emailMiniDumps()
	{
		//need to "send multiple" to get more than one attachment
		final Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND_MULTIPLE);
		emailIntent.setType("*/*");
		emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, 
				new String[]{"Kevin Cernekee <cernekee@gmail.com>"});

		String version;
		String name="ics-openconnect";
		try {
			PackageInfo packageinfo = getActivity().getPackageManager().getPackageInfo(getActivity().getPackageName(), 0);
			version = packageinfo.versionName;
			name = packageinfo.applicationInfo.name;
		} catch (NameNotFoundException e) {
			version = "error fetching version";
		}


		emailIntent.putExtra(Intent.EXTRA_SUBJECT, String.format("%s %s Minidump",name,version));

		emailIntent.putExtra(Intent.EXTRA_TEXT, "Please describe the issue you have experienced");

		ArrayList<Uri> uris = new ArrayList<Uri>();

		File ldump = getLastestDump(getActivity());
		if(ldump==null) {
			OpenVPN.logError("No Minidump found!");