projects
/
pub
/
Android
/
ownCloud.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed update of shares database - grant that shares are removed after removing all...
[pub/Android/ownCloud.git]
/
src
/
com
/
owncloud
/
android
/
ui
/
activity
/
FileActivity.java
diff --git
a/src/com/owncloud/android/ui/activity/FileActivity.java
b/src/com/owncloud/android/ui/activity/FileActivity.java
index
f003866
..
3a9297e
100644
(file)
--- a/
src/com/owncloud/android/ui/activity/FileActivity.java
+++ b/
src/com/owncloud/android/ui/activity/FileActivity.java
@@
-33,8
+33,10
@@
import com.owncloud.android.MainApp;
import com.owncloud.android.R;
import com.owncloud.android.authentication.AccountUtils;
import com.owncloud.android.datamodel.OCFile;
import com.owncloud.android.R;
import com.owncloud.android.authentication.AccountUtils;
import com.owncloud.android.datamodel.OCFile;
-import com.owncloud.android.oc_framework.accounts.OwnCloudAccount;
-import com.owncloud.android.oc_framework.network.webdav.WebdavUtils;
+
+import com.owncloud.android.lib.accounts.OwnCloudAccount;
+import com.owncloud.android.lib.network.webdav.WebdavUtils;
+
import com.owncloud.android.utils.Log_OC;
import com.owncloud.android.utils.Log_OC;
@@
-71,10
+73,6
@@
public abstract class FileActivity extends SherlockFragmentActivity {
/** Flag to signal if the activity is launched by a notification */
private boolean mFromNotification;
/** Flag to signal if the activity is launched by a notification */
private boolean mFromNotification;
- /** Flag to signal if the server supports the Share API */
- private boolean mIsSharedSupported;
-
-
/**
/**
@@
-149,11
+147,6
@@
public abstract class FileActivity extends SherlockFragmentActivity {
} else {
swapToDefaultAccount();
}
} else {
swapToDefaultAccount();
}
-
- AccountManager accountMngr = AccountManager.get(getBaseContext());
- if (mAccount != null) {
- mIsSharedSupported = Boolean.parseBoolean(accountMngr.getUserData(mAccount, OwnCloudAccount.Constants.KEY_SUPPORTS_SHARE_API));
- }
}
}
@@
-260,14
+253,13
@@
public abstract class FileActivity extends SherlockFragmentActivity {
* @return 'True' if the server supports the Share API
*/
public boolean isSharedSupported() {
* @return 'True' if the server supports the Share API
*/
public boolean isSharedSupported() {
- return mIsSharedSupported;
+ if (getAccount() != null) {
+ AccountManager accountManager = AccountManager.get(this);
+ return Boolean.parseBoolean(accountManager.getUserData(getAccount(), OwnCloudAccount.Constants.KEY_SUPPORTS_SHARE_API));
+ }
+ return false;
}
}
-
- public void setIsSharedSupported(boolean isSharedSupported) {
- this.mIsSharedSupported = isSharedSupported;
- }
-
/**
* Helper class handling a callback from the {@link AccountManager} after the creation of
* a new ownCloud {@link Account} finished, successfully or not.
/**
* Helper class handling a callback from the {@link AccountManager} after the creation of
* a new ownCloud {@link Account} finished, successfully or not.