Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e1a9d7ae authored by Yohei Yukawa's avatar Yohei Yukawa Committed by android-build-merger
Browse files

Revert "Close FileChannels in UpdateHandler#copyFile."

am: 4b46e711

* commit '4b46e711':
  Revert "Close FileChannels in UpdateHandler#copyFile."
parents 8bfecc25 4b46e711
Loading
Loading
Loading
Loading
+2 −10
Original line number Diff line number Diff line
@@ -689,16 +689,8 @@ public final class UpdateHandler {
        } else {
            try {
                final FileChannel sourceChannel = ((FileInputStream) in).getChannel();
                try {
                final FileChannel destinationChannel = ((FileOutputStream) out).getChannel();
                    try {
                sourceChannel.transferTo(0, Integer.MAX_VALUE, destinationChannel);
                    } finally {
                        destinationChannel.close();
                    }
                } finally {
                    sourceChannel.close();
                }
            } catch (IOException e) {
                // Can't work with channels, or something went wrong. Copy by hand.
                DebugLogUtils.l("Won't work");