/*
* Copyright (C) 2014 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.media.tv;
import android.annotation.SystemApi;
import android.net.Uri;
import android.text.TextUtils;
import android.util.Log;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
/**
* A class representing a TV content rating.
* When a TV input service provides the content rating information of a program into TV provider,
* TvContentRating class will be used for generating the value of {@link
* TvContract.Programs#COLUMN_CONTENT_RATING}. To create an object of {@link TvContentRating}, use
* the {@link #createRating} method with valid arguments. The arguments could be a system defined
* strings, or a TV input service defined strings.
* TV input service defined strings are in an xml file defined in <{@link
* android.R.styleable#TvInputService tv-input}>
with the {@link
* android.R.attr#contentRatingSystemXml contentRatingSystemXml} attribute by the TV input service.
*
*
*
* String value |
* Comments |
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
* KR_TV_ALL |
* A rating string for {@code KR_TV}. This rating is for programs that are appropriate
* for all ages. This program usually involves programs designed for children or families.
* |
*
*
* KR_TV_7 |
* A rating string for {@code KR_TV}. This rating is for programs that may contain
* material inappropriate for children younger than 7, and parental guidance is required.
* |
*
*
* KR_TV_12 |
* A rating string for {@code KR_TV}. This rating is for programs that may contain
* material inappropriate for children younger than 12, and parental guidance is required.
* |
*
*
* KR_TV_15 |
* A rating string for {@code KR_TV}. This rating is for programs that may contain
* material inappropriate for children younger than 15, and parental guidance is required.
* |
*
* KR_TV_19 |
* A rating string for {@code KR_TV}. This rating is for programs designed for adults
* only. |
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
* US_TVPG_TV_Y |
* A rating string for {@code US_TVPG}. Programs rated this are designed to be
* appropriate for all children. Whether animated or live-action, the themes and elements
* in this program are specifically designed for a very young audience, including children
* from ages 2-6. This program is not expected to frighten younger children. |
*
*
* US_TVPG_TV_Y7 |
* A rating string for {@code US_TVPG}. Programs rated this are designed for children
* age 7 and above. It may be more appropriate for children who have acquired the
* developmental skills needed to distinguish between make-believe and reality. Themes and
* elements in this program may include mild fantasy violence or comedic violence, or may
* frighten children under the age of 7. Therefore, parents may wish to consider the
* suitability of this program for their very young children. This rating may contain
* fantasy violence (US_TVPG_FV) when programs are generally more intense or more combative
* than other programs in this category. |
*
*
* US_TVPG_TV_G |
* A rating string for {@code US_TVPG}. Most parents would find this program suitable
* for all ages. Although this rating does not signify a program designed specifically for
* children, most parents may let younger children watch this program unattended. It
* contains little or no violence, no strong language and little or no sexual dialogue or
* situations. |
*
*
* US_TVPG_TV_PG |
* A rating string for {@code US_TVPG}. Programs rated this contain material that
* parents may find unsuitable for younger children. Many parents may want to watch it with
* their younger children. The theme itself may call for parental guidance and/or the
* program may contain one or more of the following: some suggestive dialogue (
* {@code US_TVPG_D}), infrequent coarse language ({@code US_TVPG_L}), some sexual
* situations ({@code US_TVPG_S}), or moderate violence ({@code US_TVPG_V}). |
*
*
* US_TVPG_TV_14 |
* A rating string for {@code US_TVPG}. Programs rated this contains some material
* that many parents would find unsuitable for children under 14 years of age. Parents are
* strongly urged to exercise greater care in monitoring this program and are cautioned
* against letting children under the age of 14 watch unattended. This program may contain
* one or more of the following: intensely suggestive dialogue ({@code US_TVPG_D}), strong
* coarse language ({@code US_TVPG_L}), intense sexual situations ({@code US_TVPG_S}), or
* intense violence ({@code US_TVPG_V}). |
*
*
* US_TVPG_TV_MA |
* A rating string for {@code US_TVPG}. Programs rated TV-MA are specifically
* designed to be viewed by adults and therefore may be unsuitable for children under 17.
* This program may contain one or more of the following: crude indecent language
* ({@code US_TVPG_L}), explicit sexual activity ({@code US_TVPG_S}), or graphic violence
* ({@code US_TVPG_V}). |
*
*
*
*
*
*