/** * Run operation for asynchronous or synchronous 'onExecute' method. * * Considers and performs silent refresh of account credentials if possible, and if * {@link RemoteOperation#setSilentRefreshOfAccountCredentials(boolean)} was called with * parameter 'true' before the execution. * * @return Remote operation result */ private RemoteOperationResult<T> runOperation() { RemoteOperationResult<T> result; try { grantOwnCloudClient(); result = run(mClient); } catch (AccountsException | IOException e) { Log_OC.e(TAG, "Error while trying to access to " + mAccount.name, e); result = new RemoteOperationResult<>(e); } return result; }