Lines Matching refs:rating

31  * A class representing a TV content rating. When a TV input service inserts the content rating
36 * {@link #createRating TvContentRating.createRating} method with valid rating system string
39 * <p>It is possible for an application to define its own content rating system by supplying a
40 * content rating system definition XML resource (see example below) and declaring a broadcast
48 * <rating-system-definitions xmlns:android="http://schemas.android.com/apk/res/android"
50 * <rating-system-definition android:name="US_TV"
53 * <sub-rating-definition android:name="US_TV_D"
56 * <sub-rating-definition android:name="US_TV_L"
59 * <sub-rating-definition android:name="US_TV_S"
62 * <sub-rating-definition android:name="US_TV_V"
65 * <sub-rating-definition android:name="US_TV_FV"
69 * <rating-definition android:name="US_TV_Y"
74 * <rating-definition android:name="US_TV_Y7"
79 * <sub-rating android:name="US_TV_FV" />
80 * </rating-definition>
81 * <rating-definition android:name="US_TV_G"
86 * <rating-definition android:name="US_TV_PG"
91 * <sub-rating android:name="US_TV_D" />
92 * <sub-rating android:name="US_TV_L" />
93 * <sub-rating android:name="US_TV_S" />
94 * <sub-rating android:name="US_TV_V" />
95 * </rating-definition>
96 * <rating-definition android:name="US_TV_14"
101 * <sub-rating android:name="US_TV_D" />
102 * <sub-rating android:name="US_TV_L" />
103 * <sub-rating android:name="US_TV_S" />
104 * <sub-rating android:name="US_TV_V" />
105 * </rating-definition>
106 * <rating-definition android:name="US_TV_MA"
111 * <sub-rating android:name="US_TV_L" />
112 * <sub-rating android:name="US_TV_S" />
113 * <sub-rating android:name="US_TV_V" />
114 * </rating-definition>
115 * <rating-order>
116 * <rating android:name="US_TV_Y" />
117 * <rating android:name="US_TV_Y7" />
118 * </rating-order>
119 * <rating-order>
120 * <rating android:name="US_TV_G" />
121 * <rating android:name="US_TV_PG" />
122 * <rating android:name="US_TV_14" />
123 * <rating android:name="US_TV_MA" />
124 * </rating-order>
125 * </rating-system-definition>
126 * </rating-system-definitions>}</pre>
128 * <h3>System defined rating strings</h3>
132 * <p>For example, to create an object that represents TV-PG rating with suggestive dialogue and
137 * TvContentRating rating = TvContentRating.createRating(
155 * <h4>System defined strings for rating systems</h4>
163 * <td>TV content rating system for Argentina</td>
167 * <td>TV content rating system for Australia</td>
171 * <td>TV content rating system for Brazil</td>
175 * <td>TV content rating system for Canada (English)</td>
179 * <td>TV content rating system for Canada (French)</td>
183 * <td>DVB content rating system</td>
187 * <td>DVB content rating system for Spain</td>
191 * <td>DVB content rating system for France</td>
195 * <td>ISDB content rating system</td>
199 * <td>TV content rating system for South Korea</td>
203 * <td>TV content rating system for Singapore</td>
207 * <td>Movie content rating system for the United States</td>
211 * <td>TV content rating system for the United States</td>
786 * Rating constant denoting unrated content. Used to handle the case where the content rating
797 * Creates a {@code TvContentRating} object with predefined content rating strings.
800 * @param ratingSystem The rating system string. For example, "US_TV".
801 * @param rating The content rating string. For example, "US_TV_PG".
802 * @param subRatings The sub-rating strings. For example, "US_TV_D" and "US_TV_L".
804 * @throws IllegalArgumentException If {@code domain}, {@code ratingSystem} or {@code rating} is
808 String rating, String... subRatings) {
815 if (TextUtils.isEmpty(rating)) {
816 throw new IllegalArgumentException("rating cannot be empty");
818 return new TvContentRating(domain, ratingSystem, rating, subRatings);
826 * @return the {@code TvContentRating} object containing the domain, rating system, rating and
836 throw new IllegalArgumentException("Invalid rating string: " + ratingString);
847 * Constructs a TvContentRating object from a given rating and sub-rating constants.
849 * @param domain The string for domain of the content rating system such as "com.android.tv".
850 * @param ratingSystem The rating system string such as "US_TV".
851 * @param rating The content rating string such as "US_TV_PG".
852 * @param subRatings The sub-rating strings such as "US_TV_D" and "US_TV_L".
855 String domain, String ratingSystem, String rating, String[] subRatings) {
858 mRating = rating;
876 * Returns the rating system of this {@code TvContentRating} object.
883 * Returns the main rating of this {@code TvContentRating} object.
890 * Returns the unmodifiable sub-rating string {@link List} of this {@code TvContentRating}
901 * Returns a string that unambiguously describes the rating information contained in a
905 * @return a string containing the rating information, which can later be stored in the
926 * Returns {@code true} if this rating has the same main rating as the specified rating and when
927 * this rating's sub-ratings contain the other's.
932 * @param rating The {@link TvContentRating} to check.
933 * @return {@code true} if this object contains {@code rating}, {@code false} otherwise.
935 public final boolean contains(@NonNull TvContentRating rating) {
936 Preconditions.checkNotNull(rating);
937 if (!rating.getMainRating().equals(mRating)) {
940 if (!rating.getDomain().equals(mDomain) ||
941 !rating.getRatingSystem().equals(mRatingSystem) ||
942 !rating.getMainRating().equals(mRating)) {
946 List<String> subRatingsOther = rating.getSubRatings();