List of usage examples for android.media.tv TvInputManager VIDEO_UNAVAILABLE_REASON_AUDIO_ONLY
int VIDEO_UNAVAILABLE_REASON_AUDIO_ONLY
To view the source code for android.media.tv TvInputManager VIDEO_UNAVAILABLE_REASON_AUDIO_ONLY.
Click Source Link
From source file:com.android.tv.ui.TunableTvView.java
@UiThread private void hideScreenByVideoAvailability(int reason) { mVideoAvailable = false;/*from w ww .ja va 2 s . com*/ mVideoUnavailableReason = reason; if (mInternetCheckTask != null) { mInternetCheckTask.cancel(true); mInternetCheckTask = null; } switch (reason) { case TvInputManager.VIDEO_UNAVAILABLE_REASON_AUDIO_ONLY: mHideScreenView.setVisibility(VISIBLE); mHideScreenView.setImageVisibility(false); mHideScreenView.setText(R.string.tvview_msg_audio_only); mBufferingSpinnerView.setVisibility(GONE); unmuteIfPossible(); break; case TvInputManager.VIDEO_UNAVAILABLE_REASON_BUFFERING: mBufferingSpinnerView.setVisibility(VISIBLE); mute(); break; case TvInputManager.VIDEO_UNAVAILABLE_REASON_WEAK_SIGNAL: mHideScreenView.setVisibility(VISIBLE); mHideScreenView.setText(R.string.tvview_msg_weak_signal); mBufferingSpinnerView.setVisibility(GONE); mute(); break; case TvInputManager.VIDEO_UNAVAILABLE_REASON_TUNING: case VIDEO_UNAVAILABLE_REASON_NOT_TUNED: mHideScreenView.setVisibility(VISIBLE); mHideScreenView.setImageVisibility(false); mHideScreenView.setText(null); mBufferingSpinnerView.setVisibility(GONE); mute(); break; case TvInputManager.VIDEO_UNAVAILABLE_REASON_UNKNOWN: default: mHideScreenView.setVisibility(VISIBLE); mHideScreenView.setImageVisibility(false); mHideScreenView.setText(null); mBufferingSpinnerView.setVisibility(GONE); mute(); if (mCurrentChannel != null && !mCurrentChannel.isPhysicalTunerChannel()) { mInternetCheckTask = new InternetCheckTask(); mInternetCheckTask.execute(); } break; } }
From source file:com.android.tv.MainActivity.java
private void updateAvailabilityToast(StreamInfo info) { if (info.isVideoAvailable()) { return;//from w w w . ja va 2s. c o m } int stringId; switch (info.getVideoUnavailableReason()) { case TunableTvView.VIDEO_UNAVAILABLE_REASON_NOT_TUNED: case TvInputManager.VIDEO_UNAVAILABLE_REASON_TUNING: case TvInputManager.VIDEO_UNAVAILABLE_REASON_BUFFERING: case TvInputManager.VIDEO_UNAVAILABLE_REASON_AUDIO_ONLY: case TvInputManager.VIDEO_UNAVAILABLE_REASON_WEAK_SIGNAL: return; case TvInputManager.VIDEO_UNAVAILABLE_REASON_UNKNOWN: default: stringId = R.string.msg_channel_unavailable_unknown; break; } Toast.makeText(this, stringId, Toast.LENGTH_SHORT).show(); }