-/* ownCloud Android client application
+/**
+ * ownCloud Android client application
+ *
+ * @author Bartek Przybylski
+ * @author David A. Velasco
* Copyright (C) 2011 Bartek Przybylski
- * Copyright (C) 2012-2013 ownCloud Inc.
+ * Copyright (C) 2015 ownCloud Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
import com.owncloud.android.ui.RadioButtonPreference;
import com.owncloud.android.utils.DisplayUtils;
+import java.io.File;
+
/**
* An Activity that allows the user to change the application's settings.
- *
- * @author Bartek Przybylski
- * @author David A. Velasco
*/
public class Preferences extends SherlockPreferenceActivity
implements AccountManagerCallback<Boolean>, ComponentsGetter {
Account account = new Account(mAccountName, MainApp.getAccountType());
if (!AccountUtils.exists(account, MainApp.getAppContext())) {
// Cancel tranfers
- mUploaderBinder.cancel(account);
+ if (mUploaderBinder != null) {
+ mUploaderBinder.cancel(account);
+ }
+ if (mDownloaderBinder != null) {
+ mDownloaderBinder.cancel(account);
+ }
}
Account a = AccountUtils.getCurrentOwnCloudAccount(this);