Skip to content

Commit

Permalink
Catch all exceptions when starting an external activity
Browse files Browse the repository at this point in the history
  • Loading branch information
keianhzo committed Jun 30, 2020
1 parent d229a8c commit 2b0dfe8
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@

package org.mozilla.vrbrowser.ui.widgets;

import android.content.ActivityNotFoundException;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.pm.PackageManager;
import android.content.res.Configuration;
import android.graphics.Canvas;
Expand Down Expand Up @@ -1720,7 +1719,7 @@ public void onExternalResponse(@NonNull GeckoSession geckoSession, @NonNull Geck
if (index == PromptDialogWidget.POSITIVE) {
try {
getContext().startActivity(newIntent);
} catch (ActivityNotFoundException ignored) {
} catch (Exception ignored) {
showAlert(
getResources().getString(R.string.download_open_file_error_title),
getResources().getString(R.string.download_open_file_error_body),
Expand Down

0 comments on commit 2b0dfe8

Please sign in to comment.