private void checkPermissions() {
    for (String permission : REQUIRED_PERMISSIONS) {
      if ((permission.equals(READ_PERMISSION) && Build.VERSION.SDK_INT < 16)
          || mContext.checkCallingOrSelfPermission(permission)
              == PackageManager.PERMISSION_GRANTED) {
        continue;
      }
      if (Build.VERSION.SDK_INT < 23) {
        throw new RuntimeException("We need " + permission + " permission for screenshot tests");
      }
      // NULLSAFE_FIXME[Not Vetted Third-Party]
      Context targetContext = Registry.getRegistry().instrumentation.getTargetContext();
      grantPermission(targetContext, permission);
      grantPermission(mContext, permission);
    }
  }
Provides a directory for an Album to store its screenshots in.
core/src/main/java/com/facebook/testing/screenshot/internal/ScreenshotDirectories.java