summaryrefslogtreecommitdiff
path: root/src/se/leap/bitmaskclient/EipServiceFragment.java
diff options
context:
space:
mode:
authorSean Leonard <meanderingcode@aetherislands.net>2013-12-04 19:36:58 -0800
committerSean Leonard <meanderingcode@aetherislands.net>2013-12-04 19:36:58 -0800
commitd594e8579d95b304bdd13ebc6786b2bf7d672cf5 (patch)
treea0670d1abaf2a5e3ab546035e5f37429f1a052c9 /src/se/leap/bitmaskclient/EipServiceFragment.java
parent53b7ba635f8a37db6594eae135ef5fbb3a934351 (diff)
parent6f31f91a82f9822a34ae55c5275130d23be29f4b (diff)
Merge branch 'develop' into release-0.2.3
Diffstat (limited to 'src/se/leap/bitmaskclient/EipServiceFragment.java')
-rw-r--r--src/se/leap/bitmaskclient/EipServiceFragment.java15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/se/leap/bitmaskclient/EipServiceFragment.java b/src/se/leap/bitmaskclient/EipServiceFragment.java
index 4d778b1a..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) {
@@ -57,6 +61,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 +72,7 @@ public class EipServiceFragment extends Fragment implements StateListener, OnCli
});
eipSwitch.setOnCheckedChangeListener(this);
+
return eipFragment;
}
@@ -152,6 +159,8 @@ public class EipServiceFragment extends Fragment implements StateListener, OnCli
eipAutoSwitched = true;
}
+
+
/**
* Send a command to EIP
*
@@ -186,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;
}
@@ -207,6 +215,7 @@ public class EipServiceFragment extends Fragment implements StateListener, OnCli
});
}
+
/**
* Inner class for handling messages related to EIP status and control requests
*