|
@@ -270,8 +270,14 @@ public class HomeFragment extends Fragment {
|
|
|
setStateNotConnected();
|
|
|
} else {
|
|
|
if(isChecked){
|
|
|
- for(String protocol: getResources().getStringArray(R.array.protocols)){
|
|
|
- if(!MainActivity.getInstance().getHoneyService().isRunning(protocol)) MainActivity.getInstance().getHoneyService().startListener(protocol);
|
|
|
+ if(ProfileManager.getInstance().getCurrentActivatedProfile() == null){
|
|
|
+ for(String protocol: getResources().getStringArray(R.array.protocols)){
|
|
|
+ if(!MainActivity.getInstance().getHoneyService().isRunning(protocol)) MainActivity.getInstance().getHoneyService().startListener(protocol);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ for(String protocol: ProfileManager.getInstance().getCurrentActivatedProfile().getActiveProtocols()){
|
|
|
+ if(!MainActivity.getInstance().getHoneyService().isRunning(protocol)) MainActivity.getInstance().getHoneyService().startListener(protocol);
|
|
|
+ }
|
|
|
}
|
|
|
setStateActive();
|
|
|
} else {
|