class PermissionDataProvider implements PermissionActionProvider {

  @Override
  public Single<Boolean> isGranted(Permission permission) {
    PermissionEntity permissionEntity = permissionEntityDataMapper.transformInverse(permission);

    return Single.just(permissionChecker.checkSelfPermission(context, permissionEntity))
        .map(permissionChecker::isGranted);
  }

  @Inject public  PermissionDataProvider(AndroidPermissionChecker androidPermissionChecker,
      PermissionEntityDataMapper permissionEntityDataMapper);

}