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

Commit 89a27065 authored by Hai Zhang's avatar Hai Zhang Committed by android-build-merger
Browse files

Merge "Report request failure when binder died in remote service." into qt-dev

am: 6eb7f58e

Change-Id: Iabbdcb7d1e1d5cd51eff6c58ef4b7e75bdc305c3
parents bf0a5d8f 6eb7f58e
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -231,6 +231,7 @@ public abstract class AbstractRemoteService<S extends AbstractRemoteService<S, I
        @SuppressWarnings("unchecked") // TODO(b/117779333): fix this warning
        final S castService = (S) this;
        mVultureCallback.onServiceDied(castService);
        handleBindFailure();
    }

    // Note: we are dumping without a lock held so this is a bit racy but
@@ -406,7 +407,8 @@ public abstract class AbstractRemoteService<S extends AbstractRemoteService<S, I
            @NonNull BasePendingRequest<S, I> pendingRequest);

    /**
     * Called if {@link Context#bindServiceAsUser} returns {@code false}.
     * Called if {@link Context#bindServiceAsUser} returns {@code false}, or
     * if {@link DeathRecipient#binderDied()} is called.
     */
    abstract void handleBindFailure();

@@ -431,8 +433,6 @@ public abstract class AbstractRemoteService<S extends AbstractRemoteService<S, I
            mBinding = false;

            if (!mServiceDied) {
                // TODO(b/126266412): merge these 2 calls?
                handleBindFailure();
                handleBinderDied();
            }
        }