aboutsummaryrefslogtreecommitdiff
path: root/tests/common
diff options
context:
space:
mode:
authorNick Chalko <nchalko@google.com>2016-10-26 14:03:09 -0700
committerNick Chalko <nchalko@google.com>2016-10-31 10:36:49 -0700
commitd41f0075a7d2ea826204e81fcec57d0aa57171a9 (patch)
treecb30cfbafd80e01d314868cdc36e783d39981119 /tests/common
parent5e0ec06a797e3497da94390c63c7072de442695b (diff)
downloadTV-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.pngbin3253 -> 152 bytes
-rw-r--r--tests/common/res/drawable-xhdpi/blue_small.pngbin1158 -> 109 bytes
-rw-r--r--tests/common/res/drawable-xhdpi/crash_test_android_logo.pngbin18721 -> 14828 bytes
-rw-r--r--tests/common/res/drawable-xhdpi/green.pngbin3253 -> 152 bytes
-rw-r--r--tests/common/res/drawable-xhdpi/green_large.pngbin10263 -> 327 bytes
-rw-r--r--tests/common/res/drawable-xhdpi/red.pngbin3252 -> 152 bytes
-rw-r--r--tests/common/res/drawable-xhdpi/red_large.pngbin10262 -> 327 bytes
-rw-r--r--tests/common/src/com/android/tv/testing/ChannelInfo.java2
-rw-r--r--tests/common/src/com/android/tv/testing/Constants.java2
-rw-r--r--tests/common/src/com/android/tv/testing/ProgramUtils.java10
-rw-r--r--tests/common/src/com/android/tv/testing/TvContentRatingConstants.java3
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
index dd2044ca..a0c4eced 100644
--- a/tests/common/res/drawable-xhdpi/blue.png
+++ b/tests/common/res/drawable-xhdpi/blue.png
Binary files differ
diff --git a/tests/common/res/drawable-xhdpi/blue_small.png b/tests/common/res/drawable-xhdpi/blue_small.png
index 22394ebb..ae9c9608 100644
--- a/tests/common/res/drawable-xhdpi/blue_small.png
+++ b/tests/common/res/drawable-xhdpi/blue_small.png
Binary files differ
diff --git a/tests/common/res/drawable-xhdpi/crash_test_android_logo.png b/tests/common/res/drawable-xhdpi/crash_test_android_logo.png
index 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
Binary files differ
diff --git a/tests/common/res/drawable-xhdpi/green.png b/tests/common/res/drawable-xhdpi/green.png
index 8306b9c3..54f1319a 100644
--- a/tests/common/res/drawable-xhdpi/green.png
+++ b/tests/common/res/drawable-xhdpi/green.png
Binary files differ
diff --git a/tests/common/res/drawable-xhdpi/green_large.png b/tests/common/res/drawable-xhdpi/green_large.png
index 77bbb231..928c348b 100644
--- a/tests/common/res/drawable-xhdpi/green_large.png
+++ b/tests/common/res/drawable-xhdpi/green_large.png
Binary files differ
diff --git a/tests/common/res/drawable-xhdpi/red.png b/tests/common/res/drawable-xhdpi/red.png
index 89f889b9..4ddd30e3 100644
--- a/tests/common/res/drawable-xhdpi/red.png
+++ b/tests/common/res/drawable-xhdpi/red.png
Binary files differ
diff --git a/tests/common/res/drawable-xhdpi/red_large.png b/tests/common/res/drawable-xhdpi/red_large.png
index c52a1242..58682b15 100644
--- a/tests/common/res/drawable-xhdpi/red_large.png
+++ b/tests/common/res/drawable-xhdpi/red_large.png
Binary files differ
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";
}