Browse Source

Merge branch 'master' of https://git.tk.informatik.tu-darmstadt.de/scm-ssi-student-hostagev2

Julien Clauter 10 years ago
parent
commit
4df011c9b4

+ 0 - 134
res/layout-land/fragment_services.xml

@@ -1,134 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-              android:orientation="horizontal"
-              android:layout_width="match_parent"
-              android:layout_height="match_parent">
-
-    <RelativeLayout
-            android:layout_width="fill_parent"
-            android:layout_height="wrap_content"
-            android:layout_weight="3">
-
-        <LinearLayout android:layout_width="fill_parent"
-                      android:layout_height="wrap_content"
-                      android:orientation="vertical">
-
-            <LinearLayout android:layout_width="fill_parent"
-                          android:layout_height="wrap_content"
-                          android:orientation="vertical"
-                          android:layout_weight="1"
-                          android:layout_marginTop="20dp"
-                          android:layout_marginLeft="15dp">
-                <ImageView
-                        android:id="@+id/services_button_connection_info"
-                        android:layout_width="fill_parent"
-                        android:layout_height="wrap_content"
-                        android:scaleType="fitEnd"
-                        android:src="@android:drawable/ic_menu_info_details"/>
-
-                <TextView
-                    android:id="@+id/textView"
-                    android:layout_width="fill_parent"
-                    android:layout_height="0dip"
-                    android:layout_marginLeft="15dp"
-                    android:layout_weight="1"
-                    android:layout_marginTop="0dp"
-                    android:text="@string/current_connection"
-                    android:textSize="18sp"
-                    android:textStyle="bold" />
-
-             </LinearLayout>
-             <RelativeLayout android:layout_width="fill_parent"
-                             android:layout_height="wrap_content"
-                            android:orientation="horizontal"
-                            android:layout_weight="1"
-                            android:layout_gravity="center_vertical"
-                            android:layout_marginLeft="15dp"
-                            android:layout_marginTop="5dp">
-                <View
-                        android:layout_width="fill_parent"
-                        android:layout_height="1dp"
-                        android:layout_weight="1"
-                        android:layout_marginLeft="15dp"
-                        android:layout_marginRight="15dp"
-                        android:background="@android:color/darker_gray" />
-
-                  <TextView
-                        android:id="@+id/services_text_name"
-                        android:layout_width="fill_parent"
-                        android:layout_height="wrap_content"
-                        android:layout_marginTop="10dp"
-                        android:layout_marginLeft="15dp"
-                        android:layout_marginRight="15dp"
-                        android:layout_alignParentTop="false"
-                        android:layout_centerHorizontal="true"
-                        android:layout_gravity="center_horizontal"
-                        android:text="Eduroam"
-                        android:textAppearance="?android:attr/textAppearanceLarge"
-                        android:textSize="26sp" />
-             </RelativeLayout>
-        </LinearLayout>
-    </RelativeLayout>
-
-    <LinearLayout android:layout_width="fill_parent"
-                    android:layout_height="wrap_content"
-                    android:layout_weight="2"
-                    android:orientation="vertical">
-
-        <RelativeLayout
-                android:layout_width="fill_parent"
-                android:layout_height="wrap_content"
-                android:baselineAligned="false"
-                android:orientation="horizontal"
-                android:weightSum="1" >
-
-            <TextView
-                    android:id="@+id/textView"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_alignParentEnd="true"
-                    android:layout_alignParentLeft="true"
-                    android:layout_alignParentRight="false"
-                    android:layout_marginLeft="15dp"
-                    android:layout_marginTop="35dp"
-                    android:text="@string/monitor_services"
-                    android:textStyle="bold"
-                    android:textSize="20sp"/>
-
-            <Switch
-                    android:id="@+id/service_switch_connection"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_alignParentBottom="false"
-                    android:layout_alignParentEnd="false"
-                    android:layout_alignParentLeft="false"
-                    android:layout_alignParentRight="true"
-                    android:layout_alignParentTop="false"
-                    android:layout_gravity="right"
-                    android:layout_marginLeft="0dp"
-                    android:layout_marginRight="15dp"
-                    android:layout_marginTop="30dp"
-                    android:layout_marginBottom="0dp"
-                    android:checked="false"
-                    android:textSize="10sp" />
-
-        </RelativeLayout>
-        <View
-            android:layout_width="fill_parent"
-            android:layout_height="1dp"
-            android:layout_marginLeft="15dp"
-            android:layout_marginRight="15dp"
-            android:background="@android:color/darker_gray" />
-
-    <ListView android:layout_width="fill_parent"
-              android:layout_height="wrap_content"
-              android:id="@+id/services_list_view"
-              android:layout_marginLeft="15dp"
-              android:layout_marginRight="15dp"
-            >
-
-
-    </ListView>
-    </LinearLayout>
-</LinearLayout>

+ 2 - 4
src/de/tudarmstadt/informatik/hostage/ui2/fragment/ServicesFragment.java

@@ -20,7 +20,6 @@ import android.widget.Switch;
 import android.widget.TextView;
 
 import java.util.ArrayList;
-import java.util.Arrays;
 
 import de.tudarmstadt.informatik.hostage.HoneyHandler;
 import de.tudarmstadt.informatik.hostage.R;
@@ -69,6 +68,7 @@ public class ServicesFragment extends Fragment{
 				connectionInfoDialogFragment.show(getFragmentManager().beginTransaction(), connectionInfoDialogFragment.getTag());
 			}
 		});
+
 	}
 
 	public void updateUI(){
@@ -120,6 +120,7 @@ public class ServicesFragment extends Fragment{
 		}
 	}
 
+
 	@Override
 	public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState){
 
@@ -168,9 +169,6 @@ public class ServicesFragment extends Fragment{
 							if (isChecked) {
 								for (String protocol : protocols) {
 									if (!MainActivity.getInstance().getHoneyService().isRunning(protocol)) {
-										System.out.println(
-												"SERVICESFRAGMENT starts LISTENER for PROTO:"
-														+ protocol);
 										MainActivity.getInstance().getHoneyService().startListener(protocol);
 									}
 								}