add back check to onShowFileChooser()

This commit is contained in:
adbenitez
2023-06-08 15:26:37 +02:00
parent 3597042656
commit b6638cbefe
@@ -103,6 +103,9 @@ public class WebxdcActivity extends WebViewActivity implements DcEventCenter.DcE
@Override
@RequiresApi(21)
public boolean onShowFileChooser(WebView webView, ValueCallback<Uri[]> filePathCallback, WebChromeClient.FileChooserParams fileChooserParams) {
if (WebxdcActivity.this.filePathCallback != null) {
WebxdcActivity.this.filePathCallback.onReceiveValue(null);
}
WebxdcActivity.this.filePathCallback = filePathCallback;
Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
intent.addCategory(Intent.CATEGORY_OPENABLE);