android - permission denial for content provider when called from within the same app -
i have 1 app. has content provider not exported (i don't want other apps have access content) have been using content provider until now. i have created content observer update textview . onchange method gets called when content changes , tries re-query content. that's when gets security exception looks this: java.lang.securityexception: permission denial: reading org.sil.lcroffline.data.dataprovider uri content://org.sil.lcroffline/users/by_account_name/5555544444 pid=0, uid=1000 requires provider exported, or granturipermission() here's code generates it: @override public void onchange(boolean selfchange, uri uri) { cursor c = null; try { c = mcontentresolver.query(userentry.builduserphoneuri(maccount.name), null, null, null, null); // stuff data in cursor } { if (c != null) c.close(); } } the uri looks it's formed properly, , don't think there's problem matching in content provider. the code above ...