Allow disconnecting when device is connecting
Also require "initialized" state for "find device"
This commit is contained in:
parent
9a3769aeba
commit
070876db06
|
@ -170,8 +170,10 @@ public class ControlCenter extends Activity {
|
||||||
menu.removeItem(R.id.controlcenter_take_screenshot);
|
menu.removeItem(R.id.controlcenter_take_screenshot);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!selectedDevice.isConnected()) {
|
if (selectedDevice.getState() == GBDevice.State.NOT_CONNECTED) {
|
||||||
menu.removeItem(R.id.controlcenter_disconnect);
|
menu.removeItem(R.id.controlcenter_disconnect);
|
||||||
|
}
|
||||||
|
if (!selectedDevice.isInitialized()) {
|
||||||
menu.removeItem(R.id.controlcenter_find_device);
|
menu.removeItem(R.id.controlcenter_find_device);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue