Просмотр исходного кода

changed behaviour of main monitoring switch in services fragment

Daniel Lazar 10 лет назад
Родитель
Сommit
381e077113

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

@@ -89,7 +89,9 @@ public class ServicesFragment extends Fragment{
 
 				for(int i = 0; i < protocols.length; i++ ){
 					protocolList.get(i).attacks = String.valueOf(dbh.numBssidSeen(protocolList.get(i).protocol, mConnectionInfo.getString(getString(R.string.connection_info_bssid), null)));
-
+				}
+				if (!MainActivity.getInstance().getHoneyService().hasRunningListeners()) {
+					setStateNotActive();
 				}
 				adapter.notifyDataSetChanged();
 			}
@@ -127,7 +129,6 @@ public class ServicesFragment extends Fragment{
 			protocolList.get(i).attacks = String.valueOf(dbh.numBssidSeen(protocolList.get(i).protocol, mConnectionInfo.getString(getString(R.string.connection_info_bssid), null)));
 		//	protocolList.get(i).initialValue = Integer.valueOf(protocolList.get(i).attacks);
 		}
-
 		adapter = new ServicesListAdapter(getActivity().getBaseContext(), protocolList);
 		adapter.setActivity(this.getActivity(), this.mServicesSwitchService, this.switchChangeListener);
 		list.setAdapter(adapter);