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

Commit e74007de authored by Ben Kwa's avatar Ben Kwa Committed by Android (Google) Code Review
Browse files

Merge "Clean up error handling in CopyService." into mnc-dev

parents 570de1e0 75597d0d
Loading
Loading
Loading
Loading
+5 −7
Original line number Diff line number Diff line
@@ -466,14 +466,12 @@ public class CopyService extends IntentService {
            srcFile.checkError();
        } catch (IOException e) {
            copyError = e;
        } finally {
            if (copyError != null) {
            try {
                dstFile.closeWithError(copyError.getMessage());
                } catch (IOException e) {
                    Log.e(TAG, "Error closing destination", e);
                }
            } catch (IOException closeError) {
                Log.e(TAG, "Error closing destination", closeError);
            }
        } finally {
            // This also ensures the file descriptors are closed.
            IoUtils.closeQuietly(src);
            IoUtils.closeQuietly(dst);