diff options
| author | 2021-05-26 13:59:33 -0700 | |
|---|---|---|
| committer | 2021-05-26 14:01:06 -0700 | |
| commit | 980dc5ae12fe8cd3af0e6731bc3e8c686bdcee87 (patch) | |
| tree | 6aa0e14c57e8e2db20622ca6c7b5b321b7e405dd | |
| parent | 87d4c9a9ca5ff67beb37230778f8363cbc49db02 (diff) | |
Don't call onNullBinding when the service host is dead
Bug: 189038850
Test: atest CtsAppTestCases
Change-Id: I8bcdaf545ee8ca46327fc25c14d9821e288600a4
| -rw-r--r-- | core/java/android/app/LoadedApk.java | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/core/java/android/app/LoadedApk.java b/core/java/android/app/LoadedApk.java index 0733a3e7c51c..fde2904a3f37 100644 --- a/core/java/android/app/LoadedApk.java +++ b/core/java/android/app/LoadedApk.java @@ -2056,13 +2056,14 @@ public final class LoadedApk { } if (dead) { mConnection.onBindingDied(name); - } - // If there is a new viable service, it is now connected. - if (service != null) { - mConnection.onServiceConnected(name, service); } else { - // The binding machinery worked, but the remote returned null from onBind(). - mConnection.onNullBinding(name); + // If there is a new viable service, it is now connected. + if (service != null) { + mConnection.onServiceConnected(name, service); + } else { + // The binding machinery worked, but the remote returned null from onBind(). + mConnection.onNullBinding(name); + } } } |