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

Loading…
Cancel
Save