diff options
| author | Sean Leonard <meanderingcode@aetherislands.net> | 2013-06-18 23:23:24 -0600 | 
|---|---|---|
| committer | Sean Leonard <meanderingcode@aetherislands.net> | 2013-06-20 18:54:44 -0600 | 
| commit | 79bc86f999d72a9baa548e00deb7c32fcb47e9fe (patch) | |
| tree | 74891b93927f6d0d9ad74312203e63dd1463b4b1 | |
| parent | e2ef783caa56d9d0812c24693a69bcbc23edcbfc (diff) | |
Removed TODO comments, moved to issue tracker
| -rw-r--r-- | src/se/leap/leapclient/Dashboard.java | 16 | ||||
| -rw-r--r-- | src/se/leap/leapclient/EIP.java | 31 | 
2 files changed, 6 insertions, 41 deletions
| diff --git a/src/se/leap/leapclient/Dashboard.java b/src/se/leap/leapclient/Dashboard.java index 392aba54..d8b3a195 100644 --- a/src/se/leap/leapclient/Dashboard.java +++ b/src/se/leap/leapclient/Dashboard.java @@ -65,7 +65,6 @@ public class Dashboard extends Activity implements LogInDialog.LogInDialogInterf  		if(ConfigHelper.shared_preferences == null)  			ConfigHelper.setSharedPreferences(preferences); -		// TODO We should do a better check for config that this!  		if (preferences.contains("provider") && preferences.getString(ConfigHelper.PROVIDER_KEY, null) != null)  			buildDashboard();  		else @@ -75,7 +74,6 @@ public class Dashboard extends Activity implements LogInDialog.LogInDialogInterf  	@Override  	protected void onStop() {  		super.onStop(); -		// TODO null provider should only happen before ConfigurationWizard has run, once...better way?  		if (provider != null)  			if (provider.hasEIP() && provider.getEIPType() == "OpenVPN")  				OpenVPN.removeStateListener(this); @@ -84,7 +82,6 @@ public class Dashboard extends Activity implements LogInDialog.LogInDialogInterf  	@Override  	protected void onResume() {  		super.onResume(); -		// TODO null provider should only happen before ConfigurationWizard has run, once...better way?  		if (provider != null)  			if (provider.hasEIP() && provider.getEIPType() == "OpenVPN")  				OpenVPN.addStateListener(this); @@ -97,7 +94,6 @@ public class Dashboard extends Activity implements LogInDialog.LogInDialogInterf  				startService( new Intent(EIP.ACTION_UPDATE_EIP_SERVICE) );  				buildDashboard();  			} else -				// FIXME Doesn't take partial config into account  				configErrorDialog();  		}  	} @@ -130,10 +126,9 @@ public class Dashboard extends Activity implements LogInDialog.LogInDialogInterf  		providerNameTV = (TextView) findViewById(R.id.providerName);  		providerNameTV.setText(provider.getName()); -		providerNameTV.setTextSize(28); // TODO maybe to some calculating, or a marquee? +		providerNameTV.setTextSize(28);  		if ( provider.hasEIP() ){ -			// FIXME let's schedule this, so we're not doing it when we load the app  			startService( new Intent(EIP.ACTION_UPDATE_EIP_SERVICE) );  			if (provider.getEIPType() == "OpenVPN")  				OpenVPN.addStateListener(this); @@ -180,12 +175,6 @@ public class Dashboard extends Activity implements LogInDialog.LogInDialogInterf  				}  			}  		}); -		 -		//TODO write our info into the view	fragment that will expand with details and a settings button -		// TODO set eip overview subview -		// TODO make eip type clickable, show subview -		// TODO attach vpn status feedback to eip overview view -		// TODO attach settings button to something  	}  	public void toggleEipOverview(View view) { @@ -195,7 +184,6 @@ public class Dashboard extends Activity implements LogInDialog.LogInDialogInterf  			eipDetail.setVisibility(View.VISIBLE);  	} -	// FIXME!! I will move to EIPSettingsFragment and begone!  	public void showEIPLog(View view){  		Intent intent = new Intent(getBaseContext(),LogWindow.class);  		intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT); @@ -230,7 +218,6 @@ public class Dashboard extends Activity implements LogInDialog.LogInDialogInterf  		Intent intent;  		switch (item.getItemId()){  		case R.id.about_leap: -			// TODO move se.leap.openvpn.AboutFragment into our package  			Fragment aboutFragment = new AboutFragment();  			FragmentTransaction trans = getFragmentManager().beginTransaction();  			trans.replace(R.id.dashboardLayout, aboutFragment); @@ -379,7 +366,6 @@ public class Dashboard extends Activity implements LogInDialog.LogInDialogInterf  	public void updateState(final String state, final String logmessage, final int localizedResId) {  		// Note: "states" are not organized anywhere...collected state strings:  		//		NOPROCESS,NONETWORK,BYTECOUNT,AUTH_FAILED + some parsing thing ( WAIT(?),AUTH,GET_CONFIG,ASSIGN_IP,CONNECTED(?) ) -		// TODO follow-back calls to updateState to find set variable values passed as first param & third param (find those strings...are they all R.string.STATE_* ?)  		runOnUiThread(new Runnable() {  			@Override diff --git a/src/se/leap/leapclient/EIP.java b/src/se/leap/leapclient/EIP.java index 3831aaf6..d20921c7 100644 --- a/src/se/leap/leapclient/EIP.java +++ b/src/se/leap/leapclient/EIP.java @@ -132,7 +132,6 @@ public final class EIP extends IntentService {  		@Override  		public void onServiceDisconnected(ComponentName name) { -			// XXX tell mReceiver!!  			mBound = false;  			if (mReceiver != null){ @@ -145,8 +144,6 @@ public final class EIP extends IntentService {  	};  	private void isRunning() { -		// TODO I don't like that whatever requested this never receives a response -		//		if OpenVpnService has not been START_SERVICE, though the one place this is used that's okay  		if (mBound) {  			if (mReceiver != null){  				Bundle resultData = new Bundle(); @@ -188,7 +185,6 @@ public final class EIP extends IntentService {  	}  	private void updateEIPService() { -		// TODO this will also fetch new eip-service.json  		try {  			eipDefinition = ConfigHelper.getJsonFromSharedPref(ConfigHelper.EIP_SERVICE_KEY);  		} catch (JSONException e) { @@ -199,7 +195,8 @@ public final class EIP extends IntentService {  	}  	private OVPNGateway selectGateway() { -		// TODO Logic, yay! +		// TODO Implement gateway selection logic based on TZ or preferences +		// TODO will also remove "first" from OVPNGateway constructor  		return new OVPNGateway("first");  	} @@ -226,8 +223,6 @@ public final class EIP extends IntentService {  			try {  				if ( gw.getJSONObject("capabilities").getJSONArray("transport").toString().contains("openvpn") ){ -					// Now build VPNProfiles and save their UUIDs -					// TODO create multiple profiles for each gateway to allow trying e.g. different ports when connections don't complete  					new OVPNGateway(gw);  				}  			} catch (JSONException e) { @@ -243,7 +238,6 @@ public final class EIP extends IntentService {  		private VpnProfile mVpnProfile;  		private JSONObject gateway; -		// Options get put here in the form that se.leap.openvpn.ConfigParser wants TODO will be gone w/ rewrite  		private HashMap<String,Vector<Vector<String>>> options = new HashMap<String, Vector<Vector<String>>>(); @@ -253,7 +247,7 @@ public final class EIP extends IntentService {  			try { -				// FIXME ha, this got funny..it will get smart once i'm further... +				// TODO when implementing gateway selection logic  				if ( name == "first" ) {  					name = vpl.getProfiles().iterator().next().mName;  				} @@ -268,15 +262,11 @@ public final class EIP extends IntentService {  			}  		} -		// Constructor to create a gateway by definition  		protected OVPNGateway(JSONObject gw){ -			// TODO We're going to build 1 profile per gateway, but eventually several  			gateway = gw; -			// Delete VpnProfile for host, if there already is one -			// FIXME There is a better way to check settings and update them, instead of destroy/rebuild -			// Also, this allows one gateway per hostname entry, so that had better be true from the server! +			// Currently deletes VpnProfile for host, if there already is one, and builds new  			ProfileManager vpl = ProfileManager.getInstance(context);  			Collection<VpnProfile> profiles = vpl.getProfiles();  			for (VpnProfile p : profiles){ @@ -320,10 +310,7 @@ public final class EIP extends IntentService {  			}  		} -		// FIXME this whole thing will get rewritten when we modify ConfigParser -		// 			in fact, don't even bother looking, except to debug  		private void parseOptions(){ -			// TODO we will want to rewrite se.leap.openvpn.ConfigParser soon to be targeted at our use  			// FIXME move these to a common API (& version) definition place, like ProviderAPI or ConfigHelper  			String common_options = "openvpn_configuration"; @@ -332,13 +319,6 @@ public final class EIP extends IntentService {  			String protos = "protocols";  			String capabilities = "capabilities"; -			// FIXME Our gateway definition has keys that are not OpenVPN options... -			// We need a hard spec for the eip-service.json and better handling in this class -			// Then we can stop dumping all the "capabilities" key:values into our options for parsing -			 -			// Put our common options in -			// FIXME quite ugly.  We don't need the nested vectors, as we're not byte-reading file input, but we haven't rewritten the parser, yet -  			Vector<String> arg = new Vector<String>();  			Vector<Vector<String>> args = new Vector<Vector<String>>(); @@ -412,7 +392,6 @@ public final class EIP extends IntentService {  		}  		protected void createVPNProfile(){ -			// TODO take data from eip-service.json for openvpn gateway definitions and create VPNProfile for each  			try {  				ConfigParser cp = new ConfigParser();  				cp.setDefinition(options); @@ -420,7 +399,7 @@ public final class EIP extends IntentService {  				mVpnProfile = vp;  				Log.v(TAG,"Created VPNProfile");  			} catch (ConfigParseError e) { -				// FIXME Being here is bad because we didn't get a VpnProfile! +				// FIXME We didn't get a VpnProfile!  Error handling!  				Log.v(TAG,"Error createing VPNProfile");  				e.printStackTrace();  			} | 
