History log of /frameworks/base/services/core/java/com/android/server/hdmi/HdmiCecLocalDevicePlayback.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
7609bc324d89ebf99ac04f21e992fdd7315d2be0 02-Dec-2016 Donghyun Cho <donghyun@google.com> Enable sendKeyEvent() for all types of devices

Previously there was only sendKeyEvent() implementation for TV and the
method was no-op for other devices. This change moves the event handling
logic into HdmiCecLocalDevice so as to make this method work on the
playback device.

Bug: 33285033
Test: Sent key event from playback device, and it worked.
Change-Id: I937502ab87ce823630b0f9a933355d5a4cc5e96a
/frameworks/base/services/core/java/com/android/server/hdmi/HdmiCecLocalDevicePlayback.java
9ccff51b54ce282d19cb13dd326dc03950be07fe 01-Apr-2016 Donghyun Cho <donghyun@google.com> Don't broadcast <Standby> message during shutdown when setting is disabled

When the system is shutting down or the screen is going to be off, <Standby>
message will be broadcasted if and only if the setting variable,
Settings.Global#HDMI_CONTROL_AUTO_DEVICE_OFF_ENABLED, is enabled. This change
will make the shutdown case to be checked with the setting properly, too.

Bug: 27781559
Change-Id: Ia6605d6b5627ab1ff67285d72846b618a09548bc
/frameworks/base/services/core/java/com/android/server/hdmi/HdmiCecLocalDevicePlayback.java
a09256c72f67010887f2a3801d4e1d27fa0ec2f7 11-Mar-2016 Donghyun Cho <donghyun@google.com> Add a system property for the 'Set Menu Language' feature of CEC

The CEC feature, <Set Menu Language>, is enabled by setting a system
property 'ro.hdmi.set_menu_language', which is false by default.

Bug: 25704899
Change-Id: I941b238bcc06227c128f09d38d422b8295e81b7b
/frameworks/base/services/core/java/com/android/server/hdmi/HdmiCecLocalDevicePlayback.java
cb802870f7f855c429556643fd67179a7b5dc747 13-Oct-2015 Jinsuk Kim <jinsukkim@google.com> CEC: Queue up callbacks to handle on final result

While one party calls oneTouchPlay() to initiate the action and
put it in progress, the other parties making the same call gets
an error 'operation in progress'. This is not really an error,
but there was no other choice for them but just to wait till
the action is completed and the service is ready to accept
the API call again.

This CL resolves the inconvenice by allowing multiple callbacks
rather than returning IN_PROGRESS for those joining later. Same
was applied to queryDisplayStatus().

Change-Id: I5fc9aba4aa73e76a25f8fdec37e11cd961a3d35f
(cherry picked from commit 98a25f1ee27c1b4362a23981edc17fc92199a876)
/frameworks/base/services/core/java/com/android/server/hdmi/HdmiCecLocalDevicePlayback.java
8ea452e3f6e85ed847ef6461b3969c889017b277 10-Jul-2015 Jinsuk Kim <jinsukkim@google.com> CEC: Do not switch language if the new one is same as the old one

Do not switch language if the new language is the same as
the current one. This helps avoid accidental country variant
switching such as from en_US to en_AU due to the limitation of CEC.

Bug: 22373619
Change-Id: Ia98aff67e37b470b3f550a5c097e8140c1a51ecf
/frameworks/base/services/core/java/com/android/server/hdmi/HdmiCecLocalDevicePlayback.java
795415b57b7271a11d16ca42703251a325df1097 01-Oct-2014 Terry Heo <terryheo@google.com> CEC: Handle <Set Menu Language> message on playback devices

Bug: 16819131, Bug: 21505123
Change-Id: I3dc6439c13c2ebe5591d9e27c0c86419ed440f9b
/frameworks/base/services/core/java/com/android/server/hdmi/HdmiCecLocalDevicePlayback.java
e6e8f3d589f42393cf02a2bd766d678d80dad874 11-May-2015 Jinsuk Kim <jinsukkim@google.com> CEC: Let playback device send <Standby> upon power off

Let playback device send a command <Standby> based on the setting.
ACTION_SHUTDOWN leads to broadcast command to put all the devices
to sleep, and ACTION_SCREEN_OFF optionally turns off TV only.

Change-Id: Id458b23ce86b0c3179efa21cce85b721a47001be
/frameworks/base/services/core/java/com/android/server/hdmi/HdmiCecLocalDevicePlayback.java
659c486beb0ccdf53a9176cb5c2c3e7c9acf8f50 06-May-2015 Jinsuk Kim <jinsukkim@google.com> CEC: Make wakeup on hotplug optional

Added a new system property to make the feature optional. True
by default.

Bug: 20897914
Change-Id: I8bfca5144b802b95361e63b29abd6371971c7dbb
/frameworks/base/services/core/java/com/android/server/hdmi/HdmiCecLocalDevicePlayback.java
9b8507c52ae845c8eed9fd9952bf66538934b8fd 24-Mar-2015 Jinsuk Kim <jinsukkim@google.com> CEC: Explicitly turn on screen for remote control passthrough

Ensures that the playback device turns on display output signal
upon receiving CEC command <User Control Pressed>.

Bug: 19518981
Change-Id: I4f898380c9ffc071da2357a51e61309ae5d233f5
/frameworks/base/services/core/java/com/android/server/hdmi/HdmiCecLocalDevicePlayback.java
8d115eb18fce5b85538239e2373c3efd28e46986 18-Mar-2015 Jinsuk Kim <jinsukkim@google.com> CEC: Expose API sendStandby()

Allows playback/TV device to use the API to turn off
TV/other device that accepts the command.

Bug: 19802768
Change-Id: I6440626c08efb1473bea5ab577e571d0bb92d4a1
/frameworks/base/services/core/java/com/android/server/hdmi/HdmiCecLocalDevicePlayback.java
bad839386afc76ea037da022960b63683e95a7b0 09-Feb-2015 Jinsuk Kim <jinsukkim@google.com> CEC: Define a system property to keep playback device awake

Playback device doesn't go to suspend (standby) mode if it's
the active source. This CL makes the behavior configurable through
the system property persist.sys.hdmi.keep_awake.

Bug: 19299723
Change-Id: Icb8b593ab44429ec0520e60d19d0368982ff5667
/frameworks/base/services/core/java/com/android/server/hdmi/HdmiCecLocalDevicePlayback.java
4361549891e721ede7ce4955c5785d9d3d908554 30-Jan-2015 Jinsuk Kim <jinsukkim@google.com> Revert "CEC: Let playback device switch TV input after bootup"

This reverts commit 8913a0e1e8559d96e82b1ff408dd312ed279021b.

Change-Id: Ibfabdd94206141274a69040e0ed90ba29aeae75b
/frameworks/base/services/core/java/com/android/server/hdmi/HdmiCecLocalDevicePlayback.java
8913a0e1e8559d96e82b1ff408dd312ed279021b 17-Jan-2015 Jinsuk Kim <jinsukkim@google.com> CEC: Let playback device switch TV input after bootup

Saves users from having to switch TV input manually to a playback device
after it boots up.

Bug: 19046176
Change-Id: I0a4fae1036138ce2e19cbac9fdd9dda41bdcf89f
/frameworks/base/services/core/java/com/android/server/hdmi/HdmiCecLocalDevicePlayback.java
e26d833c4a00bc7c1c23083f28ef891703e7e385 09-Jan-2015 Jinsuk Kim <jinsukkim@google.com> CEC: Keep Playback device awake while it is the active source

Alleviates the user experience issue of having to turn on the device
manually when it goes to standby mode while the device occupies
the display.

Bug: 18882764
Change-Id: I10b239a599a310e47e3c2cb98737e4b0fdb4e435
/frameworks/base/services/core/java/com/android/server/hdmi/HdmiCecLocalDevicePlayback.java
8ecb7219dff70d31376b236e6f5a954a61a3486b 27-Oct-2014 Yuncheol Heo <ycheo@google.com> CEC: Send <ReportMenuStatus:active> together sending <ActiveSource>.

- Some TV doesn't ask the menu status actively, so we'll send it
together when sending <ActiveSource>.

Bug: 18109775
Change-Id: I4f7378bb9feaa11d9c9e5a2f6633e19cd41a5fc5
/frameworks/base/services/core/java/com/android/server/hdmi/HdmiCecLocalDevicePlayback.java
6f87b4e6b6db76cb32d449ad1fdf1946ff4e96f7 10-Oct-2014 Jinsuk Kim <jinsukkim@google.com> CEC: Queue actions for starting later when not ready

Requests coming in while the service is still being brought up
were discarded. Changed to queue them so that they can be started
after the initialization is completed.

Bug: 17933899
Change-Id: Ic9d9cd2094b830c80dec54dd5ef6a18159a74dc7
/frameworks/base/services/core/java/com/android/server/hdmi/HdmiCecLocalDevicePlayback.java
62ba538b940ab0f69991fbc949bed513e0548d6e 11-Oct-2014 Jinsuk Kim <jinsukkim@google.com> resolved conflicts for merge of 3170c035 to lmp-mr1-dev

Change-Id: Ia34a304451f0dd7148d6d0cbd1d8c8ca81001b86
229c422c7bccddf4f55bad5fde8161828347906c 08-Oct-2014 Jinsuk Kim <jinsukkim@google.com> CEC: Prevents HdmiControlService from turning on TV on wakeup

The feature causes Fugu to turn on TV for unexpected cases.
Disables the feature until we figure out a better way to find
right wake up events.

Bug: 17875468
Change-Id: Icfb04f40e5b13f751b7466ea9789ba8eadcddea6
/frameworks/base/services/core/java/com/android/server/hdmi/HdmiCecLocalDevicePlayback.java
84659edd41b0bc7ecde645405e926a641e704824 07-Oct-2014 Jinsuk Kim <jinsukkim@google.com> Merge "CEC: Send <Device Vendor ID> after address allocation" into lmp-mr1-dev
ad515e88ee53ef0849b2e749efd87f7587514769 07-Oct-2014 Jinsuk Kim <jinsukkim@google.com> CEC: Send <Device Vendor ID> after address allocation

This is required to pass CTS 11.2.9-2.

Bug: 17882288

Change-Id: Ie2823be8635a458a63a95abd44135035667d5836
/frameworks/base/services/core/java/com/android/server/hdmi/HdmiCecLocalDevicePlayback.java
995fcfc5919b7375d2d8cbc2ca5e08e193ffaf17 06-Oct-2014 Jinsuk Kim <jinsukkim@google.com> CEC: Reset active source status on routing control

Set active source status to false when broadcast routing control
commands indicate other device is about to be the new active source.

Bug: 17840270
Change-Id: I176e21ec8789624e29421b912ba641a21f0f5f21
/frameworks/base/services/core/java/com/android/server/hdmi/HdmiCecLocalDevicePlayback.java
89ec14e48f4a1bdf291cda9fba7b8172f55a2447 16-Sep-2014 Yuncheol Heo <ycheo@google.com> Make the playback device pass CEC CTS.

- Clear the logical address on the hotplug event.
- Don't reset mIsActiveSource flag on the hotplug event.

Bug: 17517438
Change-Id: Id129a9cce30323090ce21bbfc188b955bd32755b
/frameworks/base/services/core/java/com/android/server/hdmi/HdmiCecLocalDevicePlayback.java
959d2db12c7c6a06465af1251bc4cece580a72a3 28-Aug-2014 Terry Heo <terryheo@google.com> CEC: Implement dump() of HdmiControlService

In addition, use hexadecimal address representation in HdmiPortInfo.toString()

Bug: 17310007
Change-Id: Iaba8f718f86a18a23b50f983053c7589dcdcfaf8
/frameworks/base/services/core/java/com/android/server/hdmi/HdmiCecLocalDevicePlayback.java
64bafd9108b532102bc13c47966444b073c33faf 11-Aug-2014 Yuncheol Heo <ycheo@google.com> Make it not to go to sleep when changing TV's input to the others.

- Previously, we decided to make it go to sleep when changing TV's input
to the others. But, we found that the current molly couldn't wake up by
CEC commands actively. So, we'll revert the decision.
- In addition, during investigating this issue, we found that currently
molly couldn't work with Samsung (SS) TV harmoniously. SS TV will send
<RoutingChange> and <RequestActiveSource> when it wakes up. If there
is no <ActiveSource> response, then it will change the input to the
internal. This CL handles this issue also.

Bug: 16803105
Change-Id: I5179561775b186b486fc3f2a042e759fcb07451b
/frameworks/base/services/core/java/com/android/server/hdmi/HdmiCecLocalDevicePlayback.java
2849b7ccd1cf973f862dd9b95355afbc9ca9268b 07-Aug-2014 Yuncheol Heo <ycheo@google.com> Go to nap when receiving <Active Source> for the other devices.

- Previously, it went to sleep when it got <Active Source>, but this
causes the other side-effects like can't-wake-up when changing to HDMI
port directly.

Bug: 15578870
Change-Id: I0ca5bd2372c9e5e7446592d66483900eeba75500
/frameworks/base/services/core/java/com/android/server/hdmi/HdmiCecLocalDevicePlayback.java
61f4fbd2e8436a1ecd478c2a1f516d064a24d43b 06-Aug-2014 Jungshik Jang <jayjang@google.com> Rename HdmiCecDeviceInfo into HdmiDeviceInfo.

In order to include mhl device info to device info,
rename HdmiCecDeviceInfo into HdmiDeviceInfo.

BUG: 16215362

Change-Id: I30fb0216061fbbdd6fdc1b82c63af83f1b678597
/frameworks/base/services/core/java/com/android/server/hdmi/HdmiCecLocalDevicePlayback.java
fc44e4e03c5f6486efb7457965dcf7eaf36bc971 04-Aug-2014 Yuncheol Heo <ycheo@google.com> Let STB oneTouchPlay on SCREEN_ON event.

- Eleborate the reason code to initiate the initialization.

Bug: 16668375
Change-Id: I4ce657a9438e4f7baa7df2eaa102eb1ce1a7bccb
/frameworks/base/services/core/java/com/android/server/hdmi/HdmiCecLocalDevicePlayback.java
af2acf0447aff34450cde2bcfb35dff9cf631729 11-Jul-2014 Jinsuk Kim <jinsukkim@google.com> Keep preferred address for HdmiControlService

Uses SystemProperties to store/retrieve preferred logical address

Bug: 15843075
Bug: 15844858
Change-Id: Ie1304805cbec4e11ef4b44a5cceb108121c60581
/frameworks/base/services/core/java/com/android/server/hdmi/HdmiCecLocalDevicePlayback.java
a9f10629f4bc1a82761917645ff4d2b6d42e47b3 11-Jul-2014 Jungshik Jang <jayjang@google.com> Start address allocation when hdmi cec is re-enabled.

When a user turns hdmi cec on from system settings or other possible way,
hdmi control service should start over from logical address allocation.
As device discovery action from bootup is slightly different from
one from enabling hdmi cec, added additional params to all notification
method which is called when logical address allocation is done.

Bug: 16222082

Change-Id: Ib73be5f642646918b470d769dc563753c4ff48d3
/frameworks/base/services/core/java/com/android/server/hdmi/HdmiCecLocalDevicePlayback.java
4fc1d105fc279bf7df6c876e160672866bdad8e7 09-Jul-2014 Jungshik Jang <jayjang@google.com> Revamp disabling device in local device.

When a cec deivce turns into disabled mode such as power off, standby,
and cec feature disabled, cec service should execute cleanup tasks.
Including cleaning up all feature actions, each device should run
their own cleanup.
It should stop system audio mode and arc for tv, while it should
send inactive source for for playback device.
Along with this, to prevent stale feature action, added timeout
to local device so that if there is stale action, it enforce to
finish it.

Bug: 16118520

Change-Id: I5ce30ab0f4459b6e2834f8d31b6a7ff789b35d07
/frameworks/base/services/core/java/com/android/server/hdmi/HdmiCecLocalDevicePlayback.java
c0c20d0522d7756d80f011e7a54bf3b51c78df41 04-Jul-2014 Jinsuk Kim <jinsukkim@google.com> Removed class HdmiCec

Most of the constants in HdmiCec are internal use only. Moved them
to service, and dispersed the rest to other relevant classes.

Also moved HdmiCecMessage class to service as it doesn't need to be
open ouside the service.

Change-Id: I7b2ce3bf465330aa4d7fcd05f9aefa1e6c8b056a
/frameworks/base/services/core/java/com/android/server/hdmi/HdmiCecLocalDevicePlayback.java
38db629d897e9d7c8e31ce0a7e985981e3e12996 01-Jul-2014 Yuncheol Heo <ycheo@google.com> Handle the power state change.

- Add BrocastIntent listener to catch SCREEN_ON/OFF intents.
- Add callbacks onTransitionToStandBy(), onStandBy() in HdmiCecLocalDevice.java.
- When it gets the SCREEN_OFF intent, the state will be TRANSITION_TO_STANDBY,
then when there is no outstanding actions, the state will be STANDBY.
- When the state is STANDBY, the TV device will broadcast <StandBy>.
- When it gets the SCREEN_ON intent, the state will be TRANSITION_TO_ON,
then when the initialization is done, the state will be ON.
- When the state is ON and it receives <StandBy> CEC message, it will force
the system to go to sleep.
- When the state is STANDBY and it receives the cec messages to wake-up the
system, it will force the system to wake up from sleep.
- Manage the active source state for the playback device.

Change-Id: Ib473219a0b0deb5224df89386db5a83720000411
/frameworks/base/services/core/java/com/android/server/hdmi/HdmiCecLocalDevicePlayback.java
a5b7414970c85217e88015e78ecbc5ba093dead3 23-Jun-2014 Jungshik Jang <jayjang@google.com> Introduce @ServiceThreadOnly and @IothreadOnly to HdmiControlService

Many of hdmi service modules assumes that it runs on
service thread without any lock. But it's a bit
hard to distinguish whether a method runs on
service thread or not even though there is run-time
assertion (runOnServiceThread()) is top of method.
@ServiceThreadOnly interface documents that a method should
run on service thread while @IoThreadOnly documents
that a method should run on io thread.

Change-Id: Ia4a6a48675d2302fb2cb7a8a807fcf112da5d4e7
/frameworks/base/services/core/java/com/android/server/hdmi/HdmiCecLocalDevicePlayback.java
79c58a4b97f27ede6a1b680d2fece9c2a0edf7b7 16-Jun-2014 Jungshik Jang <jayjang@google.com> Rearrange ownership between Hdmi control modules.

Here is a list of changes on this. (R: rationale)
1. HdmiCecLocalDeviceTv takes over responsibilty of device info
management.
R: All devices infos are added or removed by only Tv's
device discovery and hot plug detection mecanism

2. Each HdmiCecLocalDevice manages FeatureAction and Cec
message cache.
R: There is no direct connection between actions that
are created in different device action. If there is
an same actions created from different local device,
they should be managed independently.

3. Active path and logical address is managed by
HdmiCecLocalDevice.
R: All device should know active path of current source.

4. All system audio & ARC features are handled by
HdmiCecLocalDeviceTv
R: In terms of ARC, theoretically, any device can be transmiter of
ARC but TV is the de facto device
On other hands, for system audio Tv is the recipeint
of request.

Change-Id: Iac9ff43fb41798ed4f94c61d23345fe5fe777fbb
/frameworks/base/services/core/java/com/android/server/hdmi/HdmiCecLocalDevicePlayback.java
3ee65720e91c7f92ad5a034d7052122a606aa8d5 03-Jun-2014 Jungshik Jang <jayjang@google.com> Refactor HdmiCecLocalDevice and logical address allocation logic.

1. Factor out logical allocation logic to HdmiControlService.
2. Contains a reference to HdmiControlService rather than
HdmiCecController so that it enables to access service's logic
directly.
3. Move launch device discovery logic to HdmiCecLocalDeviceTv.

Change-Id: Ic97b4d51311a3c18f6d586c2245cac410cbd370e
/frameworks/base/services/core/java/com/android/server/hdmi/HdmiCecLocalDevicePlayback.java
8b308d93c8fdcc7304b33d9b445ae3807eae97c8 29-May-2014 Jungshik Jang <jayjang@google.com> Start Device Discovery after logical address allocation.

Usually TV initiates Device Discovery sequence after logical address
allocation of local devices. For that added new callback interface
to AddressAllocationCallback to HdmiCecDevice.
Along with this, add onAddressAllocated to HdmiLocalDevice so that
start sending local device information once logical allocation is done.

Change-Id: I4cdc5dd7770674a17a0f23c383a6c1ca221e3104
/frameworks/base/services/core/java/com/android/server/hdmi/HdmiCecLocalDevicePlayback.java
2918e9e133de8066ab497a5f8dac1c310c792767 20-May-2014 Jinsuk Kim <jinsukkim@google.com> CEC Initialization per device type

CEC initialization may vary from device type to type. Changed logical address
map to HdmiCecLocalDevice map to handle it. These per-type classes for local
device will be extended also to take care of incoming CEC commands that should
require different action based on device type.

Change-Id: Ia59a464607b14e942fcf83e63aa1d6310ca6a575
/frameworks/base/services/core/java/com/android/server/hdmi/HdmiCecLocalDevicePlayback.java