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

Commit 6eb7f58e authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

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

parents c3bfdf52 a0e313a8
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();
            }
        }