Checking for null proxy object before operating on a method of the proxy

object

Test: Compiled code

Bug: 242767826

Change-Id: I47e705902220e690ea8b560b051fc446a6ec2955
This commit is contained in:
Scott Wiest
2022-10-03 17:36:55 +00:00
parent 56dcd86497
commit 9deb753f2e

View File

@@ -272,6 +272,9 @@ public final class CameraExtensionCharacteristics {
@Override
public void onServiceConnected(ComponentName component, IBinder binder) {
mProxy = ICameraExtensionsProxyService.Stub.asInterface(binder);
if (mProxy == null) {
throw new IllegalStateException("Camera Proxy service is null");
}
try {
mSupportsAdvancedExtensions = mProxy.advancedExtensionsSupported();
} catch (RemoteException e) {