Merge branch 'develop' into review_build_process
[pub/Android/ownCloud.git] / src / com / owncloud / android / ui / activity / LandingActivity.java
index e90d36a..45ed279 100644 (file)
@@ -2,9 +2,8 @@
  *   Copyright (C) 2011 Bartek Przybylski\r
  *\r
  *   This program is free software: you can redistribute it and/or modify\r
- *   it under the terms of the GNU General Public License as published by\r
- *   the Free Software Foundation, either version 3 of the License, or\r
- *   (at your option) any later version.\r
+ *   it under the terms of the GNU General Public License version 2,\r
+ *   as published by the Free Software Foundation.\r
  *\r
  *   This program is distributed in the hope that it will be useful,\r
  *   but WITHOUT ANY WARRANTY; without even the implied warranty of\r
@@ -18,7 +17,6 @@
 package com.owncloud.android.ui.activity;\r
 \r
 import com.actionbarsherlock.app.SherlockFragmentActivity;\r
-import com.owncloud.android.authenticator.AccountAuthenticator;\r
 import com.owncloud.android.ui.adapter.LandingScreenAdapter;\r
 \r
 import android.accounts.Account;\r
@@ -34,6 +32,8 @@ import android.widget.AdapterView;
 import android.widget.AdapterView.OnItemClickListener;\r
 import android.widget.GridView;\r
 import android.widget.Toast;\r
+\r
+import com.owncloud.android.MainApp;\r
 import com.owncloud.android.R;\r
 \r
 /**\r
@@ -115,7 +115,7 @@ public class LandingActivity extends SherlockFragmentActivity implements
         case DialogInterface.BUTTON_POSITIVE:\r
             Intent intent = new Intent(android.provider.Settings.ACTION_ADD_ACCOUNT);\r
             intent.putExtra("authorities",\r
-                    new String[] { AccountAuthenticator.AUTHORITY });\r
+                    new String[] { MainApp.getAuthTokenType() });\r
             startActivity(intent);\r
             break;\r
         case DialogInterface.BUTTON_NEGATIVE:\r
@@ -151,7 +151,7 @@ public class LandingActivity extends SherlockFragmentActivity implements
     private boolean accountsAreSetup() {\r
         AccountManager accMan = AccountManager.get(this);\r
         Account[] accounts = accMan\r
-                .getAccountsByType(AccountAuthenticator.ACCOUNT_TYPE);\r
+                .getAccountsByType(MainApp.getAccountType());\r
         return accounts.length > 0;\r
     }\r
 \r