Fixed repeated request for create first account when all the accounts where removed...
[pub/Android/ownCloud.git] / src / com / owncloud / android / ui / activity / FileActivity.java
index d645d6e..8adb9ba 100644 (file)
@@ -224,7 +224,13 @@ public abstract class FileActivity extends SherlockFragmentActivity {
                 Log_OC.e(TAG, "Account creation callback with null bundle");
             }
             if (mAccount == null) {
-                finish();
+                if (isTaskRoot()) {
+                    Log_OC.e(TAG, "FINISHING");
+                    finish();
+                } else {
+                    Log_OC.e(TAG, "MOVING BACK");
+                    moveTaskToBack(true);
+                }
             }
         }