Merge "Fix the deadlock problem"
am: fa228e06f6
Change-Id: I862d3cedcf38c81f22559439aa8f00ac2ab3cca3
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user