Skip to content

Commit

Permalink
fix(android): reject promise with Error in MediaModule
Browse files Browse the repository at this point in the history
  • Loading branch information
sgtcoolguy committed Jan 26, 2021
1 parent b3aaaa3 commit 1de2eb3
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ public KrollPromise<KrollDict> requestCameraPermissions(
if (permissionCallback != null) {
permissionCallback.callAsync(callbackThisObject, response);
}
promise.reject(response);
promise.reject(new Throwable(response.getString(TiC.EVENT_PROPERTY_ERROR)));
return;
}

Expand Down Expand Up @@ -601,7 +601,7 @@ public KrollPromise<KrollDict> requestAudioRecorderPermissions(
if (permissionCallback != null) {
permissionCallback.callAsync(callbackThisObject, response);
}
promise.reject(response);
promise.reject(new Throwable(response.getString(TiC.EVENT_PROPERTY_ERROR)));
return;
}

Expand Down Expand Up @@ -639,7 +639,7 @@ public KrollPromise<KrollDict> requestPhotoGalleryPermissions(
if (permissionCallback != null) {
permissionCallback.callAsync(callbackThisObject, response);
}
promise.reject(response);
promise.reject(new Throwable(response.getString(TiC.EVENT_PROPERTY_ERROR)));
return;
}

Expand Down

0 comments on commit 1de2eb3

Please sign in to comment.