Revert "Fix error checking in MemoryFile."

This reverts commit 21525f716ca48308cd7520083d6cb0b1b5267758.

* Fix android.os.cts.MemoryFileTest#testLength

Change-Id: Idf4358fb4fb3860bab8eb8cfc27a1a6def20688f