only allow starting AppManager after device is initalized (else platform cant be determined)

This commit is contained in:
Andreas Shimokawa 2016-03-03 14:29:46 +01:00
parent 902ff39c0b
commit 864e0953d9
1 changed files with 1 additions and 1 deletions

View File

@ -131,7 +131,7 @@ public class ControlCenter extends Activity {
@Override @Override
public void onItemClick(AdapterView parent, View v, int position, long id) { public void onItemClick(AdapterView parent, View v, int position, long id) {
GBDevice gbDevice = deviceList.get(position); GBDevice gbDevice = deviceList.get(position);
if (gbDevice.isConnected()) { if (gbDevice.isInitialized()) {
DeviceCoordinator coordinator = DeviceHelper.getInstance().getCoordinator(gbDevice); DeviceCoordinator coordinator = DeviceHelper.getInstance().getCoordinator(gbDevice);
Class<? extends Activity> primaryActivity = coordinator.getPrimaryActivity(); Class<? extends Activity> primaryActivity = coordinator.getPrimaryActivity();
if (primaryActivity != null) { if (primaryActivity != null) {