Fixed some NPE & tile fix

This commit is contained in:
PeratX 2017-09-03 11:20:50 +08:00
parent 3e736e1648
commit c376c61b65
2 changed files with 5 additions and 7 deletions

View File

@ -268,6 +268,10 @@ public class DNSTestFragment extends ToolbarFragment {
public void handleMessage(Message msg) {
super.handleMessage(msg);
if (startTestBtn == null) {
return;
}
switch (msg.what) {
case MSG_DISPLAY_STATUS:
textViewTestInfo.setText((String) msg.obj);

View File

@ -5,7 +5,6 @@ import android.os.Build;
import android.service.quicksettings.Tile;
import android.service.quicksettings.TileService;
import android.support.annotation.RequiresApi;
import org.itxtech.daedalus.Daedalus;
import org.itxtech.daedalus.R;
import org.itxtech.daedalus.activity.MainActivity;
@ -33,12 +32,7 @@ public class DaedalusTileService extends TileService {
.setAction(Intent.ACTION_VIEW)
.putExtra(MainActivity.LAUNCH_ACTION, activate ? MainActivity.LAUNCH_ACTION_DEACTIVATE : MainActivity.LAUNCH_ACTION_ACTIVATE);
startActivityAndCollapse(intent);
}
@Override
public void onTileAdded() {
updateTile();
startActivity(intent);
}
@Override