Merge "Fix NPE in FaceDetectClient" into sc-dev

This commit is contained in:
TreeHugger Robot
2021-06-17 21:18:48 +00:00
committed by Android (Google) Code Review

View File

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