Browse Source

Catch fileuriexposedexception for now

master
anthony restaino 8 years ago
parent
commit
32d7e509e1
  1. 6
      app/src/main/java/acr/browser/lightning/utils/IntentUtils.java

6
app/src/main/java/acr/browser/lightning/utils/IntentUtils.java

@ -8,6 +8,7 @@ import android.content.pm.PackageManager; @@ -8,6 +8,7 @@ import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.net.Uri;
import android.os.Build;
import android.os.FileUriExposedException;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.util.Log;
@ -75,8 +76,9 @@ public class IntentUtils { @@ -75,8 +76,9 @@ public class IntentUtils {
if (mActivity.startActivityIfNeeded(intent, -1)) {
return true;
}
} catch (ActivityNotFoundException ex) {
ex.printStackTrace();
} catch (Exception exception) {
exception.printStackTrace();
// TODO: 6/5/17 fix case where this could throw a FileUriExposedException due to file:// urls
}
return false;
}

Loading…
Cancel
Save