Revert "Fix error checking in MemoryFile."

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

Change-Id: I006476618524a96aaf08f0216aafd41f29d6803a