Merge "Adding a null checker"

This commit is contained in:
Joshua Mccloskey
2022-11-07 18:28:12 +00:00
committed by Android (Google) Code Review

View File

@@ -637,7 +637,7 @@ public class Sensor {
public void onBinderDied() {
final BaseClientMonitor client = mScheduler.getCurrentClient();
if (client.isInterruptable()) {
if (client != null && client.isInterruptable()) {
Slog.e(mTag, "Sending ERROR_HW_UNAVAILABLE for client: " + client);
final ErrorConsumer errorConsumer = (ErrorConsumer) client;
errorConsumer.onError(FaceManager.FACE_ERROR_HW_UNAVAILABLE,