Merge "CEC: Do not allow null callback" am: a36bae6e00 am: 4a6e08d4b5 am: 0ee5cd13f9 am: da0078713c

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

Change-Id: I48039797c983ef04d2c4b5714ba57128c704a11e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Treehugger Robot
2022-06-29 09:18:15 +00:00
committed by Automerger Merge Worker

View File

@@ -122,6 +122,9 @@ public final class HdmiPlaybackClient extends HdmiClient {
}
private IHdmiControlCallback getCallbackWrapper(final OneTouchPlayCallback callback) {
if (callback == null) {
throw new IllegalArgumentException("OneTouchPlayCallback cannot be null.");
}
return new IHdmiControlCallback.Stub() {
@Override
public void onComplete(int result) {
@@ -131,6 +134,9 @@ public final class HdmiPlaybackClient extends HdmiClient {
}
private IHdmiControlCallback getCallbackWrapper(final DisplayStatusCallback callback) {
if (callback == null) {
throw new IllegalArgumentException("DisplayStatusCallback cannot be null.");
}
return new IHdmiControlCallback.Stub() {
@Override
public void onComplete(int status) {