Merge "Checking for null proxy object before operating on a method of the proxy object" into tm-qpr-dev
This commit is contained in:
@@ -272,6 +272,9 @@ public final class CameraExtensionCharacteristics {
|
|||||||
@Override
|
@Override
|
||||||
public void onServiceConnected(ComponentName component, IBinder binder) {
|
public void onServiceConnected(ComponentName component, IBinder binder) {
|
||||||
mProxy = ICameraExtensionsProxyService.Stub.asInterface(binder);
|
mProxy = ICameraExtensionsProxyService.Stub.asInterface(binder);
|
||||||
|
if (mProxy == null) {
|
||||||
|
throw new IllegalStateException("Camera Proxy service is null");
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
mSupportsAdvancedExtensions = mProxy.advancedExtensionsSupported();
|
mSupportsAdvancedExtensions = mProxy.advancedExtensionsSupported();
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user