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

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

Merge "Clear mCurrentChallengeOwner when owner dies"

parents 35ccbec0 34639f47
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -176,6 +176,9 @@ public abstract class ClientMonitor<T> extends LoggableMonitor implements IBinde

    // TODO(b/157790417): Move this to the scheduler
    void binderDiedInternal(boolean clearListener) {
        Slog.e(TAG, "Binder died, owner: " + getOwnerString()
                + ", operation: " + this.getClass().getName());

        if (isAlreadyDone()) {
            Slog.w(TAG, "Binder died but client is finished, ignoring");
            return;
+9 −2
Original line number Diff line number Diff line
@@ -510,8 +510,15 @@ class Face10 implements IHwBinder.DeathRecipient {
            if (mCurrentChallengeOwner != null) {
                Slog.w(TAG, "Current challenge owner: " + mCurrentChallengeOwner
                        + ", interrupted by: " + opPackageName);
                final ClientMonitorCallbackConverter listener =
                        mCurrentChallengeOwner.getListener();
                if (listener == null) {
                    Slog.w(TAG, "Null listener, skip sending interruption callback");
                    return;
                }

                try {
                    mCurrentChallengeOwner.getListener().onChallengeInterrupted(mSensorId);
                    listener.onChallengeInterrupted(mSensorId);
                } catch (RemoteException e) {
                    Slog.e(TAG, "Unable to notify challenge interrupted", e);
                }
@@ -524,7 +531,7 @@ class Face10 implements IHwBinder.DeathRecipient {
                @Override
                public void onClientStarted(@NonNull ClientMonitor<?> clientMonitor) {
                    if (client != clientMonitor) {
                        Slog.e(TAG, "scheduleGenerateChallenge, mismatched client."
                        Slog.e(TAG, "scheduleGenerateChallenge onClientStarted, mismatched client."
                                + " Expecting: " + client + ", received: " + clientMonitor);
                        return;
                    }