summaryrefslogtreecommitdiff
path: root/src/com/android
diff options
context:
space:
mode:
authorConrad Chen <conradchen@google.com>2017-04-24 17:03:24 -0700
committerConrad Chen <conradchen@google.com>2017-04-25 15:24:09 -0700
commit3b80faf3f29f523bd1032636bdbdc8efaf8927c5 (patch)
tree4dd6e1011a7a48196f015f719ff0233d030e8382 /src/com/android
parent3be230a48b9e386e9d516078d556bdf7fa521132 (diff)
downloadTvProvider-3b80faf3f29f523bd1032636bdbdc8efaf8927c5.tar.gz
Fix preview channels insertion with null input ID
Test: cts-tradefed run cts -m CtsTvTestCases Bug: 37682430 Change-Id: I8ce8004f361d4ff56ae12ad70c9633481f97169e
Diffstat (limited to 'src/com/android')
-rw-r--r--src/com/android/providers/tv/TvProvider.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/android/providers/tv/TvProvider.java b/src/com/android/providers/tv/TvProvider.java
index 867f4b0..b176758 100644
--- a/src/com/android/providers/tv/TvProvider.java
+++ b/src/com/android/providers/tv/TvProvider.java
@@ -1324,7 +1324,7 @@ public class TvProvider extends ContentProvider {
case MATCH_CHANNEL:
// Preview channels are not necessarily associated with TV input service.
// Therefore, we fill a fake ID to meet not null restriction for preview channels.
- if (!values.containsKey(Channels.COLUMN_INPUT_ID)
+ if (values.get(Channels.COLUMN_INPUT_ID) == null
&& Channels.TYPE_PREVIEW.equals(values.get(Channels.COLUMN_TYPE))) {
values.put(Channels.COLUMN_INPUT_ID, EMPTY_STRING);
}