Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

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 e0e2865 commit a88283a
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 a88283a

Please sign in to comment.