From 20322236e664b6ff86d334ca538038175fd972a3 Mon Sep 17 00:00:00 2001 From: Wally Yau Date: Fri, 27 Aug 2021 08:06:35 -0700 Subject: Handle null value for the recording_data_uri field The URI can be null if the program is available through the network from a backend. Bug: 158265628 Test: Manual Change-Id: I463dc5ada485b0650a04ea784e25f790fa66ee70 --- src/com/android/tv/dvr/data/RecordedProgram.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/android/tv/dvr/data/RecordedProgram.java b/src/com/android/tv/dvr/data/RecordedProgram.java index 61430551..230ec62d 100644 --- a/src/com/android/tv/dvr/data/RecordedProgram.java +++ b/src/com/android/tv/dvr/data/RecordedProgram.java @@ -113,7 +113,7 @@ public abstract class RecordedProgram extends BaseProgramImpl { .setPosterArtUri(StringUtils.nullToEmpty(cursor.getString(index++))) .setThumbnailUri(StringUtils.nullToEmpty(cursor.getString(index++))) .setSearchable(cursor.getInt(index++) == 1) - .setDataUri(cursor.getString(index++)) + .setDataUri(StringUtils.nullToEmpty(cursor.getString(index++))) .setDataBytes(cursor.getLong(index++)) .setDurationMillis(cursor.getLong(index++)) .setExpireTimeUtcMillis(cursor.getLong(index++)) -- cgit v1.2.3