author | Zhiwei Yan <zhiwei.yan@amlogic.com> | 2018-01-09 09:31:56 (GMT) |
---|---|---|
committer | Zhiwei Yan <zhiwei.yan@amlogic.com> | 2018-01-10 10:58:21 (GMT) |
commit | 41e08f0d7997533071a6088c6b169fa0927d9479 (patch) | |
tree | 6f4f1d589c69d2caf459f4fb1871ccb7447db185 | |
parent | 5f568fd72ff551191a0e8e8b22c1ddaa13d8b9b8 (diff) | |
download | TvInput-41e08f0d7997533071a6088c6b169fa0927d9479.zip TvInput-41e08f0d7997533071a6088c6b169fa0927d9479.tar.gz TvInput-41e08f0d7997533071a6088c6b169fa0927d9479.tar.bz2 |
DroidLogicTvInput: mute or unmute according to block status [1/1]
PD# 157709
mute or unmute according to block status when notifyVideoAvailable
Change-Id: I4837939f1fa1b6a4459ad3c64bd9ab65e1efca04
-rw-r--r-- | DroidLogicTvInput/src/com/droidlogic/tvinput/services/DTVInputService.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/DroidLogicTvInput/src/com/droidlogic/tvinput/services/DTVInputService.java b/DroidLogicTvInput/src/com/droidlogic/tvinput/services/DTVInputService.java index 2512ea1..05bc5fa 100644 --- a/DroidLogicTvInput/src/com/droidlogic/tvinput/services/DTVInputService.java +++ b/DroidLogicTvInput/src/com/droidlogic/tvinput/services/DTVInputService.java @@ -435,6 +435,7 @@ public class DTVInputService extends DroidLogicTvInputService implements TvContr private int mChannelBlocked = -1; protected Uri mCurrentUri; + private boolean mIsBlocked = false; private boolean mUpdateTsFlag = false; @@ -961,9 +962,11 @@ public class DTVInputService extends DroidLogicTvInputService implements TvContr if (contentRating != null) { Log.d(TAG, "notifyBlock:"+contentRating.flattenToString()); notifyContentBlocked(contentRating); + mIsBlocked = true; } else if (isBlockNoRatingEnable) { Log.d(TAG, "notifyBlock because of block_norating:"+tcr.flattenToString()); notifyContentBlocked(tcr); + mIsBlocked = true; } mLastBlockedRating = contentRating; if (!isTvPlaying) { @@ -977,6 +980,7 @@ public class DTVInputService extends DroidLogicTvInputService implements TvContr } Log.d(TAG, "notifyAllowed"); notifyContentAllowed(); + mIsBlocked = false; } } } @@ -1237,7 +1241,11 @@ public class DTVInputService extends DroidLogicTvInputService implements TvContr public void notifyVideoAvailable() { Log.d(TAG, "notifyVideoAvailable "+getSessionId()); super.notifyVideoAvailable(); - mTvControlManager.setAmAudioPreMute(TvControlManager.AUDIO_UNMUTE_FOR_TV); + if (mIsBlocked || (mCurrentChannel != null && mCurrentChannel.isLocked())) { + mTvControlManager.setAmAudioPreMute(TvControlManager.AUDIO_MUTE_FOR_TV); + } else { + mTvControlManager.setAmAudioPreMute(TvControlManager.AUDIO_UNMUTE_FOR_TV); + } mSubtitleView.setVisible(is_subtitle_enabled); Log.i(TAG,"mCurrentUri = "+mCurrentUri+",mEasprocessManager = "+mEASProcessManager); if (mEASProcessManager != null && |