From e60be47e5a46b794846b166993260f17a54a19ad Mon Sep 17 00:00:00 2001 From: cyBerta Date: Sat, 23 Nov 2013 03:23:05 +0100 Subject: switch provider part 1 --- src/se/leap/bitmaskclient/EipServiceFragment.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/se/leap/bitmaskclient/EipServiceFragment.java') diff --git a/src/se/leap/bitmaskclient/EipServiceFragment.java b/src/se/leap/bitmaskclient/EipServiceFragment.java index 4d778b1a..ba6bf561 100644 --- a/src/se/leap/bitmaskclient/EipServiceFragment.java +++ b/src/se/leap/bitmaskclient/EipServiceFragment.java @@ -57,6 +57,8 @@ public class EipServiceFragment extends Fragment implements StateListener, OnCli eipStatus.setOnClickListener(this); eipSwitch = (Switch) eipFragment.findViewById(R.id.eipSwitch); + + eipSwitch.setOnTouchListener(new View.OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent event) { @@ -66,6 +68,7 @@ public class EipServiceFragment extends Fragment implements StateListener, OnCli }); eipSwitch.setOnCheckedChangeListener(this); + return eipFragment; } @@ -152,6 +155,8 @@ public class EipServiceFragment extends Fragment implements StateListener, OnCli eipAutoSwitched = true; } + + /** * Send a command to EIP * -- cgit v1.2.3 From 1df0766479f0235bd7e2afcaecce1eaebacb9ffc Mon Sep 17 00:00:00 2001 From: cyBerta Date: Tue, 26 Nov 2013 04:46:42 +0100 Subject: added FATAL as status for reconnection timout --- src/se/leap/bitmaskclient/EipServiceFragment.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/se/leap/bitmaskclient/EipServiceFragment.java') diff --git a/src/se/leap/bitmaskclient/EipServiceFragment.java b/src/se/leap/bitmaskclient/EipServiceFragment.java index ba6bf561..e182b3fd 100644 --- a/src/se/leap/bitmaskclient/EipServiceFragment.java +++ b/src/se/leap/bitmaskclient/EipServiceFragment.java @@ -12,6 +12,7 @@ import android.content.Intent; import android.os.Bundle; import android.os.Handler; import android.os.ResultReceiver; +import android.util.Log; import android.view.LayoutInflater; import android.view.MotionEvent; import android.view.View; @@ -38,6 +39,9 @@ public class EipServiceFragment extends Fragment implements StateListener, OnCli private EIPReceiver mEIPReceiver; + + public static String TAG = "se.leap.bitmask.EipServiceFragment"; + @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { @@ -191,15 +195,14 @@ public class EipServiceFragment extends Fragment implements StateListener, OnCli statusMessage = getString(R.string.eip_state_connected); getActivity().findViewById(R.id.eipProgress).setVisibility(View.GONE); mEipStartPending = false; - } else if ( (state.equals("NOPROCESS") && !mEipStartPending ) || state.equals("EXITING")) { + } else if ( (state.equals("NOPROCESS") && !mEipStartPending ) || state.equals("EXITING") || state.equals("FATAL")) { statusMessage = getString(R.string.eip_state_not_connected); getActivity().findViewById(R.id.eipProgress).setVisibility(View.GONE); mEipStartPending = false; switchState = false; } else if (state.equals("NOPROCESS")){ statusMessage = logmessage; - } - else { + } else { statusMessage = prefix + " " + logmessage; } @@ -212,6 +215,7 @@ public class EipServiceFragment extends Fragment implements StateListener, OnCli }); } + /** * Inner class for handling messages related to EIP status and control requests * -- cgit v1.2.3