projects
/
pub
/
Android
/
ownCloud.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
OC-2700: Modify the layout list_item to show the share icon
[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
..
2a82200
100644
(file)
--- a/
src/com/owncloud/android/ui/activity/FileActivity.java
+++ b/
src/com/owncloud/android/ui/activity/FileActivity.java
@@
-71,10
+71,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
+145,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
+251,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.getBoolean(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.