diff options
author | Nick Chalko <nchalko@google.com> | 2016-10-26 14:03:09 -0700 |
---|---|---|
committer | Nick Chalko <nchalko@google.com> | 2016-10-31 10:36:49 -0700 |
commit | d41f0075a7d2ea826204e81fcec57d0aa57171a9 (patch) | |
tree | cb30cfbafd80e01d314868cdc36e783d39981119 /tests/common | |
parent | 5e0ec06a797e3497da94390c63c7072de442695b (diff) | |
download | TV-d41f0075a7d2ea826204e81fcec57d0aa57171a9.tar.gz |
Sync to ub-tv-killing at 6f6e46557accb62c9548e4177d6005aa944dbf33
Change-Id: I873644d6d9d0110c981ef6075cb4019c16bbb94b
Diffstat (limited to 'tests/common')
-rw-r--r-- | tests/common/res/drawable-xhdpi/blue.png | bin | 3253 -> 152 bytes | |||
-rw-r--r-- | tests/common/res/drawable-xhdpi/blue_small.png | bin | 1158 -> 109 bytes | |||
-rw-r--r-- | tests/common/res/drawable-xhdpi/crash_test_android_logo.png | bin | 18721 -> 14828 bytes | |||
-rw-r--r-- | tests/common/res/drawable-xhdpi/green.png | bin | 3253 -> 152 bytes | |||
-rw-r--r-- | tests/common/res/drawable-xhdpi/green_large.png | bin | 10263 -> 327 bytes | |||
-rw-r--r-- | tests/common/res/drawable-xhdpi/red.png | bin | 3252 -> 152 bytes | |||
-rw-r--r-- | tests/common/res/drawable-xhdpi/red_large.png | bin | 10262 -> 327 bytes | |||
-rw-r--r-- | tests/common/src/com/android/tv/testing/ChannelInfo.java | 2 | ||||
-rw-r--r-- | tests/common/src/com/android/tv/testing/Constants.java | 2 | ||||
-rw-r--r-- | tests/common/src/com/android/tv/testing/ProgramUtils.java | 10 | ||||
-rw-r--r-- | tests/common/src/com/android/tv/testing/TvContentRatingConstants.java | 3 |
11 files changed, 8 insertions, 9 deletions
diff --git a/tests/common/res/drawable-xhdpi/blue.png b/tests/common/res/drawable-xhdpi/blue.png Binary files differindex dd2044ca..a0c4eced 100644 --- a/tests/common/res/drawable-xhdpi/blue.png +++ b/tests/common/res/drawable-xhdpi/blue.png diff --git a/tests/common/res/drawable-xhdpi/blue_small.png b/tests/common/res/drawable-xhdpi/blue_small.png Binary files differindex 22394ebb..ae9c9608 100644 --- a/tests/common/res/drawable-xhdpi/blue_small.png +++ b/tests/common/res/drawable-xhdpi/blue_small.png diff --git a/tests/common/res/drawable-xhdpi/crash_test_android_logo.png b/tests/common/res/drawable-xhdpi/crash_test_android_logo.png Binary files differindex 2442cf04..5d6d5826 100644 --- a/tests/common/res/drawable-xhdpi/crash_test_android_logo.png +++ b/tests/common/res/drawable-xhdpi/crash_test_android_logo.png diff --git a/tests/common/res/drawable-xhdpi/green.png b/tests/common/res/drawable-xhdpi/green.png Binary files differindex 8306b9c3..54f1319a 100644 --- a/tests/common/res/drawable-xhdpi/green.png +++ b/tests/common/res/drawable-xhdpi/green.png diff --git a/tests/common/res/drawable-xhdpi/green_large.png b/tests/common/res/drawable-xhdpi/green_large.png Binary files differindex 77bbb231..928c348b 100644 --- a/tests/common/res/drawable-xhdpi/green_large.png +++ b/tests/common/res/drawable-xhdpi/green_large.png diff --git a/tests/common/res/drawable-xhdpi/red.png b/tests/common/res/drawable-xhdpi/red.png Binary files differindex 89f889b9..4ddd30e3 100644 --- a/tests/common/res/drawable-xhdpi/red.png +++ b/tests/common/res/drawable-xhdpi/red.png diff --git a/tests/common/res/drawable-xhdpi/red_large.png b/tests/common/res/drawable-xhdpi/red_large.png Binary files differindex c52a1242..58682b15 100644 --- a/tests/common/res/drawable-xhdpi/red_large.png +++ b/tests/common/res/drawable-xhdpi/red_large.png diff --git a/tests/common/src/com/android/tv/testing/ChannelInfo.java b/tests/common/src/com/android/tv/testing/ChannelInfo.java index 99430461..af1c9891 100644 --- a/tests/common/src/com/android/tv/testing/ChannelInfo.java +++ b/tests/common/src/com/android/tv/testing/ChannelInfo.java @@ -42,8 +42,6 @@ public final class ChannelInfo { * If this is specify for logo, it will be selected randomly including null. */ public static final String GENERATE_LOGO = "GEN"; - // If the logo is set to {@link ChannelInfo#GENERATE_LOGO}, pick one randomly from this list. - private static final int[] LOGOS_RES = {0, R.drawable.crash_test_android_logo}; public static final String[] PROJECTION = { TvContract.Channels.COLUMN_DISPLAY_NUMBER, diff --git a/tests/common/src/com/android/tv/testing/Constants.java b/tests/common/src/com/android/tv/testing/Constants.java index 83d8d293..4c9cb5fb 100644 --- a/tests/common/src/com/android/tv/testing/Constants.java +++ b/tests/common/src/com/android/tv/testing/Constants.java @@ -36,8 +36,6 @@ public final class Constants { .setVideoFrameRate(50).build(); public static final TvTrackInfo SVGA_VIDEO_TRACK = new TvTrackInfo.Builder( TvTrackInfo.TYPE_VIDEO, "SVGA Video").setVideoHeight(600).setVideoWidth(800).build(); - public static final TvTrackInfo GENERIC_VIDEO_TRACK = new TvTrackInfo.Builder( - TvTrackInfo.TYPE_VIDEO, "Generic Video").build(); private Constants() { } diff --git a/tests/common/src/com/android/tv/testing/ProgramUtils.java b/tests/common/src/com/android/tv/testing/ProgramUtils.java index f7f26431..08c6a033 100644 --- a/tests/common/src/com/android/tv/testing/ProgramUtils.java +++ b/tests/common/src/com/android/tv/testing/ProgramUtils.java @@ -20,6 +20,7 @@ import android.content.ContentUris; import android.content.ContentValues; import android.content.Context; import android.database.Cursor; +import android.database.sqlite.SQLiteException; import android.media.tv.TvContract; import android.media.tv.TvContract.Programs; import android.net.Uri; @@ -82,8 +83,13 @@ public class ProgramUtils { if (list.size() >= MAX_DB_INSERT_COUNT_AT_ONCE || timeMs >= targetEndTimeMs) { - context.getContentResolver().bulkInsert(Programs.CONTENT_URI, - list.toArray(new ContentValues[list.size()])); + try { + context.getContentResolver().bulkInsert(Programs.CONTENT_URI, + list.toArray(new ContentValues[list.size()])); + } catch (SQLiteException e) { + Log.e(TAG, "Can't insert EPG.", e); + return; + } if (DEBUG) Log.d(TAG, "Inserted " + list.size() + " programs for " + channelUri); list.clear(); } diff --git a/tests/common/src/com/android/tv/testing/TvContentRatingConstants.java b/tests/common/src/com/android/tv/testing/TvContentRatingConstants.java index b80d56f9..c4c96fed 100644 --- a/tests/common/src/com/android/tv/testing/TvContentRatingConstants.java +++ b/tests/common/src/com/android/tv/testing/TvContentRatingConstants.java @@ -58,7 +58,4 @@ public final class TvContentRatingConstants { public static final TvContentRating CONTENT_RATING_US_TV_PG_US_TV_L_US_TV_S = TvContentRating.createRating("com.android.tv", "US_TV", "US_TV_PG", "US_TV_L", "US_TV_S"); - - public static String STRING_US_TV_PG_US_TV_L_US_TV_S - = "com.android.tv/US_TV/US_TV_Y7/US_TV_L/US_TV_S"; } |