shadows/framework/src/main/java/org/robolectric/shadows/ShadowDevicePolicyManager.java
@Implementation(minSdk = N)
  @Nullable
  protected CharSequence getOrganizationName(ComponentName admin) {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
      enforceDeviceOwnerOrProfileOwner(admin);
    } else {
      enforceProfileOwner(admin);
    }

    return organizationName;
  }
@Implementation(minSdk = N)
  @Nullable
  protected CharSequence getOrganizationName(ComponentName admin) {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
      enforceDeviceOwnerOrProfileOwner(admin);
    } else {
      enforceProfileOwner(admin);
    }

    return organizationName;
  }
@ Implementation ( minSdk = N ) @ Nullable protected CharSequence getOrganizationName ( ComponentName admin ) { if ( Build . VERSION . SDK_INT >= Build . VERSION_CODES . O ) { enforceDeviceOwnerOrProfileOwner ( admin ) ; } else { enforceProfileOwner ( admin ) ; } return organizationName ; }
Returns organization name.

<p>The API can only be called by profile owner since Android N.

<p>Android framework has a hidden API for getting the organization name for device owner since
Android O. This method, however, is extended to return the organization name for device owners
too to make testing of {@link #setOrganizationName(ComponentName, CharSequence)} easier for
device owner cases.
Returns organization name .