diff --git a/core/java/android/app/LoadedApk.java b/core/java/android/app/LoadedApk.java index 0733a3e7c51cf..fde2904a3f376 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); + } } }