title: Android permissions are not being granted
body: <p>I have a small test app, that attempts to display the call log.</p>
  
  <p>Physical phones that I have tested the test app are : LG G2 Android 4.4.2 Kernel 3.4.0 And Samsung S5 Android 4.4.2 Kernel 3.4.0. </p>
  
  <p>I have given the app these permissions: </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android" package="acl.test.com.acl" &gt;
  
      &lt;uses-permission android:name="android.permission.READ_PHONE_STATE" /&gt;
      &lt;uses-permission android:name="android.permission.READ_CALL_LOG" /&gt;
      &lt;uses-permission android:name="android.permission.WRITE_CALL_LOG" /&gt;
      &lt;uses-permission android:name="android.permission.Calls.CONTENT_URI" /&gt;
      &lt;uses-permission android:name="android.permission.READ_CONTACTS" /&gt;
      &lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /&gt;
  
  
      &lt;application
          android:allowBackup="true"
          android:icon="@mipmap/ic_launcher"
          android:label="@string/app_name"
          android:theme="@style/AppTheme"
          android:name="acl.test.com.acl.aclApp"&gt;
          &lt;activity
              android:name=".MainActivity"
              android:label="@string/app_name" &gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="android.intent.action.MAIN" /&gt;
  
                  &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
              &lt;/intent-filter&gt;
          &lt;/activity&gt;
      &lt;/application&gt;
  &lt;/manifest&gt;
  </code></pre>
  
  <p>MainActivity.java</p>
  
  <pre><code>public class MainActivity extends AppCompatActivity {
  
      public static String appTagForLog = "ACL";
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
      }
  
      @Override
      protected void onResume() {
          super.onResume();
  
          boolean hasREAD_CALL_LOG = SecurityUtil.doesUserHavePermission(SecurityUtil.READ_CALL_LOG);
          boolean hasCONTENT_URI = SecurityUtil.doesUserHavePermission(SecurityUtil.CONTENT_URI);
          boolean hasREAD_CONTACTS = SecurityUtil.doesUserHavePermission(SecurityUtil.READ_CONTACTS);
          try {
  
  
              //check security
              if (hasREAD_CALL_LOG &amp;&amp; hasCONTENT_URI &amp;&amp; hasREAD_CONTACTS) {
                  Log.d(appTagForLog, "app has all permissions");
                  StringBuffer sb = CallLogService.getCallLog();
                  Log.d(appTagForLog, sb.toString());
  
              } else {
                  //kind of error, app will not be useful alert user
                  String messageToUser = "The user must enable ";
                  if (hasREAD_CALL_LOG) {
                      messageToUser = messageToUser + "READ CALL LOG";
                  }
                  if (hasCONTENT_URI) {
                      messageToUser = messageToUser + ", CALL DATA";
                  }
                  if (hasREAD_CONTACTS) {
                      messageToUser = messageToUser + ", READ_CONTACTS";
                  }
  
                  messageToUser = messageToUser + " permissions!";
  
                  Toast.makeText(
                          this,
                          messageToUser,
                          Toast.LENGTH_LONG).show();
  
                  Log.d(appTagForLog, messageToUser);
  
                  StringBuffer sb = CallLogService.getCallLog();
                  Log.d(appTagForLog, "***CALL LOG:"+ sb.toString());
  
              }
          }
          catch (Exception exc)
          {
              exc.printStackTrace();
              Log.d(appTagForLog, "Exception, message: "+exc.getMessage());
          }
  
      }
  
      @Override
      public boolean onCreateOptionsMenu(Menu menu) {
          // Inflate the menu; this adds items to the action bar if it is present.
          getMenuInflater().inflate(R.menu.menu_main, menu);
          return true;
      }
  
      @Override
      public boolean onOptionsItemSelected(MenuItem item) {
          // Handle action bar item clicks here. The action bar will
          // automatically handle clicks on the Home/Up button, so long
          // as you specify a parent activity in AndroidManifest.xml.
          int id = item.getItemId();
  
          //noinspection SimplifiableIfStatement
          if (id == R.id.action_settings) {
              return true;
          }
  
          return super.onOptionsItemSelected(item);
      }
  
  
  }//end of main activity 
  </code></pre>
  
  <p>I have added logic in the MainActivity that checks whether READ_CALL_LOG &amp; READ CONTACTS was granted, however I keep getting false. </p>
  
  <p>Why are declared permissions not being granted &amp; how can they be forced to be granted???</p>
  
  <p>Thanks</p>