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

Commit 0a9f2322 authored by Chris Tate's avatar Chris Tate Committed by android-build-merger
Browse files

Merge \\"Thread-safe pipe teardown during restore operations\\" into nyc-mr1-dev am: 4595bc7f

am: f74ff479

Change-Id: I562d94384d4ca4d788c704aca64fa16b613d38e8
parents c278ed54 f74ff479
Loading
Loading
Loading
Loading
+14 −9
Original line number Diff line number Diff line
@@ -5707,6 +5707,10 @@ public class BackupManagerService {
        }

        void tearDownPipes() {
            // Teardown might arise from the inline restore processing or from the asynchronous
            // timeout mechanism, and these might race.  Make sure we don't try to close and
            // null out the pipes twice.
            synchronized (this) {
                if (mPipes != null) {
                    try {
                        mPipes[0].close();
@@ -5719,6 +5723,7 @@ public class BackupManagerService {
                    mPipes = null;
                }
            }
        }

        void tearDownAgent(ApplicationInfo app) {
            if (mAgent != null) {