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

Commit 94d96338 authored by Christopher Tate's avatar Christopher Tate Committed by Android (Google) Code Review
Browse files

Merge "Don't crash just because invalid datasets were offered for restore" into lmp-mr1-dev

parents 9d8c7598 824392bd
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -35,6 +35,8 @@ import android.util.Log;

import com.android.org.bouncycastle.util.encoders.Base64;

import libcore.io.IoUtils;

import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileInputStream;
@@ -559,11 +561,7 @@ public class LocalTransport extends BackupTransport {
    // Full restore handling

    private void resetFullRestoreState() {
        try {
        mCurFullRestoreStream.close();
        } catch (IOException e) {
            Log.w(TAG, "Unable to close full restore input stream");
        }
        IoUtils.closeQuietly(mCurFullRestoreStream);
        mCurFullRestoreStream = null;
        mFullRestoreSocketStream = null;
        mFullRestoreBuffer = null;