// Path: ASA/src/com/thesis/asa/resourcemvc/ResourceActivity.java
// public abstract class ResourceActivity extends android.support.v4.app.FragmentActivity
// 	{
// 		protected int isSystem;	
// 		protected Resource resource;
// 		protected ResourceView view;
// 		
// 		public int isSystem(){
// 			return isSystem;	
// 		}
// 		
// 		public abstract String getSelectedApplication() throws Exception;
// 		
// 		public void loadDefaultSettings() {
// 			Object defaultConfiguration = resource.defaultConfiguration(isSystem);
// 			Object[] settings = resource.loadSettingsFromConfiguration(defaultConfiguration);
// 			view.displaySettingsFromConfiguration(settings);
// 		}
// 						
// 		protected abstract void loadIntent(Bundle extras);
// 		
// 		protected  abstract OnClickListener getController();
// 		
// 		@Override
// 		public void onCreate(Bundle bundle)
// 		{
// 			super.onCreate(bundle);
// 			
// 			Intent intent = getIntent();
// 			Bundle extras = intent.getExtras();
// 			String name = extras.getString(SlidePageFragment.RESOURCE);
// 			try {
// 				
// 				resource = (Resource) Class.forName(name).getDeclaredConstructor(Context.class).newInstance(this);
// 				view = (ResourceView) Class.forName(name+"View").getDeclaredConstructor(ResourceActivity.class, Resource.class).newInstance(this, resource);
// 			}
// 			catch (Exception e) {
// 				Log.d(Utilities.ERROR,"ERROR AT LOADING CLASS OR CLASS OBJECT INITIALIZATION"+name+"View");
// 				Log.d(Utilities.ERROR,Log.getStackTraceString(e));
// 			}
// 		
// 			loadIntent(extras);
// 			
// 			// Sets the View Layer
// 			view.showResourceViewIn();
// 			
// 			loadSettings();
// 						
// 			Button apply = (Button) findViewById(R.id.applyButton);
// 			OnClickListener controller = getController();
// 			apply.setOnClickListener(controller);
// 
// 			Button cancel = (Button) findViewById(R.id.cancelButton);
// 			cancel.setOnClickListener(controller);					
// 		}
// 		
// 		protected abstract void loadSettings();
// 	}


import android.widget.EditText;
import android.widget.TextView;
import com.thesis.asa.R;
import com.thesis.asa.resourcemvc.ResourceActivity;
import android.app.Activity;
import android.app.AlertDialog;
import android.text.InputFilter;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.Button;
		return selectedItem;
	}

	public boolean hasValidDeviceId() {
		String deviceId = editDeviceId.getText().toString().trim();
		return deviceId.length() == deviceIdLenght;
	}

	public boolean hasValidSubscriberId() {
		String subscriberId = editSubscriberId.getText().toString().trim();
		return subscriberId.length() == subscriberIdLenght;
	}

	public boolean hasValidSimSerialNumber() {
		String simSerialNumber = editSimSerialNumber.getText().toString().trim();
		return simSerialNumber.length() == simSerialNumberLenght;
	}

	public boolean hasValidLine1Number() {
		String line1Number = editLine1Number.getText().toString().trim();
		return line1Number.length() == line1NumberLenght;
	}

	public void saveConfiguration() {
		String[] info = new String[5];
		info[0] = editAndroidId.getText().toString().trim();
		info[1] = editDeviceId.getText().toString().trim();
		info[2] = editSubscriberId.getText().toString().trim();
		info[3] = editSimSerialNumber.getText().toString().trim();
		if (hasPlus)
// Path: ASA/src/com/thesis/asa/resourcemvc/ResourceActivity.java
// public abstract class ResourceActivity extends android.support.v4.app.FragmentActivity
// 	{
// 		protected int isSystem;	
// 		protected Resource resource;
// 		protected ResourceView view;
// 		
// 		public int isSystem(){
// 			return isSystem;	
// 		}
// 		
// 		public abstract String getSelectedApplication() throws Exception;
// 		
// 		public void loadDefaultSettings() {
// 			Object defaultConfiguration = resource.defaultConfiguration(isSystem);
// 			Object[] settings = resource.loadSettingsFromConfiguration(defaultConfiguration);
// 			view.displaySettingsFromConfiguration(settings);
// 		}
// 						
// 		protected abstract void loadIntent(Bundle extras);
// 		
// 		protected  abstract OnClickListener getController();
// 		
// 		@Override
// 		public void onCreate(Bundle bundle)
// 		{
// 			super.onCreate(bundle);
// 			
// 			Intent intent = getIntent();
// 			Bundle extras = intent.getExtras();
// 			String name = extras.getString(SlidePageFragment.RESOURCE);
// 			try {
// 				
// 				resource = (Resource) Class.forName(name).getDeclaredConstructor(Context.class).newInstance(this);
// 				view = (ResourceView) Class.forName(name+"View").getDeclaredConstructor(ResourceActivity.class, Resource.class).newInstance(this, resource);
// 			}
// 			catch (Exception e) {
// 				Log.d(Utilities.ERROR,"ERROR AT LOADING CLASS OR CLASS OBJECT INITIALIZATION"+name+"View");
// 				Log.d(Utilities.ERROR,Log.getStackTraceString(e));
// 			}
// 		
// 			loadIntent(extras);
// 			
// 			// Sets the View Layer
// 			view.showResourceViewIn();
// 			
// 			loadSettings();
// 						
// 			Button apply = (Button) findViewById(R.id.applyButton);
// 			OnClickListener controller = getController();
// 			apply.setOnClickListener(controller);
// 
// 			Button cancel = (Button) findViewById(R.id.cancelButton);
// 			cancel.setOnClickListener(controller);					
// 		}
// 		
// 		protected abstract void loadSettings();
// 	}


// Path: ASA/src/com/thesis/asa/devicedata/EditDeviceDataDialog.java
import android.widget.EditText;
import android.widget.TextView;
import com.thesis.asa.R;
import com.thesis.asa.resourcemvc.ResourceActivity;
import android.app.Activity;
import android.app.AlertDialog;
import android.text.InputFilter;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.Button;

		return selectedItem;
	}

	public boolean hasValidDeviceId() {
		String deviceId = editDeviceId.getText().toString().trim();
		return deviceId.length() == deviceIdLenght;
	}

	public boolean hasValidSubscriberId() {
		String subscriberId = editSubscriberId.getText().toString().trim();
		return subscriberId.length() == subscriberIdLenght;
	}

	public boolean hasValidSimSerialNumber() {
		String simSerialNumber = editSimSerialNumber.getText().toString().trim();
		return simSerialNumber.length() == simSerialNumberLenght;
	}

	public boolean hasValidLine1Number() {
		String line1Number = editLine1Number.getText().toString().trim();
		return line1Number.length() == line1NumberLenght;
	}

	public void saveConfiguration() {
		String[] info = new String[5];
		info[0] = editAndroidId.getText().toString().trim();
		info[1] = editDeviceId.getText().toString().trim();
		info[2] = editSubscriberId.getText().toString().trim();
		info[3] = editSimSerialNumber.getText().toString().trim();
		if (hasPlus)
			info[4] = "+"+editLine1Number.getText().toString().trim();