// 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;
/*******************************************************************************
 * Copyright (c) 2014 CodingBad.
 * All rights reserved.  This file is part of ASA.
 * 
 * ASA is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * ASA is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with ASA.  If not, see <http://www.gnu.org/licenses/>.
 * 
 * Contributors:
 * Ayelén Chavez - ashy.on.line@gmail.com
 * Joaquín Rinaudo - jmrinaudo@gmail.com
 ******************************************************************************/
 
 
package com.thesis.asa.devicedata;



public class EditDeviceDataDialog {

	private AlertDialog view;
	private Activity activity;
	private DeviceDataInfoItem selectedItem;
	private View layout;
	private final EditText editAndroidId;
	private final EditText editDeviceId;
	private final EditText editSubscriberId;
	private final EditText editSimSerialNumber;
	private final EditText editLine1Number;
	private final Button applyButton;
	private int androidIdLenght;
	private int deviceIdLenght;
	private int subscriberIdLenght;
	private int simSerialNumberLenght;
	private int line1NumberLenght;
	private DeviceDataSettings model;
	private boolean hasPlus = false;

// 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;

/*******************************************************************************
 * Copyright (c) 2014 CodingBad.
 * All rights reserved.  This file is part of ASA.
 * 
 * ASA is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * ASA is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with ASA.  If not, see <http://www.gnu.org/licenses/>.
 * 
 * Contributors:
 * Ayelén Chavez - ashy.on.line@gmail.com
 * Joaquín Rinaudo - jmrinaudo@gmail.com
 ******************************************************************************/
 
 
package com.thesis.asa.devicedata;



public class EditDeviceDataDialog {

	private AlertDialog view;
	private Activity activity;
	private DeviceDataInfoItem selectedItem;
	private View layout;
	private final EditText editAndroidId;
	private final EditText editDeviceId;
	private final EditText editSubscriberId;
	private final EditText editSimSerialNumber;
	private final EditText editLine1Number;
	private final Button applyButton;
	private int androidIdLenght;
	private int deviceIdLenght;
	private int subscriberIdLenght;
	private int simSerialNumberLenght;
	private int line1NumberLenght;
	private DeviceDataSettings model;
	private boolean hasPlus = false;

	public EditDeviceDataDialog(ResourceActivity a, DeviceDataSettings m, DeviceDataInfoItem item) {