Lines Matching refs:rating

28  * A class representing a TV content rating. When a TV input service inserts the content rating
33 * {@link #createRating TvContentRating.createRating} method with valid rating system string
36 * It is possible for an application to define its own content rating system by supplying a content
37 * rating system definition XML resource (see example below) and declaring a broadcast receiver that
45 * <rating-system-definitions xmlns:android="http://schemas.android.com/apk/res/android"
47 * <rating-system-definition android:name="US_TV"
50 * <sub-rating-definition android:name="US_TV_D"
53 * <sub-rating-definition android:name="US_TV_L"
56 * <sub-rating-definition android:name="US_TV_S"
59 * <sub-rating-definition android:name="US_TV_V"
62 * <sub-rating-definition android:name="US_TV_FV"
66 * <rating-definition android:name="US_TV_Y"
71 * <rating-definition android:name="US_TV_Y7"
76 * <sub-rating android:name="US_TV_FV" />
77 * </rating-definition>
78 * <rating-definition android:name="US_TV_G"
83 * <rating-definition android:name="US_TV_PG"
88 * <sub-rating android:name="US_TV_D" />
89 * <sub-rating android:name="US_TV_L" />
90 * <sub-rating android:name="US_TV_S" />
91 * <sub-rating android:name="US_TV_V" />
92 * </rating-definition>
93 * <rating-definition android:name="US_TV_14"
98 * <sub-rating android:name="US_TV_D" />
99 * <sub-rating android:name="US_TV_L" />
100 * <sub-rating android:name="US_TV_S" />
101 * <sub-rating android:name="US_TV_V" />
102 * </rating-definition>
103 * <rating-definition android:name="US_TV_MA"
108 * <sub-rating android:name="US_TV_L" />
109 * <sub-rating android:name="US_TV_S" />
110 * <sub-rating android:name="US_TV_V" />
111 * </rating-definition>
112 * <rating-order>
113 * <rating android:name="US_TV_Y" />
114 * <rating android:name="US_TV_Y7" />
115 * </rating-order>
116 * <rating-order>
117 * <rating android:name="US_TV_G" />
118 * <rating android:name="US_TV_PG" />
119 * <rating android:name="US_TV_14" />
120 * <rating android:name="US_TV_MA" />
121 * </rating-order>
122 * </rating-system-definition>
123 * </rating-system-definitions>}</pre></p>
125 * <h3>System defined rating strings</h3>
128 * <p>For example, to create an object that represents TV-PG rating with suggestive dialogue and
133 * TvContentRating rating = TvContentRating.createRating(
151 * <h4>System defined strings for rating systems</h4>
159 * <td>TV content rating system for Argentina</td>
163 * <td>TV content rating system for Australia</td>
167 * <td>TV content rating system for Brazil</td>
171 * <td>DVB content rating system</td>
175 * <td>DVB content rating system for Spain</td>
179 * <td>DVB content rating system for France</td>
183 * <td>ISDB content rating system</td>
187 * <td>TV content rating system for South Korea</td>
191 * <td>TV content rating system for Singapore</td>
195 * <td>TV content rating system for the United States</td>
695 * Creates a {@code TvContentRating} object with predefined content rating strings.
698 * @param ratingSystem The rating system string. For example, "US_TV".
699 * @param rating The content rating string. For example, "US_TV_PG".
700 * @param subRatings The sub-rating strings. For example, "US_TV_D" and "US_TV_L".
702 * @throws IllegalArgumentException If {@code domain}, {@code ratingSystem} or {@code rating} is
706 String rating, String... subRatings) {
713 if (TextUtils.isEmpty(rating)) {
714 throw new IllegalArgumentException("rating cannot be empty");
716 return new TvContentRating(domain, ratingSystem, rating, subRatings);
724 * @return the {@code TvContentRating} object containing the domain, rating system, rating and
734 throw new IllegalArgumentException("Invalid rating string: " + ratingString);
745 * Constructs a TvContentRating object from a given rating and sub-rating constants.
747 * @param domain The string for domain of the content rating system such as "com.android.tv".
748 * @param ratingSystem The rating system string such as "US_TV".
749 * @param rating The content rating string such as "US_TV_PG".
750 * @param subRatings The sub-rating strings such as "US_TV_D" and "US_TV_L".
753 String domain, String ratingSystem, String rating, String[] subRatings) {
756 mRating = rating;
774 * Returns the rating system of this {@code TvContentRating} object.
781 * Returns the main rating of this {@code TvContentRating} object.
788 * Returns the unmodifiable sub-rating string {@link List} of this {@code TvContentRating}
799 * Returns a string that unambiguously describes the rating information contained in a
803 * @return a string containing the rating information, which can later be stored in the
824 * Returns {@code true} if this rating has the same main rating as the specified rating and when
825 * this rating's sub-ratings contain the other's.
831 * @param rating The {@link TvContentRating} to check.
832 * @return {@code true} if this object contains {@code rating}, {@code false} otherwise.
836 public final boolean contains(TvContentRating rating) {
837 if (rating == null) {
838 throw new IllegalArgumentException("rating cannot be null");
840 if (!rating.getMainRating().equals(mRating)) {
843 if (!rating.getDomain().equals(mDomain) ||
844 !rating.getRatingSystem().equals(mRatingSystem) ||
845 !rating.getMainRating().equals(mRating)) {
849 List<String> subRatingsOther = rating.getSubRatings();