// Path: app/src/main/java/ua/naiksoftware/j2meloader/MainActivity.java
// public class MainActivity extends AppCompatActivity {
// 
// 	private String startPath;
// 	private static final String EXTS = ".jar.zip.java";
// 	private AppsListFragment appsListFragment;
// 	private final List<AppItem> apps = new ArrayList<AppItem>();
// 
// 	/** Путь к папке со сконвертированными приложениями */
// 	private String pathConverted;
// 
// 	private JarConverter converter;
// 
// 	@Override
// 	protected void onCreate(Bundle savedInstanceState) {
// 		super.onCreate(savedInstanceState);
// 		setContentView(R.layout.activity_main);
// 
// 		startPath = Environment.getExternalStorageDirectory().getAbsolutePath();
// 
// 		pathConverted = getApplicationInfo().dataDir + "/converted/";
// 		appsListFragment = new AppsListFragment(apps);
// 		// update the main content by replacing fragments
// 		FragmentManager fragmentManager = getSupportFragmentManager();
// 		fragmentManager.beginTransaction()
// 				.replace(R.id.container, appsListFragment).commit();
// 		updateApps();
// 	}
// 
// 	@Override
// 	public boolean onCreateOptionsMenu(Menu menu) {
// 		getMenuInflater().inflate(R.menu.main, menu);
// 		return super.onCreateOptionsMenu(menu);
// 	}
// 
// 	@Override
// 	public boolean onOptionsItemSelected(MenuItem item) {
// 		int id = item.getItemId();
// 		if (id == R.id.action_settings) {
// 			return true;
// 		}
// 		return super.onOptionsItemSelected(item);
// 	}
// 
// 	public void updateApps() {
// 		apps.clear();
// 		AppItem item;
// 		String author = getString(R.string.author);
// 		String version = getString(R.string.version);
// 		String[] appFolders = new File(pathConverted).list();
// 		if (!(appFolders == null)) {
// 			for (String appFolder : appFolders) {
// 				TreeMap<String, String> params = FileUtils
// 						.loadManifest(new File(pathConverted + appFolder
// 								+ ConfScreen.MIDLET_CONF_FILE));
// 				item = new AppItem(R.drawable.app_default_icon,
// 						params.get("MIDlet-Name"), author
// 								+ params.get("MIDlet-Vendor"), version
// 								+ params.get("MIDlet-Version"));
// 				item.setPath(pathConverted + appFolder);
// 				apps.add(item);
// 			}
// 		}
// 		AppsListAdapter adapter = new AppsListAdapter(this, apps);
// 		appsListFragment.setListAdapter(adapter);
// 	}
// }
// 
// Path: app/src/main/java/filelog/Log.java
// public class Log {
// 
//     private static final String token = " : ";
//     private static final long MAX_LEN = 300 * 1024;//50 Kb
// 
//     public static void d(String tag, String message) {
//         try {
//             boolean noClear;
//             File file = new File(Environment.getExternalStorageDirectory(), "log_j2meloader.txt");
//             if (file.length() > MAX_LEN) {
//                 noClear = false;
//             } else {
//                 noClear = true;
//             }
//             FileWriter fw = new FileWriter(file, noClear);
//             String msg = "\n" + new Date().toLocaleString() + token + tag + token + message;
//             fw.write(msg);
//             fw.flush();
//             fw.close();
//             //Log.d("L", msg);
//         } catch (IOException e) {
//             android.util.Log.e("L", "err in logging", e);
//         }
//     }
// }


import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import ua.naiksoftware.j2meloader.MainActivity;
import android.content.Context;
import android.content.Intent;
import android.os.Environment;
import android.view.LayoutInflater;
import filelog.Log;

			return getContext().getExternalCacheDir();
		} else {
			return getContext().getCacheDir();
		}
	}

	public static int getRequestCode(String requestString) {
		return requestString.hashCode() & 0x7FFFFFFF;
	}

	public static MainActivity getActivity() {
		if (context == null) {
			throw new IllegalStateException(
					"call setContext() before calling getActivity()");
		}
		return context;
	}

	public static void addActivityResultListener(ActivityResultListener listener) {
		if (!resultListeners.contains(listener)) {
			resultListeners.add(listener);
		}
	}

	public static void removeActivityResultListener(
			ActivityResultListener listener) {
		resultListeners.remove(listener);
	}

	public static void notifyOnActivityResult(int requestCode, int resultCode,

// Path: app/src/main/java/ua/naiksoftware/j2meloader/MainActivity.java
// public class MainActivity extends AppCompatActivity {
// 
// 	private String startPath;
// 	private static final String EXTS = ".jar.zip.java";
// 	private AppsListFragment appsListFragment;
// 	private final List<AppItem> apps = new ArrayList<AppItem>();
// 
// 	/** Путь к папке со сконвертированными приложениями */
// 	private String pathConverted;
// 
// 	private JarConverter converter;
// 
// 	@Override
// 	protected void onCreate(Bundle savedInstanceState) {
// 		super.onCreate(savedInstanceState);
// 		setContentView(R.layout.activity_main);
// 
// 		startPath = Environment.getExternalStorageDirectory().getAbsolutePath();
// 
// 		pathConverted = getApplicationInfo().dataDir + "/converted/";
// 		appsListFragment = new AppsListFragment(apps);
// 		// update the main content by replacing fragments
// 		FragmentManager fragmentManager = getSupportFragmentManager();
// 		fragmentManager.beginTransaction()
// 				.replace(R.id.container, appsListFragment).commit();
// 		updateApps();
// 	}
// 
// 	@Override
// 	public boolean onCreateOptionsMenu(Menu menu) {
// 		getMenuInflater().inflate(R.menu.main, menu);
// 		return super.onCreateOptionsMenu(menu);
// 	}
// 
// 	@Override
// 	public boolean onOptionsItemSelected(MenuItem item) {
// 		int id = item.getItemId();
// 		if (id == R.id.action_settings) {
// 			return true;
// 		}
// 		return super.onOptionsItemSelected(item);
// 	}
// 
// 	public void updateApps() {
// 		apps.clear();
// 		AppItem item;
// 		String author = getString(R.string.author);
// 		String version = getString(R.string.version);
// 		String[] appFolders = new File(pathConverted).list();
// 		if (!(appFolders == null)) {
// 			for (String appFolder : appFolders) {
// 				TreeMap<String, String> params = FileUtils
// 						.loadManifest(new File(pathConverted + appFolder
// 								+ ConfScreen.MIDLET_CONF_FILE));
// 				item = new AppItem(R.drawable.app_default_icon,
// 						params.get("MIDlet-Name"), author
// 								+ params.get("MIDlet-Vendor"), version
// 								+ params.get("MIDlet-Version"));
// 				item.setPath(pathConverted + appFolder);
// 				apps.add(item);
// 			}
// 		}
// 		AppsListAdapter adapter = new AppsListAdapter(this, apps);
// 		appsListFragment.setListAdapter(adapter);
// 	}
// }
// 
// Path: app/src/main/java/filelog/Log.java
// public class Log {
// 
//     private static final String token = " : ";
//     private static final long MAX_LEN = 300 * 1024;//50 Kb
// 
//     public static void d(String tag, String message) {
//         try {
//             boolean noClear;
//             File file = new File(Environment.getExternalStorageDirectory(), "log_j2meloader.txt");
//             if (file.length() > MAX_LEN) {
//                 noClear = false;
//             } else {
//                 noClear = true;
//             }
//             FileWriter fw = new FileWriter(file, noClear);
//             String msg = "\n" + new Date().toLocaleString() + token + tag + token + message;
//             fw.write(msg);
//             fw.flush();
//             fw.close();
//             //Log.d("L", msg);
//         } catch (IOException e) {
//             android.util.Log.e("L", "err in logging", e);
//         }
//     }
// }


// Path: app/src/main/java/javax/microedition/util/ContextHolder.java
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import ua.naiksoftware.j2meloader.MainActivity;
import android.content.Context;
import android.content.Intent;
import android.os.Environment;
import android.view.LayoutInflater;
import filelog.Log;

			return getContext().getExternalCacheDir();
		} else {
			return getContext().getCacheDir();
		}
	}

	public static int getRequestCode(String requestString) {
		return requestString.hashCode() & 0x7FFFFFFF;
	}

	public static MainActivity getActivity() {
		if (context == null) {
			throw new IllegalStateException(
					"call setContext() before calling getActivity()");
		}
		return context;
	}

	public static void addActivityResultListener(ActivityResultListener listener) {
		if (!resultListeners.contains(listener)) {
			resultListeners.add(listener);
		}
	}

	public static void removeActivityResultListener(
			ActivityResultListener listener) {
		resultListeners.remove(listener);
	}

	public static void notifyOnActivityResult(int requestCode, int resultCode,

			Intent data) {
