Merge "Camera: Avoid possible NPE after extension session configuration"
This commit is contained in:
@@ -528,8 +528,15 @@ public final class CameraAdvancedExtensionSessionImpl extends CameraExtensionSes
|
|||||||
boolean status = true;
|
boolean status = true;
|
||||||
synchronized (mInterfaceLock) {
|
synchronized (mInterfaceLock) {
|
||||||
try {
|
try {
|
||||||
|
if (mSessionProcessor != null) {
|
||||||
mSessionProcessor.onCaptureSessionStart(mRequestProcessor);
|
mSessionProcessor.onCaptureSessionStart(mRequestProcessor);
|
||||||
mInitialized = true;
|
mInitialized = true;
|
||||||
|
} else {
|
||||||
|
Log.v(TAG, "Failed to start capture session, session released before " +
|
||||||
|
"extension start!");
|
||||||
|
status = false;
|
||||||
|
mCaptureSession.close();
|
||||||
|
}
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
Log.e(TAG, "Failed to start capture session,"
|
Log.e(TAG, "Failed to start capture session,"
|
||||||
+ " extension service does not respond!");
|
+ " extension service does not respond!");
|
||||||
|
|||||||
Reference in New Issue
Block a user