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

Commit 11e9cec1 authored by Chris Tate's avatar Chris Tate Committed by android-build-merger
Browse files

Merge "Fix the deadlock problem" am: fa228e06 am: e8c0e109 am: 35b99da3

am: 0455c300

Change-Id: Ib08f8deadfe6085d6d4368527892c799c42f0757
parents 015604ff 0455c300
Loading
Loading
Loading
Loading
+10 −4
Original line number Diff line number Diff line
@@ -2399,16 +2399,15 @@ public class BackupManagerService {
                        } catch (InterruptedException e) {
                            // just bail
                            Slog.w(TAG, "Interrupted: " + e);
                            mActivityManager.clearPendingBackup();
                            return null;
                            mConnecting = false;
                            mConnectedAgent = null;
                        }
                    }

                    // if we timed out with no connect, abort and move on
                    if (mConnecting == true) {
                        Slog.w(TAG, "Timeout waiting for agent " + app);
                        mActivityManager.clearPendingBackup();
                        return null;
                        mConnectedAgent = null;
                    }
                    if (DEBUG) Slog.i(TAG, "got agent " + mConnectedAgent);
                    agent = mConnectedAgent;
@@ -2417,6 +2416,13 @@ public class BackupManagerService {
                // can't happen - ActivityManager is local
            }
        }
        if (agent == null) {
            try {
                mActivityManager.clearPendingBackup();
            } catch (RemoteException e) {
                // can't happen - ActivityManager is local
            }
        }
        return agent;
    }