Merge "Don't call onNullBinding when the service host is dead" into sc-dev

This commit is contained in:
Jing Ji
2021-05-28 01:35:24 +00:00
committed by Android (Google) Code Review

View File

@@ -2060,13 +2060,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);
}
}
}