// Path: java/anyremote/client/android/util/Address.java
// public class Address {
// 	public String name;
// 	public String URL;
// 	public String pass;	
// 	public boolean autoconnect;	
// }
// 
// Path: java/anyremote/client/android/util/ProtocolMessage.java
// public class ProtocolMessage {
// 	public static final int FULL     = 0;
// 	public static final int FIRST    = 1;
// 	public static final int INTERMED = 2;
// 	public static final int LAST     = 3;
// 	
// 	public int id;
// 	public int stage;
// 	public Vector tokens;
// }


import java.io.File;
import java.net.InetAddress;
import java.net.NetworkInterface;
import java.net.SocketException;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Enumeration;
import java.util.TreeMap;
import java.util.Vector;
import android.content.Intent;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Color;
import android.app.Activity;
import android.app.ProgressDialog;
import android.os.Bundle;
import android.os.Environment;
import android.os.Handler;
import android.os.Message;
import android.util.Log;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.Window;
import android.widget.Toast;
import anyremote.client.android.util.Address;
import anyremote.client.android.util.ProtocolMessage;
import anyremote.client.android.R;
        }

		if (finishFlag) {
            return; // on destroy
        }

		if (currForm == which) {
			_log("setCurrentView TRY TO SWITCH TO THE SAME FORM ???");
			//if (currForm != SEARCH_FORM) {
				_log("setCurrentView SKIP SWITCH TO THE SAME FORM ???");
				return;
			//}
		}
		
		prevForm = currForm;
		currForm = which;

		if (currForm != prevForm) {
						
			// finish current form
			switch (prevForm) { 
			case SEARCH_FORM:
				_log("[AR] setCurrentView mess SEARCH_FORM with some other");
				break;
	
			case CONTROL_FORM:
			case LIST_FORM:
			case TEXT_FORM:
			case WMAN_FORM:
				_log("setCurrentView stop "+prevForm);
// Path: java/anyremote/client/android/util/Address.java
// public class Address {
// 	public String name;
// 	public String URL;
// 	public String pass;	
// 	public boolean autoconnect;	
// }
// 
// Path: java/anyremote/client/android/util/ProtocolMessage.java
// public class ProtocolMessage {
// 	public static final int FULL     = 0;
// 	public static final int FIRST    = 1;
// 	public static final int INTERMED = 2;
// 	public static final int LAST     = 3;
// 	
// 	public int id;
// 	public int stage;
// 	public Vector tokens;
// }


// Path: java/anyremote/client/android/anyRemote.java
import java.io.File;
import java.net.InetAddress;
import java.net.NetworkInterface;
import java.net.SocketException;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Enumeration;
import java.util.TreeMap;
import java.util.Vector;
import android.content.Intent;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Color;
import android.app.Activity;
import android.app.ProgressDialog;
import android.os.Bundle;
import android.os.Environment;
import android.os.Handler;
import android.os.Message;
import android.util.Log;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.Window;
import android.widget.Toast;
import anyremote.client.android.util.Address;
import anyremote.client.android.util.ProtocolMessage;
import anyremote.client.android.R;

        }

		if (finishFlag) {
            return; // on destroy
        }

		if (currForm == which) {
			_log("setCurrentView TRY TO SWITCH TO THE SAME FORM ???");
			//if (currForm != SEARCH_FORM) {
				_log("setCurrentView SKIP SWITCH TO THE SAME FORM ???");
				return;
			//}
		}
		
		prevForm = currForm;
		currForm = which;

		if (currForm != prevForm) {
						
			// finish current form
			switch (prevForm) { 
			case SEARCH_FORM:
				_log("[AR] setCurrentView mess SEARCH_FORM with some other");
				break;
	
			case CONTROL_FORM:
			case LIST_FORM:
			case TEXT_FORM:
			case WMAN_FORM:
				_log("setCurrentView stop "+prevForm);
				protocol.sendToActivity(prevForm, Dispatcher.CMD_CLOSE,ProtocolMessage.FULL);