Merge "Use common implementation for getObject and importFile."