title: Requires android.permission.READ_CALENDAR or android.permission.WRITE_CALENDAR
body: <p>I've given READ_CALENDAR and WRITE_CALENDAR permissions in my Manifest and in my installed app I've given Calendar runtime permission and I verified the same from app's settings.</p>
  
  <p>But even though, on some devices I'm getting <strong>Requires android.permission.READ_CALENDAR or android.permission.WRITE_CALENDAR</strong> error! This is insane! Here is my logcat:</p>
  
  <pre><code>Fatal Exception: java.lang.RuntimeException: An error occurred while executing doInBackground()
         at android.os.AsyncTask$3.done(AsyncTask.java:353)
         at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:383)
         at java.util.concurrent.FutureTask.setException(FutureTask.java:252)
         at java.util.concurrent.FutureTask.run(FutureTask.java:271)
         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
         at java.lang.Thread.run(Thread.java:764)
  
  Caused by java.lang.SecurityException: Permission Denial: opening provider com.android.providers.calendar.CalendarProvider2 from ProcessRecord{76fdbc0 21351:com.app.byday/u0a166} (pid=21351, uid=10166) requires android.permission.READ_CALENDAR or android.permission.WRITE_CALENDAR
         at android.os.Parcel.readException(Parcel.java:1943)
         at android.os.Parcel.readException(Parcel.java:1889)
         at android.app.IActivityManager$Stub$Proxy.getContentProvider(IActivityManager.java:4885)
         at android.app.ActivityThread.acquireProvider(ActivityThread.java:6019)
         at android.app.ContextImpl$ApplicationContentResolver.acquireUnstableProvider(ContextImpl.java:2525)
         at android.content.ContentResolver.acquireUnstableProvider(ContentResolver.java:1791)
         at android.content.ContentResolver.query(ContentResolver.java:749)
         at android.content.ContentResolver.query(ContentResolver.java:715)
         at android.content.CursorLoader.loadInBackground(CursorLoader.java:64)
         at android.content.CursorLoader.loadInBackground(CursorLoader.java:54)
         at android.content.AsyncTaskLoader.onLoadInBackground(AsyncTaskLoader.java:315)
         at android.content.AsyncTaskLoader$LoadTask.doInBackground(AsyncTaskLoader.java:69)
         at android.content.AsyncTaskLoader$LoadTask.doInBackground(AsyncTaskLoader.java:64)
         at android.os.AsyncTask$2.call(AsyncTask.java:333)
         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
         at java.lang.Thread.run(Thread.java:764)
  </code></pre>
  
  <p>Additional info: I've integrated Etar-AOSP calendar app in my app.</p>