|
@@ -79,7 +79,8 @@ import com.owncloud.android.lib.common.operations.RemoteOperationResult;
|
|
import com.owncloud.android.lib.common.operations.RemoteOperationResult.ResultCode;
|
|
import com.owncloud.android.lib.common.operations.RemoteOperationResult.ResultCode;
|
|
import com.owncloud.android.lib.common.utils.Log_OC;
|
|
import com.owncloud.android.lib.common.utils.Log_OC;
|
|
import com.owncloud.android.lib.resources.status.OwnCloudVersion;
|
|
import com.owncloud.android.lib.resources.status.OwnCloudVersion;
|
|
-import com.owncloud.android.lib.resources.users.GetRemoteUserNameOperation;
|
|
|
|
|
|
+import com.owncloud.android.lib.resources.users.GetRemoteUserInfoOperation;
|
|
|
|
+import com.owncloud.android.lib.resources.users.GetRemoteUserInfoOperation.UserInfo;
|
|
import com.owncloud.android.operations.DetectAuthenticationMethodOperation.AuthenticationMethod;
|
|
import com.owncloud.android.operations.DetectAuthenticationMethodOperation.AuthenticationMethod;
|
|
import com.owncloud.android.operations.GetServerInfoOperation;
|
|
import com.owncloud.android.operations.GetServerInfoOperation;
|
|
import com.owncloud.android.operations.OAuth2GetAccessToken;
|
|
import com.owncloud.android.operations.OAuth2GetAccessToken;
|
|
@@ -1030,7 +1031,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
|
|
} else if (operation instanceof OAuth2GetAccessToken) {
|
|
} else if (operation instanceof OAuth2GetAccessToken) {
|
|
onGetOAuthAccessTokenFinish(result);
|
|
onGetOAuthAccessTokenFinish(result);
|
|
|
|
|
|
- } else if (operation instanceof GetRemoteUserNameOperation) {
|
|
|
|
|
|
+ } else if (operation instanceof GetRemoteUserInfoOperation) {
|
|
onGetUserNameFinish(result);
|
|
onGetUserNameFinish(result);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1596,9 +1597,9 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
|
|
);
|
|
);
|
|
if (authResult.getData() != null) {
|
|
if (authResult.getData() != null) {
|
|
try {
|
|
try {
|
|
- String displayName = (String) authResult.getData().get(0);
|
|
|
|
|
|
+ UserInfo userInfo = (UserInfo) authResult.getData().get(0);
|
|
mAccountMgr.setUserData(
|
|
mAccountMgr.setUserData(
|
|
- mAccount, Constants.KEY_DISPLAY_NAME, displayName
|
|
|
|
|
|
+ mAccount, Constants.KEY_DISPLAY_NAME, userInfo.mDisplayName
|
|
);
|
|
);
|
|
} catch (ClassCastException c) {
|
|
} catch (ClassCastException c) {
|
|
Log_OC.w(TAG, "Couldn't get display name for " + username);
|
|
Log_OC.w(TAG, "Couldn't get display name for " + username);
|