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

Commit 967cb0ae authored by Adam He's avatar Adam He
Browse files

Fixes crash due to assigning service before linking death recipient.

Fixes: 129686274
Test: atest CtsAutoFillServiceTestCases
Change-Id: I052ca9a13947f0ad25da70747e8db2be22af742b
parent 568b02ee
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -449,13 +449,13 @@ public abstract class AbstractRemoteService<S extends AbstractRemoteService<S, I
                return;
            }
            mBinding = false;
            mService = getServiceInterface(service);
            try {
                service.linkToDeath(AbstractRemoteService.this, 0);
            } catch (RemoteException re) {
                handleBinderDied();
                return;
            }
            mService = getServiceInterface(service);
            handleOnConnectedStateChangedInternal(true);
            mServiceDied = false;
        }