@Test public void testContentRatingsToString_singleRating() { TvContentRating[] ratings = new TvContentRating[1]; ratings[0] = TvContentRating.createRating( "com.android.tv", "US_TV", "US_TV_PG", "US_TV_D", "US_TV_L", "US_TV_S", "US_TV_V"); assertEquals("com.android.tv/US_TV/US_TV_PG/US_TV_D/US_TV_L/US_TV_S/US_TV_V", TvContractUtils.contentRatingsToString(ratings)); }
public static String contentRatingsToString(TvContentRating[] contentRatings) { if (contentRatings == null || contentRatings.length == 0) { return null; } StringBuilder ratings = new StringBuilder(contentRatings[0].flattenToString()); for (int i = 1; i < contentRatings.length; ++i) { ratings.append(DELIMITER); ratings.append(contentRatings[i].flattenToString()); } return ratings.toString(); }
TvContractUtils { public static String contentRatingsToString(TvContentRating[] contentRatings) { if (contentRatings == null || contentRatings.length == 0) { return null; } StringBuilder ratings = new StringBuilder(contentRatings[0].flattenToString()); for (int i = 1; i < contentRatings.length; ++i) { ratings.append(DELIMITER); ratings.append(contentRatings[i].flattenToString()); } return ratings.toString(); } }
TvContractUtils { public static String contentRatingsToString(TvContentRating[] contentRatings) { if (contentRatings == null || contentRatings.length == 0) { return null; } StringBuilder ratings = new StringBuilder(contentRatings[0].flattenToString()); for (int i = 1; i < contentRatings.length; ++i) { ratings.append(DELIMITER); ratings.append(contentRatings[i].flattenToString()); } return ratings.toString(); } private  TvContractUtils(); }
TvContractUtils { public static String contentRatingsToString(TvContentRating[] contentRatings) { if (contentRatings == null || contentRatings.length == 0) { return null; } StringBuilder ratings = new StringBuilder(contentRatings[0].flattenToString()); for (int i = 1; i < contentRatings.length; ++i) { ratings.append(DELIMITER); ratings.append(contentRatings[i].flattenToString()); } return ratings.toString(); } private  TvContractUtils(); static TvContentRating[] stringToContentRatings(String commaSeparatedRatings); static String contentRatingsToString(TvContentRating[] contentRatings); static String[] stringToAudioLanguages(String commaSeparatedString); static String audioLanguagesToString(String[] audioLanguages); }
TvContractUtils { public static String contentRatingsToString(TvContentRating[] contentRatings) { if (contentRatings == null || contentRatings.length == 0) { return null; } StringBuilder ratings = new StringBuilder(contentRatings[0].flattenToString()); for (int i = 1; i < contentRatings.length; ++i) { ratings.append(DELIMITER); ratings.append(contentRatings[i].flattenToString()); } return ratings.toString(); } private  TvContractUtils(); static TvContentRating[] stringToContentRatings(String commaSeparatedRatings); static String contentRatingsToString(TvContentRating[] contentRatings); static String[] stringToAudioLanguages(String commaSeparatedString); static String audioLanguagesToString(String[] audioLanguages);  }