summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author TreeHugger Robot <treehugger-gerrit@google.com> 2018-04-05 11:26:25 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2018-04-05 11:26:25 +0000
commitc83cf90166120435e09a1dd4a436e095622b071c (patch)
tree6c55e6916e7f5592675845f5f0dfdba9fefa0fde
parent0e650c1c55d22a2721f38759d41a2706721474d2 (diff)
parent51c4f038b2be0c32a4f7a09beb6865e25875cd95 (diff)
Merge "Catch IAE from unbind onServiceDisconnected()" into pi-dev
-rw-r--r--services/backup/java/com/android/server/backup/transport/TransportClient.java13
1 files changed, 11 insertions, 2 deletions
diff --git a/services/backup/java/com/android/server/backup/transport/TransportClient.java b/services/backup/java/com/android/server/backup/transport/TransportClient.java
index fa881a97d420..e4dcb25c0623 100644
--- a/services/backup/java/com/android/server/backup/transport/TransportClient.java
+++ b/services/backup/java/com/android/server/backup/transport/TransportClient.java
@@ -439,8 +439,17 @@ public class TransportClient {
synchronized (mStateLock) {
log(Priority.ERROR, "Service disconnected: client UNUSABLE");
setStateLocked(State.UNUSABLE, null);
- // After unbindService() no calls back to mConnection
- mContext.unbindService(mConnection);
+ try {
+ // After unbindService() no calls back to mConnection
+ mContext.unbindService(mConnection);
+ } catch (IllegalArgumentException e) {
+ // TODO: Investigate why this is happening
+ // We're UNUSABLE, so any calls to mConnection will be no-op, so it's safe to
+ // swallow this one
+ log(
+ Priority.WARN,
+ "Exception trying to unbind onServiceDisconnected(): " + e.getMessage());
+ }
}
}