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

Commit 5cb7da24 authored by Kevin Chyn's avatar Kevin Chyn Committed by Android (Google) Code Review
Browse files

Merge "Add null check before invoking onChallengeInterruptFinished"

parents a6b2647c 7105f658
Loading
Loading
Loading
Loading
+11 −5
Original line number Diff line number Diff line
@@ -582,16 +582,22 @@ class Face10 implements IHwBinder.DeathRecipient {
                    final FaceGenerateChallengeClient previousChallengeOwner =
                            mCurrentChallengeOwner.getInterruptedClient();
                    mCurrentChallengeOwner = null;

                    Slog.d(TAG, "Previous challenge owner: " + previousChallengeOwner);
                    if (previousChallengeOwner != null) {
                        final ClientMonitorCallbackConverter listener =
                                previousChallengeOwner.getListener();
                        if (listener == null) {
                            Slog.w(TAG, "Listener is null");
                        } else {
                            try {
                            previousChallengeOwner.getListener()
                                    .onChallengeInterruptFinished(mSensorId);
                                listener.onChallengeInterruptFinished(mSensorId);
                            } catch (RemoteException e) {
                                Slog.e(TAG, "Unable to notify interrupt finished", e);
                            }
                        }
                    }
                }
            });
        });
    }