author | Xiaoliang Wang <xiaoliang.wang@amlogic.com> | 2016-09-08 08:22:39 (GMT) |
---|---|---|
committer | Xiaoliang Wang <xiaoliang.wang@amlogic.com> | 2016-09-08 08:22:39 (GMT) |
commit | f7bf1438cfc3490bff74ebfcfdaaa5f3312db272 (patch) | |
tree | 246a120a458479a192ff9df50dd44c076e8bfda9 | |
parent | a0ccb31181da5d89940014cafa2f6c4c8b187ac7 (diff) | |
download | SubTitle-f7bf1438cfc3490bff74ebfcfdaaa5f3312db272.zip SubTitle-f7bf1438cfc3490bff74ebfcfdaaa5f3312db272.tar.gz SubTitle-f7bf1438cfc3490bff74ebfcfdaaa5f3312db272.tar.bz2 |
PD #131792: change for external subtitle can't show
Change-Id: I44334b5701f737a1718c6a61b9401e7440fcf037
-rw-r--r-- | src/com/subtitleview/SubtitleView.java | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/com/subtitleview/SubtitleView.java b/src/com/subtitleview/SubtitleView.java index bde8423..a1d5440 100644 --- a/src/com/subtitleview/SubtitleView.java +++ b/src/com/subtitleview/SubtitleView.java @@ -275,18 +275,18 @@ public class SubtitleView extends FrameLayout { byte sttmp_2[] = sttmp.getBytes(); if (sttmp_2.length > 0 && 0 == sttmp_2[ sttmp_2.length - 1]) { sttmp_2[ sttmp_2.length - 1] = 0x20; - if (mTextView != null) { - if (mFont != null && (mFont.indexOf("hei") >= 0 - || mFont.indexOf("Hei") >= 0)) { - mTextView.setTypeface(mSimHei); - } - else if (mFont != null && (mFont.indexOf("sun") >= 0 - || mFont.indexOf("Sun") >= 0)) { - mTextView.setTypeface(mSimSun); - } - mTextView.setText (new String (sttmp_2) ); - this.addView (mTextView); + } + if (mTextView != null) { + if (mFont != null && (mFont.indexOf("hei") >= 0 + || mFont.indexOf("Hei") >= 0)) { + mTextView.setTypeface(mSimHei); + } + else if (mFont != null && (mFont.indexOf("sun") >= 0 + || mFont.indexOf("Sun") >= 0)) { + mTextView.setTypeface(mSimSun); } + mTextView.setText (new String (sttmp_2) ); + this.addView (mTextView); } } } |