Revert "Fix error checking in MemoryFile."

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

Change-Id: I4569ba7f35342ace20d5bb857da6e0d2d085ec8a