Commit 05ba1e4a authored by John Abd-El-Malek's avatar John Abd-El-Malek Committed by Commit Bot

Fix crash in WebLayer if the permission prompt for storage access is interrupted.

Bug: 1123212
Change-Id: I8d5d3a23d9d8c7902d37cf19faa3a1dbfe898ed8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2399574
Commit-Queue: John Abd-El-Malek <jam@chromium.org>
Commit-Queue: Clark DuVall <cduvall@chromium.org>
Auto-Submit: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: default avatarClark DuVall <cduvall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#805168}
parent bcf61e48
......@@ -65,7 +65,7 @@ public final class DownloadCallbackProxy {
String[] requestPermissions = new String[] {permission.WRITE_EXTERNAL_STORAGE};
window.requestPermissions(requestPermissions, (permissions, grantResults) -> {
if (grantResults[0] == PackageManager.PERMISSION_DENIED) {
if (grantResults.length == 0 || grantResults[0] == PackageManager.PERMISSION_DENIED) {
DownloadCallbackProxyJni.get().allowDownload(callbackId, false);
return;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment