diff options
-rw-r--r-- | src/com/android/tv/util/TvProviderUtils.java | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/src/com/android/tv/util/TvProviderUtils.java b/src/com/android/tv/util/TvProviderUtils.java index f4a3355d..67290b39 100644 --- a/src/com/android/tv/util/TvProviderUtils.java +++ b/src/com/android/tv/util/TvProviderUtils.java @@ -140,13 +140,18 @@ public final class TvProviderUtils { extra.putCharSequence(TvContract.EXTRA_COLUMN_NAME, EXTRA_PROGRAM_COLUMN); extra.putCharSequence(TvContract.EXTRA_DATA_TYPE, "TEXT"); // If the add operation fails, the following just returns null without crashing. - Bundle allColumns = - context.getContentResolver() - .call( - contentUri, - TvContract.METHOD_ADD_COLUMN, - contentUri.toString(), - extra); + Bundle allColumns = null; + try { + allColumns = + context.getContentResolver() + .call( + contentUri, + TvContract.METHOD_ADD_COLUMN, + contentUri.toString(), + extra); + } catch (Exception e) { + Log.e(TAG, "Error trying to add column.", e); + } if (allColumns == null) { Log.w(TAG, "Adding new column failed. Uri=" + contentUri); } |