コード例 #1
0
 private void closeWithStatus(int status, String msg) {
   if (!this.mClosed) {
     this.mClosed = true;
     this.mGuard.close();
     writeCommStatusAndClose(status, msg);
     IoUtils.closeQuietly(this.mFd);
     releaseResources();
   }
 }
コード例 #2
0
 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;
 }