Removed useless if

This commit is contained in:
PeratX 2017-05-23 20:48:57 +08:00
parent d2d7e9a726
commit 4bfb1cd12b
2 changed files with 2 additions and 11 deletions

View File

@ -65,10 +65,6 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
return instance;
}
public ToolbarFragment getCurrentFragment() {
return currentFragment;
}
@Override
protected void onCreate(Bundle savedInstanceState) {
setTheme(R.style.AppTheme_NoActionBar_TransparentStatusBar);

View File

@ -19,7 +19,6 @@ import de.measite.minidns.source.NetworkDataSource;
import de.measite.minidns.util.InetAddressUtil;
import org.itxtech.daedalus.Daedalus;
import org.itxtech.daedalus.R;
import org.itxtech.daedalus.activity.MainActivity;
import org.itxtech.daedalus.util.DnsServerHelper;
import java.io.IOException;
@ -204,14 +203,10 @@ public class DnsTestFragment extends ToolbarFragment {
switch (msg.what) {
case MSG_DISPLAY_STATUS:
if (MainActivity.getInstance().getCurrentFragment() instanceof DnsTestFragment) {
textViewTestInfo.setText((String) msg.obj);
}
textViewTestInfo.setText((String) msg.obj);
break;
case MSG_TEST_DONE:
if (MainActivity.getInstance().getCurrentFragment() instanceof DnsTestFragment) {
startTestBtn.setVisibility(View.VISIBLE);
}
startTestBtn.setVisibility(View.VISIBLE);
stopThread();
break;
}