From 0a6028109cbebac4d59d1edc502abf6db4a933c1 Mon Sep 17 00:00:00 2001 From: Rafa Hernandez Date: Wed, 28 Mar 2018 13:42:41 -0400 Subject: [PATCH] fix(enroll): check if data is empty Signed-off-by: Rafa Hernandez --- app/src/main/java/org/flyve/mdm/agent/ui/SplashActivity.java | 2 +- .../java/org/flyve/mdm/agent/ui/StartEnrollmentActivity.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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(); }