media/src/main/java/androidx/media/Rating2.java
public static @Nullable Rating2 newUnratedRating(@Style int ratingStyle) {
        switch(ratingStyle) {
            case RATING_HEART:
            case RATING_THUMB_UP_DOWN:
            case RATING_3_STARS:
            case RATING_4_STARS:
            case RATING_5_STARS:
            case RATING_PERCENTAGE:
                return new Rating2(ratingStyle, RATING_NOT_RATED);
            default:
                return null;
        }
    }
/**
     * Return a Rating2 instance with no rating.
     * Create and return a new Rating2 instance with no rating known for the given
     * rating style.
     *
     * @param ratingStyle one of {@link #RATING_HEART}, {@link #RATING_THUMB_UP_DOWN},
     *    {@link #RATING_3_STARS}, {@link #RATING_4_STARS}, {@link #RATING_5_STARS},
     *    or {@link #RATING_PERCENTAGE}.
     * @return null if an invalid rating style is passed, a new Rating2 instance otherwise.
     */
Return a Rating2 instance with no rating.
Create and return a new Rating2 instance with no rating known for the given
rating style.


Return a Rating2 instance with no rating . Create and return a new Rating2 instance with no rating known for the given rating style .
public static @Nullable Rating2 newUnratedRating(@Style int ratingStyle) {
        switch(ratingStyle) {
            case RATING_HEART:
            case RATING_THUMB_UP_DOWN:
            case RATING_3_STARS:
            case RATING_4_STARS:
            case RATING_5_STARS:
            case RATING_PERCENTAGE:
                return new Rating2(ratingStyle, RATING_NOT_RATED);
            default:
                return null;
        }
    }
public static @ Nullable Rating2 newUnratedRating ( @ Style int ratingStyle ) { switch ( ratingStyle ) { case RATING_HEART : case RATING_THUMB_UP_DOWN : case RATING_3_STARS : case RATING_4_STARS : case RATING_5_STARS : case RATING_PERCENTAGE : return new Rating2 ( ratingStyle , RATING_NOT_RATED ) ; default : return null ; } }
Return a Rating2 instance with no rating.
Return a Rating2 instance with no rating .