Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b2724e8c authored by Winson Chung's avatar Winson Chung Committed by Android (Google) Code Review
Browse files

Merge "Only unlink death recipient if binder was previously added" into sc-dev

parents ccaee1da 032ab0d8
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -84,11 +84,15 @@ 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 */);
        }
    }