- GetRemoteUserNameOperation getUserOperation = new GetRemoteUserNameOperation(); \r
- OwnCloudClient client = OwnCloudClientFactory.createOwnCloudClient(Uri.parse(mHostBaseUrl), getApplicationContext(), true);\r
- client.setSsoSessionCookie(mAuthToken);\r
- getUserOperation.execute(client, this, mHandler);\r
+// GetRemoteUserNameOperation getUserOperation = new GetRemoteUserNameOperation();\r
+// OwnCloudClient client = OwnCloudClientFactory.createOwnCloudClient(Uri.parse(mHostBaseUrl), getApplicationContext(), true);\r
+// client.setSsoSessionCookie(mAuthToken);\r
+// getUserOperation.execute(client, this, mHandler);\r
+ boolean followRedirects = true;\r
+ getRemoteUserNameOperation(sessionCookie, followRedirects);\r
+ }\r
+ }\r
+ \r
+ private void getRemoteUserNameOperation(String sessionCookie, boolean followRedirects) {\r
+ \r
+ Intent getUserNameIntent = new Intent();\r
+ getUserNameIntent.setAction(OperationsService.ACTION_GET_USER_NAME);\r
+ getUserNameIntent.putExtra(OperationsService.EXTRA_SERVER_URL, mHostBaseUrl);\r
+ getUserNameIntent.putExtra(OperationsService.EXTRA_COOKIE, sessionCookie);\r
+ getUserNameIntent.putExtra(OperationsService.EXTRA_FOLLOW_REDIRECTS, followRedirects);\r
+ \r
+ if (mOperationsServiceBinder != null) {\r
+ Log_OC.wtf(TAG, "starting getRemoteUserNameOperation..." );\r
+ mGetUserNameOpId = mOperationsServiceBinder.newOperation(getUserNameIntent);\r