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

Commit e579ecb0 authored by Arthur Ishiguro's avatar Arthur Ishiguro
Browse files

Check if registered before unregistering in binder death

Bug: 382749997
Flag: android.chre.flags.offload_implementation
Test: Run on device and confirm no uncaught exception
Change-Id: I367f977b677d35117bbe2806bda86c016cc51c5f
parent 178cb913
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -186,8 +186,10 @@ public class ContextHubEndpointBroker extends IContextHubEndpoint.Stub
    /** Invoked when the underlying binder of this broker has died at the client process. */
    @Override
    public void binderDied() {
        if (mIsRegistered.get()) {
            unregister();
        }
    }

    /* package */ void attachDeathRecipient() throws RemoteException {
        if (mContextHubEndpointCallback != null) {