Revert "Fix error checking in MemoryFile."

This reverts commit 2142c2cf6ffc0979fff7d0312fd6f90ca6c08a19.
Fix android.os.cts.MemoryFileTest#testLength