From 42b3885ca733ccb0cbff4349b56c5733e9f0bd7b Mon Sep 17 00:00:00 2001 From: Cathy Lu Date: Tue, 2 Apr 2024 18:48:23 +0000 Subject: [PATCH] Bug 1888978 - Catch exceptions for PDF Viewer openAssetFileDescriptor r=geckoview-reviewers,ohall,calixte Differential Revision: https://phabricator.services.mozilla.com/D206395 --- .../main/java/org/mozilla/geckoview/ContentInputStream.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/ContentInputStream.java b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/ContentInputStream.java index bc9eff98f045..8afa61b4b2b8 100644 --- a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/ContentInputStream.java +++ b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/ContentInputStream.java @@ -48,7 +48,7 @@ import org.mozilla.gecko.annotation.WrapForJNI; Log.e(LOGTAG, "Cannot open the uri: " + aUri + " (invalid header)"); close(); } - } catch (final IOException | SecurityException e) { + } catch (final Exception e) { Log.e(LOGTAG, "Cannot open the uri: " + aUri, e); close(); } @@ -146,7 +146,7 @@ import org.mozilla.gecko.annotation.WrapForJNI; Log.d(LOGTAG, "The uri is readable: " + uri); return true; } - } catch (final IOException | SecurityException e) { + } catch (final Exception e) { // A SecurityException could happen if the uri is no more valid or if // we're in an isolated process. Log.e(LOGTAG, "Cannot read the uri: " + uri, e);