private void setStartedState() { mPortList.clear(); System.getNMap().synScan(System.getCurrentTarget(), mScanReceiver, mCustomPorts).start(); mRunning = true; }
private void setStoppedState() { System.getNMap().kill(); mScanProgress.setVisibility(View.INVISIBLE); mRunning = false; mScanToggleButton.setChecked(false); if (mPortList.size() == 0) Toast.makeText(this, getString(R.string.no_open_ports), Toast.LENGTH_LONG).show(); }