private boolean canAccess(){
  if (Binder.getCallingPid() == Process.myPid()) {
    return true;
  }
 else {
    return PreferencesUtils.getBoolean(getContext(),R.string.allow_access_key,PreferencesUtils.ALLOW_ACCESS_DEFAULT);
  }
}

private boolean canAccess ( ) { if ( Binder . getCallingPid ( ) == Process . myPid ( ) ) { return true ; } else { return PreferencesUtils . getBoolean ( getContext ( ) , R . string . allow_access_key , PreferencesUtils . ALLOW_ACCESS_DEFAULT ) ; } }
returns true if the caller can access the content provider .
