@@ -754,7 +754,7 @@ public void invoke(String[] permissions_, int[] grantResults) {
754
754
void switchCamera (String id , Result result ) {
755
755
VideoCapturer videoCapturer = mVideoCapturers .get (id );
756
756
if (videoCapturer == null ) {
757
- result .error ("Video capturer not found for id: " + id , null , null );
757
+ result .error (null , "Video capturer not found for id: " + id , null );
758
758
return ;
759
759
}
760
760
@@ -811,7 +811,7 @@ void stopRecording(Integer id) {
811
811
void hasTorch (String trackId , Result result ) {
812
812
VideoCapturer videoCapturer = mVideoCapturers .get (trackId );
813
813
if (videoCapturer == null ) {
814
- result .error ("Video capturer not found for id: " + trackId , null , null );
814
+ result .error (null , "Video capturer not found for id: " + trackId , null );
815
815
return ;
816
816
}
817
817
@@ -824,7 +824,7 @@ void hasTorch(String trackId, Result result) {
824
824
} catch (NoSuchFieldException e ) {
825
825
// Most likely the upstream Camera1Capturer class have changed
826
826
Log .e (TAG , "[TORCH] Failed to get `currentSession` from `Camera1Capturer`" );
827
- result .error ("Failed to get `currentSession` from `Camera1Capturer`" , null , null );
827
+ result .error (null , "Failed to get `currentSession` from `Camera1Capturer`" , null );
828
828
return ;
829
829
} catch (IllegalAccessException e ) {
830
830
// Should never happen since we are calling `setAccessible(true)`
@@ -839,7 +839,7 @@ void hasTorch(String trackId, Result result) {
839
839
} catch (NoSuchFieldException e ) {
840
840
// Most likely the upstream Camera2Capturer class have changed
841
841
Log .e (TAG , "[TORCH] Failed to get `cameraManager` from `Camera2Capturer`" );
842
- result .error ("Failed to get `cameraManager` from `Camera2Capturer`" , null , null );
842
+ result .error (null , "Failed to get `cameraManager` from `Camera2Capturer`" , null );
843
843
return ;
844
844
} catch (IllegalAccessException e ) {
845
845
// Should never happen since we are calling `setAccessible(true)`
@@ -854,7 +854,7 @@ void hasTorch(String trackId, Result result) {
854
854
} catch (NoSuchFieldException e ) {
855
855
// Most likely the upstream Camera2Capturer class have changed
856
856
Log .e (TAG , "[TORCH] Failed to get `cameraDevice` from `Camera2Capturer`" );
857
- result .error ("Failed to get `cameraDevice` from `Camera2Capturer`" , null , null );
857
+ result .error (null , "Failed to get `cameraDevice` from `Camera2Capturer`" , null );
858
858
return ;
859
859
} catch (IllegalAccessException e ) {
860
860
// Should never happen since we are calling `setAccessible(true)`
@@ -883,7 +883,7 @@ void hasTorch(String trackId, Result result) {
883
883
} catch (NoSuchFieldException e ) {
884
884
// Most likely the upstream Camera1Capturer class have changed
885
885
Log .e (TAG , "[TORCH] Failed to get `currentSession` from `Camera1Capturer`" );
886
- result .error ("Failed to get `currentSession` from `Camera1Capturer`" , null , null );
886
+ result .error (null , "Failed to get `currentSession` from `Camera1Capturer`" , null );
887
887
return ;
888
888
} catch (IllegalAccessException e ) {
889
889
// Should never happen since we are calling `setAccessible(true)`
@@ -898,7 +898,7 @@ void hasTorch(String trackId, Result result) {
898
898
} catch (NoSuchFieldException e ) {
899
899
// Most likely the upstream Camera1Session class have changed
900
900
Log .e (TAG , "[TORCH] Failed to get `camera` from `Camera1Session`" );
901
- result .error ("Failed to get `camera` from `Camera1Session`" , null , null );
901
+ result .error (null , "Failed to get `camera` from `Camera1Session`" , null );
902
902
return ;
903
903
} catch (IllegalAccessException e ) {
904
904
// Should never happen since we are calling `setAccessible(true)`
@@ -918,13 +918,13 @@ void hasTorch(String trackId, Result result) {
918
918
}
919
919
920
920
Log .e (TAG , "[TORCH] Video capturer not compatible" );
921
- result .error ("Video capturer not compatible" , null , null );
921
+ result .error (null , "Video capturer not compatible" , null );
922
922
}
923
923
924
924
void setTorch (String trackId , boolean torch , Result result ) {
925
925
VideoCapturer videoCapturer = mVideoCapturers .get (trackId );
926
926
if (videoCapturer == null ) {
927
- result .error ("Video capturer not found for id: " + trackId , null , null );
927
+ result .error (null , "Video capturer not found for id: " + trackId , null );
928
928
return ;
929
929
}
930
930
@@ -937,7 +937,7 @@ void setTorch(String trackId, boolean torch, Result result) {
937
937
} catch (NoSuchFieldException e ) {
938
938
// Most likely the upstream Camera1Capturer class have changed
939
939
Log .e (TAG , "[TORCH] Failed to get `currentSession` from `Camera1Capturer`" );
940
- result .error ("Failed to get `currentSession` from `Camera1Capturer`" , null , null );
940
+ result .error (null , "Failed to get `currentSession` from `Camera1Capturer`" , null );
941
941
return ;
942
942
} catch (IllegalAccessException e ) {
943
943
// Should never happen since we are calling `setAccessible(true)`
@@ -952,7 +952,7 @@ void setTorch(String trackId, boolean torch, Result result) {
952
952
} catch (NoSuchFieldException e ) {
953
953
// Most likely the upstream Camera2Capturer class have changed
954
954
Log .e (TAG , "[TORCH] Failed to get `cameraManager` from `Camera2Capturer`" );
955
- result .error ("Failed to get `cameraManager` from `Camera2Capturer`" , null , null );
955
+ result .error (null , "Failed to get `cameraManager` from `Camera2Capturer`" , null );
956
956
return ;
957
957
} catch (IllegalAccessException e ) {
958
958
// Should never happen since we are calling `setAccessible(true)`
@@ -967,7 +967,7 @@ void setTorch(String trackId, boolean torch, Result result) {
967
967
} catch (NoSuchFieldException e ) {
968
968
// Most likely the upstream Camera2Capturer class have changed
969
969
Log .e (TAG , "[TORCH] Failed to get `captureSession` from `Camera2Capturer`" );
970
- result .error ("Failed to get `captureSession` from `Camera2Capturer`" , null , null );
970
+ result .error (null , "Failed to get `captureSession` from `Camera2Capturer`" , null );
971
971
return ;
972
972
} catch (IllegalAccessException e ) {
973
973
// Should never happen since we are calling `setAccessible(true)`
@@ -982,7 +982,7 @@ void setTorch(String trackId, boolean torch, Result result) {
982
982
} catch (NoSuchFieldException e ) {
983
983
// Most likely the upstream Camera2Capturer class have changed
984
984
Log .e (TAG , "[TORCH] Failed to get `cameraDevice` from `Camera2Capturer`" );
985
- result .error ("Failed to get `cameraDevice` from `Camera2Capturer`" , null , null );
985
+ result .error (null , "Failed to get `cameraDevice` from `Camera2Capturer`" , null );
986
986
return ;
987
987
} catch (IllegalAccessException e ) {
988
988
// Should never happen since we are calling `setAccessible(true)`
@@ -997,7 +997,7 @@ void setTorch(String trackId, boolean torch, Result result) {
997
997
} catch (NoSuchFieldException e ) {
998
998
// Most likely the upstream Camera2Capturer class have changed
999
999
Log .e (TAG , "[TORCH] Failed to get `captureFormat` from `Camera2Capturer`" );
1000
- result .error ("Failed to get `captureFormat` from `Camera2Capturer`" , null , null );
1000
+ result .error (null , "Failed to get `captureFormat` from `Camera2Capturer`" , null );
1001
1001
return ;
1002
1002
} catch (IllegalAccessException e ) {
1003
1003
// Should never happen since we are calling `setAccessible(true)`
@@ -1012,7 +1012,7 @@ void setTorch(String trackId, boolean torch, Result result) {
1012
1012
} catch (NoSuchFieldException e ) {
1013
1013
// Most likely the upstream Camera2Capturer class have changed
1014
1014
Log .e (TAG , "[TORCH] Failed to get `fpsUnitFactor` from `Camera2Capturer`" );
1015
- result .error ("Failed to get `fpsUnitFactor` from `Camera2Capturer`" , null , null );
1015
+ result .error (null , "Failed to get `fpsUnitFactor` from `Camera2Capturer`" , null );
1016
1016
return ;
1017
1017
} catch (IllegalAccessException e ) {
1018
1018
// Should never happen since we are calling `setAccessible(true)`
@@ -1027,7 +1027,7 @@ void setTorch(String trackId, boolean torch, Result result) {
1027
1027
} catch (NoSuchFieldException e ) {
1028
1028
// Most likely the upstream Camera2Capturer class have changed
1029
1029
Log .e (TAG , "[TORCH] Failed to get `surface` from `Camera2Capturer`" );
1030
- result .error ("Failed to get `surface` from `Camera2Capturer`" , null , null );
1030
+ result .error (null , "Failed to get `surface` from `Camera2Capturer`" , null );
1031
1031
return ;
1032
1032
} catch (IllegalAccessException e ) {
1033
1033
// Should never happen since we are calling `setAccessible(true)`
@@ -1042,7 +1042,7 @@ void setTorch(String trackId, boolean torch, Result result) {
1042
1042
} catch (NoSuchFieldException e ) {
1043
1043
// Most likely the upstream Camera2Capturer class have changed
1044
1044
Log .e (TAG , "[TORCH] Failed to get `cameraThreadHandler` from `Camera2Capturer`" );
1045
- result .error ("Failed to get `cameraThreadHandler` from `Camera2Capturer`" , null , null );
1045
+ result .error (null , "Failed to get `cameraThreadHandler` from `Camera2Capturer`" , null );
1046
1046
return ;
1047
1047
} catch (IllegalAccessException e ) {
1048
1048
// Should never happen since we are calling `setAccessible(true)`
@@ -1078,7 +1078,7 @@ void setTorch(String trackId, boolean torch, Result result) {
1078
1078
} catch (NoSuchFieldException e ) {
1079
1079
// Most likely the upstream Camera1Capturer class have changed
1080
1080
Log .e (TAG , "[TORCH] Failed to get `currentSession` from `Camera1Capturer`" );
1081
- result .error ("Failed to get `currentSession` from `Camera1Capturer`" , null , null );
1081
+ result .error (null , "Failed to get `currentSession` from `Camera1Capturer`" , null );
1082
1082
return ;
1083
1083
} catch (IllegalAccessException e ) {
1084
1084
// Should never happen since we are calling `setAccessible(true)`
@@ -1093,7 +1093,7 @@ void setTorch(String trackId, boolean torch, Result result) {
1093
1093
} catch (NoSuchFieldException e ) {
1094
1094
// Most likely the upstream Camera1Session class have changed
1095
1095
Log .e (TAG , "[TORCH] Failed to get `camera` from `Camera1Session`" );
1096
- result .error ("Failed to get `camera` from `Camera1Session`" , null , null );
1096
+ result .error (null , "Failed to get `camera` from `Camera1Session`" , null );
1097
1097
return ;
1098
1098
} catch (IllegalAccessException e ) {
1099
1099
// Should never happen since we are calling `setAccessible(true)`
@@ -1109,6 +1109,6 @@ void setTorch(String trackId, boolean torch, Result result) {
1109
1109
}
1110
1110
1111
1111
Log .e (TAG , "[TORCH] Video capturer not compatible" );
1112
- result .error ("Video capturer not compatible" , null , null );
1112
+ result .error (null , "Video capturer not compatible" , null );
1113
1113
}
1114
1114
}
0 commit comments