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

Commit f74ff479 authored by Christopher Tate's avatar Christopher Tate Committed by android-build-merger
Browse files

Merge \"Thread-safe pipe teardown during restore operations\" into nyc-mr1-dev

am: 4595bc7f

Change-Id: I8c53961f93633f26615970c40d071f2e8d714780
parents 562d906f 4595bc7f
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) {