mirror of
https://github.com/nextcloud/android.git
synced 2024-11-27 17:46:37 +03:00
Fixed crash in first installation
Conflicts: src/com/owncloud/android/ui/activity/FileActivity.java
This commit is contained in:
parent
9243d216fc
commit
0e4c56f316
1 changed files with 5 additions and 15 deletions
|
@ -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 server supports the Share API */
|
||||
private boolean mIsSharedSupported;
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
@ -149,11 +145,6 @@ public abstract class FileActivity extends SherlockFragmentActivity {
|
|||
} else {
|
||||
swapToDefaultAccount();
|
||||
}
|
||||
|
||||
AccountManager accountMngr = AccountManager.get(getBaseContext());
|
||||
if (mAccount != null) {
|
||||
mIsSharedSupported = Boolean.parseBoolean(accountMngr.getUserData(mAccount, OwnCloudAccount.Constants.KEY_SUPPORTS_SHARE_API));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -260,12 +251,11 @@ public abstract class FileActivity extends SherlockFragmentActivity {
|
|||
* @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));
|
||||
}
|
||||
|
||||
|
||||
public void setIsSharedSupported(boolean isSharedSupported) {
|
||||
this.mIsSharedSupported = isSharedSupported;
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue