author | yu.fang <yu.fang@amlogic.com> | 2017-12-12 05:51:52 (GMT) |
---|---|---|
committer | yu.fang <yu.fang@amlogic.com> | 2017-12-12 05:51:52 (GMT) |
commit | f008399d34882630b8e605b49945628d6bf723bf (patch) | |
tree | 0c75d71fc48bd847d3577f71209dcf38717c017c | |
parent | a6a5ce569875fd76c50c3869e8b78c4fe9e38953 (diff) | |
download | tv-f008399d34882630b8e605b49945628d6bf723bf.zip tv-f008399d34882630b8e605b49945628d6bf723bf.tar.gz tv-f008399d34882630b8e605b49945628d6bf723bf.tar.bz2 |
tv/framework: remove NullPointerException when searched channel with number.[2/2]
PD# 156481
remove NullPointerException when searched channel with number.
Change-Id: I9cf19b0476a5f221cc6919a8817fd4af4feb005b
-rw-r--r-- | core/java/com/droidlogic/app/tv/DroidLogicTvUtils.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/core/java/com/droidlogic/app/tv/DroidLogicTvUtils.java b/core/java/com/droidlogic/app/tv/DroidLogicTvUtils.java index 0891395..4821e38 100644 --- a/core/java/com/droidlogic/app/tv/DroidLogicTvUtils.java +++ b/core/java/com/droidlogic/app/tv/DroidLogicTvUtils.java @@ -296,6 +296,10 @@ public class DroidLogicTvUtils public static String getCurrentSignalType(Context context) { String mCurrentSignalType = Settings.System.getString(context.getContentResolver(), DroidLogicTvUtils.TV_KEY_DTV_TYPE); + if (mCurrentSignalType == null) { + mCurrentSignalType = TvContract.Channels.TYPE_ATSC_T; + Settings.System.putString(context.getContentResolver(), DroidLogicTvUtils.TV_KEY_DTV_TYPE, mCurrentSignalType); + } if (mCurrentSignalType.equals(TvContract.Channels.TYPE_ATSC_T)) { mCurrentSignalType = DroidLogicTvUtils.SIGNAL_TYPE_AIR; |