Fixed some NPE & tile fix
This commit is contained in:
parent
3e736e1648
commit
c376c61b65
@ -268,6 +268,10 @@ public class DNSTestFragment extends ToolbarFragment {
|
|||||||
public void handleMessage(Message msg) {
|
public void handleMessage(Message msg) {
|
||||||
super.handleMessage(msg);
|
super.handleMessage(msg);
|
||||||
|
|
||||||
|
if (startTestBtn == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
switch (msg.what) {
|
switch (msg.what) {
|
||||||
case MSG_DISPLAY_STATUS:
|
case MSG_DISPLAY_STATUS:
|
||||||
textViewTestInfo.setText((String) msg.obj);
|
textViewTestInfo.setText((String) msg.obj);
|
||||||
|
@ -5,7 +5,6 @@ import android.os.Build;
|
|||||||
import android.service.quicksettings.Tile;
|
import android.service.quicksettings.Tile;
|
||||||
import android.service.quicksettings.TileService;
|
import android.service.quicksettings.TileService;
|
||||||
import android.support.annotation.RequiresApi;
|
import android.support.annotation.RequiresApi;
|
||||||
|
|
||||||
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.activity.MainActivity;
|
||||||
@ -33,12 +32,7 @@ public class DaedalusTileService extends TileService {
|
|||||||
.setAction(Intent.ACTION_VIEW)
|
.setAction(Intent.ACTION_VIEW)
|
||||||
.putExtra(MainActivity.LAUNCH_ACTION, activate ? MainActivity.LAUNCH_ACTION_DEACTIVATE : MainActivity.LAUNCH_ACTION_ACTIVATE);
|
.putExtra(MainActivity.LAUNCH_ACTION, activate ? MainActivity.LAUNCH_ACTION_DEACTIVATE : MainActivity.LAUNCH_ACTION_ACTIVATE);
|
||||||
|
|
||||||
startActivityAndCollapse(intent);
|
startActivity(intent);
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onTileAdded() {
|
|
||||||
updateTile();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
x
Reference in New Issue
Block a user