Only unlink death recipient if binder was previously added
Bug: 183538974 Test: Presubmit Change-Id: I255531e409cf666a01306ab486294be49a8f9483
This commit is contained in:
@@ -84,12 +84,16 @@ public class RemoteTransitionHandler implements Transitions.TransitionHandler {
|
||||
}
|
||||
|
||||
void removeFiltered(IRemoteTransition remote) {
|
||||
remote.asBinder().unlinkToDeath(mTransitionDeathRecipient, 0 /* flags */);
|
||||
boolean removed = false;
|
||||
for (int i = mFilters.size() - 1; i >= 0; --i) {
|
||||
if (mFilters.get(i).second == remote) {
|
||||
mFilters.remove(i);
|
||||
removed = true;
|
||||
}
|
||||
}
|
||||
if (removed) {
|
||||
remote.asBinder().unlinkToDeath(mTransitionDeathRecipient, 0 /* flags */);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user