@@ -864,7 +864,7 @@ public void onReceive(Context context, Intent intent) {
864
864
Cursor c = dm .query (query );
865
865
// #236 unhandled null check for DownloadManager.query() return value
866
866
if (c == null ) {
867
- this .callback . invoke ("Download manager failed to download from " + this .url + ". Query was unsuccessful " , null , null );
867
+ this .invoke_callback ("Download manager failed to download from " + this .url + ". Query was unsuccessful " , null , null );
868
868
return ;
869
869
}
870
870
@@ -875,7 +875,7 @@ public void onReceive(Context context, Intent intent) {
875
875
// #297 handle failed request
876
876
int statusCode = c .getInt (c .getColumnIndex (DownloadManager .COLUMN_STATUS ));
877
877
if (statusCode == DownloadManager .STATUS_FAILED ) {
878
- this .callback . invoke ("Download manager failed to download from " + this .url + ". Status Code = " + statusCode , null , null );
878
+ this .invoke_callback ("Download manager failed to download from " + this .url + ". Status Code = " + statusCode , null , null );
879
879
return ;
880
880
}
881
881
String contentUri = c .getString (c .getColumnIndex (DownloadManager .COLUMN_LOCAL_URI ));
@@ -904,17 +904,17 @@ public void onReceive(Context context, Intent intent) {
904
904
if (!exists )
905
905
throw new Exception ("Download manager download failed, the file does not downloaded to destination." );
906
906
else
907
- this .callback . invoke (null , ReactNativeBlobUtilConst .RNFB_RESPONSE_PATH , customDest );
907
+ this .invoke_callback (null , ReactNativeBlobUtilConst .RNFB_RESPONSE_PATH , customDest );
908
908
909
909
} catch (Exception ex ) {
910
910
ex .printStackTrace ();
911
- this .callback . invoke (ex .getLocalizedMessage (), null );
911
+ this .invoke_callback (ex .getLocalizedMessage (), null );
912
912
}
913
913
} else {
914
914
if (filePath == null )
915
- this .callback . invoke ("Download manager could not resolve downloaded file path." , ReactNativeBlobUtilConst .RNFB_RESPONSE_PATH , null );
915
+ this .invoke_callback ("Download manager could not resolve downloaded file path." , ReactNativeBlobUtilConst .RNFB_RESPONSE_PATH , null );
916
916
else
917
- this .callback . invoke (null , ReactNativeBlobUtilConst .RNFB_RESPONSE_PATH , filePath );
917
+ this .invoke_callback (null , ReactNativeBlobUtilConst .RNFB_RESPONSE_PATH , filePath );
918
918
}
919
919
920
920
}
0 commit comments