java.lang.SecurityException after splitting activity on two and passing uri through Intent

526 views Asked by At

I have an app with image editor activity with intent filter

<intent-filter>
    <action android:name="android.intent.action.VIEW"/>

    <category android:name="android.intent.category.DEFAULT"/>

    <data android:mimeType="image/*"/>
</intent-filter>

After a while I'd added viewer activity and moved intent filter there. And added received uri to Intent when openning editor from viewer. But after doing so I've noticed multiple crushes from users

Fatal Exception: java.lang.SecurityException
Permission Denial: reading com.android.providers.downloads.DownloadProvider uri content://downloads/all_downloads/250 from pid=4773, uid=10261 requires android.permission.ACCESS_ALL_DOWNLOADS, or grantUriPermission()

and

Fatal Exception: java.lang.SecurityException
Permission Denial: opening provider com.android.providers.telephony.MmsProvider from ProcessRecord{43e44a38 7388:mobi.bcam.editor/u0a230} (pid=7388, uid=10230) requires android.permission.READ_SMS or android.permission.WRITE_SMS

So I'm guessing that permission for second activity was not granted. But how I can fix this?

0

There are 0 answers