Merge "Fix NPE in FaceDetectClient" into sc-dev am: 4823943403

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15014047

Change-Id: Ic80023edbadf7db9e540c24650b1d8c1eb72cd8a
This commit is contained in:
TreeHugger Robot
2021-06-17 21:25:43 +00:00
committed by Automerger Merge Worker

View File

@@ -59,11 +59,13 @@ public class FaceDetectClient extends AcquisitionClient<ISession> implements Det
@Override
protected void stopHalOperation() {
try {
mCancellationSignal.cancel();
} catch (RemoteException e) {
Slog.e(TAG, "Remote exception", e);
mCallback.onClientFinished(this, false /* success */);
if (mCancellationSignal != null) {
try {
mCancellationSignal.cancel();
} catch (RemoteException e) {
Slog.e(TAG, "Remote exception", e);
mCallback.onClientFinished(this, false /* success */);
}
}
}