Removed useless if
This commit is contained in:
parent
d2d7e9a726
commit
4bfb1cd12b
@ -65,10 +65,6 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
|
|||||||
return instance;
|
return instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ToolbarFragment getCurrentFragment() {
|
|
||||||
return currentFragment;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
setTheme(R.style.AppTheme_NoActionBar_TransparentStatusBar);
|
setTheme(R.style.AppTheme_NoActionBar_TransparentStatusBar);
|
||||||
|
@ -19,7 +19,6 @@ import de.measite.minidns.source.NetworkDataSource;
|
|||||||
import de.measite.minidns.util.InetAddressUtil;
|
import de.measite.minidns.util.InetAddressUtil;
|
||||||
import org.itxtech.daedalus.Daedalus;
|
import org.itxtech.daedalus.Daedalus;
|
||||||
import org.itxtech.daedalus.R;
|
import org.itxtech.daedalus.R;
|
||||||
import org.itxtech.daedalus.activity.MainActivity;
|
|
||||||
import org.itxtech.daedalus.util.DnsServerHelper;
|
import org.itxtech.daedalus.util.DnsServerHelper;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
@ -204,14 +203,10 @@ public class DnsTestFragment extends ToolbarFragment {
|
|||||||
|
|
||||||
switch (msg.what) {
|
switch (msg.what) {
|
||||||
case MSG_DISPLAY_STATUS:
|
case MSG_DISPLAY_STATUS:
|
||||||
if (MainActivity.getInstance().getCurrentFragment() instanceof DnsTestFragment) {
|
textViewTestInfo.setText((String) msg.obj);
|
||||||
textViewTestInfo.setText((String) msg.obj);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case MSG_TEST_DONE:
|
case MSG_TEST_DONE:
|
||||||
if (MainActivity.getInstance().getCurrentFragment() instanceof DnsTestFragment) {
|
startTestBtn.setVisibility(View.VISIBLE);
|
||||||
startTestBtn.setVisibility(View.VISIBLE);
|
|
||||||
}
|
|
||||||
stopThread();
|
stopThread();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user