diff --git a/app/src/main/java/org/flyve/mdm/agent/ui/SplashActivity.java b/app/src/main/java/org/flyve/mdm/agent/ui/SplashActivity.java index e3a2de0c80..c4f7cb4bc7 100644 --- a/app/src/main/java/org/flyve/mdm/agent/ui/SplashActivity.java +++ b/app/src/main/java/org/flyve/mdm/agent/ui/SplashActivity.java @@ -83,7 +83,7 @@ protected void onCreate(Bundle savedInstanceState) { // if broker is on cache open the main activity String broker = cache.getBroker(); - if(broker != null) { + if(!broker.isEmpty()) { // if user is enrolled show landing screen FlyveLog.d(cache.getSessionToken()); diff --git a/app/src/main/java/org/flyve/mdm/agent/ui/StartEnrollmentActivity.java b/app/src/main/java/org/flyve/mdm/agent/ui/StartEnrollmentActivity.java index 5a97016f38..6fe88eacd6 100644 --- a/app/src/main/java/org/flyve/mdm/agent/ui/StartEnrollmentActivity.java +++ b/app/src/main/java/org/flyve/mdm/agent/ui/StartEnrollmentActivity.java @@ -70,7 +70,7 @@ protected void onCreate(Bundle savedInstanceState) { MqttData cache = new MqttData( StartEnrollmentActivity.this ); String broker = cache.getBroker(); - if(broker != null) { + if(!broker.isEmpty()) { openMain(); }