author | Sandy Luo <sandy.luo@amlogic.com> | 2018-01-12 03:46:07 (GMT) |
---|---|---|
committer | Gerrit Code Review <gituser@scgit.amlogic.com> | 2018-01-12 03:46:07 (GMT) |
commit | f13d026e12cba71d68c4f966b017489c59dd588a (patch) | |
tree | 4944b2d55297035d465168643fd8f7f6e8884cec | |
parent | 58456acf3585b996aed75474189e47839a9c749f (diff) | |
parent | 41e08f0d7997533071a6088c6b169fa0927d9479 (diff) | |
download | TvInput-f13d026e12cba71d68c4f966b017489c59dd588a.zip TvInput-f13d026e12cba71d68c4f966b017489c59dd588a.tar.gz TvInput-f13d026e12cba71d68c4f966b017489c59dd588a.tar.bz2 |
Merge "DroidLogicTvInput: mute or unmute according to block status [1/1]" into m-amlogic
-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 6ca7ff4..55d7221 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 && |