Allow disconnecting when device is connecting

Also require "initialized" state for "find device"
This commit is contained in:
cpfeiffer 2015-08-24 13:19:17 +02:00
parent 9a3769aeba
commit 070876db06
1 changed files with 3 additions and 1 deletions

View File

@ -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);
} }