Merge "Add null check before using mCallback" am: 98499b6d58

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

Change-Id: I43e94d42281b322f9f02907af5b9b684c0a19d46
This commit is contained in:
TreeHugger Robot
2020-09-09 00:42:59 +00:00
committed by Automerger Merge Worker

View File

@@ -98,7 +98,11 @@ public abstract class AcquisitionClient<T> extends ClientMonitor<T> implements I
}
if (finish) {
mCallback.onClientFinished(this, false /* success */);
if (mCallback == null) {
Slog.e(TAG, "Callback is null, perhaps the client hasn't been started yet?");
} else {
mCallback.onClientFinished(this, false /* success */);
}
}
}