summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorJinsuk Kim <jinsukkim@google.com>2014-05-28 19:11:44 +0900
committerJungshik Jang <jayjang@google.com>2014-06-02 11:00:55 +0900
commite1e63c7c54b8a6a5d5d207bcedd08d2f8ac2465e (patch)
treea3157737ef1c8328113d509890bbfd00c4f3fe07 /services
parentd42a7a322b7adf532ae0b70cb9eb1df7e62a8f2d (diff)
downloadframeworks_base-e1e63c7c54b8a6a5d5d207bcedd08d2f8ac2465e.zip
frameworks_base-e1e63c7c54b8a6a5d5d207bcedd08d2f8ac2465e.tar.gz
frameworks_base-e1e63c7c54b8a6a5d5d207bcedd08d2f8ac2465e.tar.bz2
DO NOT MERGE: Dispatch incoming CEC messages to feature actions
This CL dispatches incoming CEC messages to feature actions that the service manages. Change-Id: I9221d6a25648846327d00fe5404aaf1e8ec786ce
Diffstat (limited to 'services')
-rw-r--r--services/core/java/com/android/server/hdmi/HdmiControlService.java13
1 files changed, 11 insertions, 2 deletions
diff --git a/services/core/java/com/android/server/hdmi/HdmiControlService.java b/services/core/java/com/android/server/hdmi/HdmiControlService.java
index 2fc5e88..072b97f 100644
--- a/services/core/java/com/android/server/hdmi/HdmiControlService.java
+++ b/services/core/java/com/android/server/hdmi/HdmiControlService.java
@@ -290,8 +290,7 @@ public final class HdmiControlService extends SystemService {
// TODO: Add remaining system information query such as
// <Give Device Power Status> and <Request Active Source> handler.
default:
- Slog.w(TAG, "Unsupported cec command:" + message.toString());
- return false;
+ return dispatchMessageToAction(message);
}
}
@@ -394,6 +393,16 @@ public final class HdmiControlService extends SystemService {
}
}
+ private boolean dispatchMessageToAction(HdmiCecMessage message) {
+ for (FeatureAction action : mActions) {
+ if (action.processCommand(message)) {
+ return true;
+ }
+ }
+ Slog.w(TAG, "Unsupported cec command:" + message);
+ return false;
+ }
+
// Record class that monitors the event of the caller of being killed. Used to clean up
// the listener list and record list accordingly.
private final class HotplugEventListenerRecord implements IBinder.DeathRecipient {