private void closeWithStatus(int status, String msg) { if (!this.mClosed) { this.mClosed = true; this.mGuard.close(); writeCommStatusAndClose(status, msg); IoUtils.closeQuietly(this.mFd); releaseResources(); } }
public int detachFd() { if (this.mWrapped != null) { return this.mWrapped.detachFd(); } if (this.mClosed) { throw new IllegalStateException("Already closed"); } int fd = getFd(); Parcel.clearFileDescriptor(this.mFd); writeCommStatusAndClose(MODE_WORLD_WRITEABLE, null); return fd; }