summaryrefslogtreecommitdiff
authorTing Wang <ting.wang@amlogic.com>2017-12-11 10:09:54 (GMT)
committer Ting Wang <ting.wang@amlogic.com>2017-12-15 13:46:10 (GMT)
commit1eaf4f9070d35c0518984da780ba550db576f41d (patch)
tree62564822ee7d79b6ccce409e0fb9fefec5f84f4c
parent92d9d67f5d9f4a759e4dfc8486db882a33869d8e (diff)
downloadtv-1eaf4f9070d35c0518984da780ba550db576f41d.zip
tv-1eaf4f9070d35c0518984da780ba550db576f41d.tar.gz
tv-1eaf4f9070d35c0518984da780ba550db576f41d.tar.bz2
LiveTv:modify eas alert[2/3]
PD# 156968 modify eas alert that did not tune to channel correctly Change-Id: I01bb5c7dc1bd3ec77292a36b63a25fbf0da89901
Diffstat
-rw-r--r--core/java/com/droidlogic/app/tv/DroidLogicOverlayView.java15
-rw-r--r--core/java/com/droidlogic/app/tv/DroidLogicTvInputService.java6
-rw-r--r--core/java/com/droidlogic/app/tv/DroidLogicTvUtils.java2
-rw-r--r--core/java/com/droidlogic/app/tv/EasManager.java10
-rw-r--r--core/java/com/droidlogic/app/tv/TvControlManager.java8
5 files changed, 21 insertions, 20 deletions
diff --git a/core/java/com/droidlogic/app/tv/DroidLogicOverlayView.java b/core/java/com/droidlogic/app/tv/DroidLogicOverlayView.java
index 27475d9..b3dd37e 100644
--- a/core/java/com/droidlogic/app/tv/DroidLogicOverlayView.java
+++ b/core/java/com/droidlogic/app/tv/DroidLogicOverlayView.java
@@ -11,9 +11,10 @@ import android.widget.TextView;
public abstract class DroidLogicOverlayView extends FrameLayout {
private static final String TAG = "DroidLogicOverlayView";
- protected ImageView mImageView;
- protected TextView mTextView;
- protected View mSubtitleView;
+ protected ImageView mImageView;
+ protected TextView mTextView;
+ protected View mSubtitleView;
+ protected TextView mEasTextView;
public DroidLogicOverlayView(Context context) {
this(context, null);
@@ -47,8 +48,12 @@ public abstract class DroidLogicOverlayView extends FrameLayout {
mTextView.setText(resId);
}
- public void setText(CharSequence text) {
- mTextView.setText(text);
+ public void setTextForEas(CharSequence text){
+ mEasTextView.setText(text);
+ }
+
+ public void setEasTextVisibility(boolean visible) {
+ mEasTextView.setVisibility(visible ? VISIBLE : GONE);
}
public void setTextVisibility(boolean visible) {
diff --git a/core/java/com/droidlogic/app/tv/DroidLogicTvInputService.java b/core/java/com/droidlogic/app/tv/DroidLogicTvInputService.java
index 7cac414..f7e90d2 100644
--- a/core/java/com/droidlogic/app/tv/DroidLogicTvInputService.java
+++ b/core/java/com/droidlogic/app/tv/DroidLogicTvInputService.java
@@ -677,4 +677,10 @@ public class DroidLogicTvInputService extends TvInputService implements
private float getUptimeSeconds() {
return (float)SystemClock.uptimeMillis() / 1000;
}
+
+ public void notifyAppEasStatus(boolean isStarted){
+ Log.d(TAG, "notifyAppEasStatus:"+isStarted);
+ Bundle bundle = new Bundle();
+ bundle.putInt(DroidLogicTvUtils.SIG_INFO_EAS_STATUS, isStarted ? 1 : 0);
+ mSession.notifySessionEvent(DroidLogicTvUtils.SIG_INFO_EAS_EVENT, bundle);};
}
diff --git a/core/java/com/droidlogic/app/tv/DroidLogicTvUtils.java b/core/java/com/droidlogic/app/tv/DroidLogicTvUtils.java
index 4821e38..5819d28 100644
--- a/core/java/com/droidlogic/app/tv/DroidLogicTvUtils.java
+++ b/core/java/com/droidlogic/app/tv/DroidLogicTvUtils.java
@@ -105,6 +105,8 @@ public class DroidLogicTvUtils
public static final int SIG_INFO_TYPE_ADTV = 5;
public static final int SIG_INFO_TYPE_OTHER = 6;
+ public static final String SIG_INFO_EAS_EVENT = "dtv_eas_event";
+ public static final String SIG_INFO_EAS_STATUS = "eas_status";
/**
* source input type need to switch
*/
diff --git a/core/java/com/droidlogic/app/tv/EasManager.java b/core/java/com/droidlogic/app/tv/EasManager.java
index 37c9b36..236d630 100644
--- a/core/java/com/droidlogic/app/tv/EasManager.java
+++ b/core/java/com/droidlogic/app/tv/EasManager.java
@@ -22,20 +22,12 @@ public class EasManager {
return false;
}
- if (easEvent.alertPriority == 0) {
+ if (easEvent.alertPriority == EAS_TEXT_MESSAGE) {
return false;
}
preEasEvent = easEvent;
return true;
}
-
- public boolean isEasEventNeedChannel(){
- if (curEasEvent != null && curEasEvent.alertPriority >= EAS_HIGH_PRIORITY) {
- return true;
- }else {
- return false;
- }
- }
}
diff --git a/core/java/com/droidlogic/app/tv/TvControlManager.java b/core/java/com/droidlogic/app/tv/TvControlManager.java
index 4ab9d40..3451eec 100644
--- a/core/java/com/droidlogic/app/tv/TvControlManager.java
+++ b/core/java/com/droidlogic/app/tv/TvControlManager.java
@@ -561,15 +561,12 @@ public class TvControlManager {
if (mEasListener != null) {
Log.i(TAG,"mEaslister is not null");
int sectionCount = p.readInt();
+ Log.i(TAG,"eas section count = "+sectionCount);
for (int count = 0; count<sectionCount; count++) {
EasEvent curEasEvent = new EasEvent();
curEasEvent.readEasEvent(p);
if (easManager.isEasEventNeedProcess(curEasEvent)) {
- if (easManager.isEasEventNeedChannel()) {
- mEasListener.processDetailsChannelAlert(curEasEvent);
- }else {
- mEasListener.processTextAlert(curEasEvent);
- }
+ mEasListener.processDetailsChannelAlert(curEasEvent);
}
}
}
@@ -4794,7 +4791,6 @@ public class TvControlManager {
}
public interface EasEventListener {
void processDetailsChannelAlert(EasEvent ev);
- void processTextAlert(EasEvent ev);
}
public class VFrameEvent{