Merge "TIF: Add content ratings for Australia" into lmp-dev
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
index c5c9dee..6ca3736 100644
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -4851,6 +4851,21 @@
<!-- TV content rating system strings for AR TV -->
<!-- TV content rating system strings for AU TV -->
+ <string name="display_name_autv" translatable="false">Australian TV Classification</string>
+ <string name="display_name_autv_ctc" translatable="false">CTC</string>
+ <string name="display_name_autv_g" translatable="false">G</string>
+ <string name="display_name_autv_pg" translatable="false">PG</string>
+ <string name="display_name_autv_m" translatable="false">M</string>
+ <string name="display_name_autv_ma15" translatable="false">MA 15+</string>
+ <string name="display_name_autv_r18" translatable="false">R 18+</string>
+ <string name="display_name_autv_x18" translatable="false">X 18+</string>
+ <string name="description_autv_ctc">This has advertising approval, but is not yet classified.</string>
+ <string name="description_autv_g">The content is very mild in impact, and suitable for everyone.</string>
+ <string name="description_autv_pg">The content is mild in impact, but it may contain content that children find confusing or upsetting and may require the guidance or parents and guardians.</string>
+ <string name="description_autv_m">The content is moderate in impact, and it is recommended for teenagers aged 15 years and over.</string>
+ <string name="description_autv_ma15">The content is strong in impact, and it is legally restricted to persons 15 years and over.</string>
+ <string name="description_autv_r18">The content is high in impact, and it is restricted to adults.</string>
+ <string name="description_autv_x18">The content is restricted to adults. This classification is a special and legally restricted category which contains only sexually explicit content.</string>
<!-- TV content rating system strings for BG TV -->
diff --git a/core/res/res/xml/tv_content_rating_systems.xml b/core/res/res/xml/tv_content_rating_systems.xml
index 075315a..8c11124 100644
--- a/core/res/res/xml/tv_content_rating_systems.xml
+++ b/core/res/res/xml/tv_content_rating_systems.xml
@@ -22,6 +22,46 @@
<!-- TV content rating system for AR TV -->
<!-- TV content rating system for AU TV -->
+ <rating-system-definition id="AU_TV"
+ displayName="@string/display_name_autv"
+ country="AU">
+ <rating-definition id="AU_TV_CTC"
+ displayName="@string/display_name_autv_ctc"
+ description="@string/description_autv_ctc"
+ ageHint="0" />
+ <rating-definition id="AU_TV_G"
+ displayName="@string/display_name_autv_g"
+ description="@string/description_autv_g"
+ ageHint="0" />
+ <rating-definition id="AU_TV_PG"
+ displayName="@string/display_name_autv_pg"
+ description="@string/description_autv_g"
+ ageHint="15" />
+ <rating-definition id="AU_TV_M"
+ displayName="@string/display_name_autv_m"
+ description="@string/description_autv_m"
+ ageHint="15" />
+ <rating-definition id="AU_TV_MA15"
+ displayName="@string/display_name_autv_ma15"
+ description="@string/description_autv_ma15"
+ ageHint="15" />
+ <rating-definition id="AU_TV_R18"
+ displayName="@string/display_name_autv_r18"
+ description="@string/description_autv_r18"
+ ageHint="18" />
+ <rating-definition id="AU_TV_X18"
+ displayName="@string/display_name_autv_x18"
+ description="@string/description_autv_x18"
+ ageHint="18" />
+ <order>
+ <rating id="AU_TV_G" />
+ <rating id="AU_TV_PG" />
+ <rating id="AU_TV_M" />
+ <rating id="AU_TV_MA15" />
+ <rating id="AU_TV_R18" />
+ <rating id="AU_TV_X18" />
+ </order>
+ </rating-system-definition>
<!-- TV content rating system for BG TV -->
diff --git a/media/java/android/media/tv/TvContentRating.java b/media/java/android/media/tv/TvContentRating.java
index a1b5a6b..fdaa408 100644
--- a/media/java/android/media/tv/TvContentRating.java
+++ b/media/java/android/media/tv/TvContentRating.java
@@ -96,10 +96,10 @@
* <td>AR_TV</td>
* <td></td>
* </tr-->
- * <!--tr>
+ * <tr>
* <td>AU_TV</td>
- * <td></td>
- * </tr-->
+ * <td>Australian TV Classification</td>
+ * </tr>
* <!--tr>
* <td>BG_TV</td>
* <td></td>
@@ -288,10 +288,69 @@
* <td>AR_TV_ALL</td>
* <td></td>
* </tr-->
- * <!--tr>
- * <td>AU_TV_ALL</td>
- * <td></td>
- * </tr-->
+ * <tr>
+ * <td>AU_TV_CTC</td>
+ * <td>A rating string for {@code AU_TV}. The content has been assessed and approved for
+ * advertising unclassified films. Any advertising of unclassified films must display the
+ * CTC message.</td>
+ * </tr>
+ * <tr>
+ * <td>AU_TV_G</td>
+ * <td>A rating string for {@code AU_TV}. The content is very mild in impact. The G
+ * classification is suitable for everyone. G products may contain classifiable elements
+ * such as language and themes that are very mild in impact. However, some G-classified
+ * films may contain content that is not of interest to children.</td>
+ * </tr>
+ * <tr>
+ * <td>AU_TV_PG</td>
+ * <td>A rating string for {@code AU_TV}. The content is mild in impact. The impact of PG
+ * (Parental Guidance) classified films should be no higher than mild, but they may contain
+ * content that children find confusing or upsetting and may require the guidance or parents
+ * and guardians. They may, for example, contain classifiable elements such as language and
+ * themes that are mild in impact. It is not recommended for viewing or playing by persons
+ * under 15 without guidance from parents or guardians.</td>
+ * </tr>
+ * <tr>
+ * <td>AU_TV_M</td>
+ * <td>A rating string for {@code AU_TV}. The content is moderate in impact. Films
+ * classified M (Mature) contain content of a moderate impact and are recommended for
+ * teenagers aged 15 years and over. Children under 15 may legally access this material
+ * because it is an advisory category. However, M classified films may include classifiable
+ * elements such as violence and nudity of moderate impact that are not recommended for
+ * children under 15 years. Parents and guardians may need to find out more about the film’s
+ * specific content, before deciding whether the material is suitable for their child.</td>
+ * </tr>
+ * <tr>
+ * <td>AU_TV_MA16</td>
+ * <td>A rating string for {@code AU_TV}. The content is strong in impact. MA 15+ classified
+ * material contains strong content and is legally restricted to persons 15 years and over.
+ * It may contain classifiable elements such as sex scenes and drug use that are strong in
+ * impact. A person may be asked to show proof of their age before hiring or purchasing an
+ * MA 15+ film. Cinema staff may also request that the person show proof of their age before
+ * allowing them to watch an MA 15+ film. Children under the age of 15 may not legally
+ * watch, buy or hire MA 15+ classified material unless they are in the company of a parent
+ * or adult guardian. Children under 15 who go to the cinema to see an MA 15+ film must be
+ * accompanied by a parent or adult guardian for the duration of the film. The parent or
+ * adult guardian must also purchase the movie ticket for the child. The guardian must be
+ * an adult exercising parental control over the person under 15 years of age. The guardian
+ * needs to be 18 years or older.</td>
+ * </tr>
+ * <tr>
+ * <td>AU_TV_R18</td>
+ * <td>A rating string for {@code AU_TV}. The content is high in impact. R 18+ classified
+ * material is restricted to adults. Such material may contain classifiable elements such as
+ * sex scenes and drug use that are high in impact. Some material classified R18+ may be
+ * offensive to sections of the adult community. A person may be asked for proof of their
+ * age before purchasing, hiring or viewing R18+ films at a retail store or cinema.</td>
+ * </tr>
+ * <tr>
+ * <td>AU_TV_X18</td>
+ * <td>A rating string for {@code AU_TV}. X 18+ films are restricted to adults. This
+ * classification is a special and legally restricted category which contains only sexually
+ * explicit content. That is, material which shows actual sexual intercourse and other
+ * sexual activity between consenting adults. X18+ films are only available for sale or hire
+ * in the ACT and the NT.</td>
+ * </tr>
* <!--tr>
* <td>BG_TV_ALL</td>
* <td></td>
@@ -642,10 +701,6 @@
* <td></td>
* </tr-->
* <!--tr>
- * <td>AU_TV_</td>
- * <td></td>
- * </tr-->
- * <!--tr>
* <td>BG_TV_</td>
* <td></td>
* </tr-->