Most of the methods in the interface IHdmiCecService should be implemented
based on the device type. This CL makes a change such that the HdmiCecDevice
just has stub methods that should be overriden by subclasses.
Other changes:
- Fixed a bug of <Inactive Source> not sending its physical address
in its message body. Also the command should have been sent to TV
only rather than broadcast.
- Put back sendGiveDevicePowerStatus interface method. It allows the client
to keep track of the other device(like TV) power status more closely.
Devices goes through the status from standby -> transient to on -> on
but the CEC spec doesn't require that they broacast it actively.
The restored method can be used to let the playback device to get
up-to-date power status of TV/display when it is booting up.
This method should work the same across all the device types. So it was
implemented in the service, not delegated to HdmiCecDevice.
- Send <Report Physical Address> when a new logical device is registered,
which is required by CEC spec: "it should report the association between
its logical and physical address by broadcasting <Report Physical
Address>
Change-Id: Iac1d2cf5783d947f2dcd6965a54670fbdb8e6a63
Declare a new method, Display.getState() to retrieve the actual
power state of a display.
Improved documentation for Intent.ACTION_SCREEN_ON and
Intent.ACTION_SCREEN_OFF to clarify what they really mean in
terms of the interactive state of the device.
Deprecated PowerManager.isScreenOn() and replaced it with
PowerManager.isInteractive() with a more suggestive name and
better documentation.
Redirect display power state changes to go through the display
manager first and only then head over to the power manager for
legacy compatibility.
Eliminated the bright here and woke here policy flags since they
were unused. Simplified the input dispatch policy somewhat.
Ensure that screen wake locks are respected up until the point
when dozing really begins.
Fixed a regression in DreamService where onDreamingStarted
might be called before onWindowAttached.
Bug: 13133142
Bug: 13472578
Bug: 13929355
Bug: 13760290
Change-Id: Iabef96921dd554ce3768fb18619cefc3230b5fb0
I816129d49c0118453222916f3c818eccac33663d merges a new version of
Skia that updates various APIs. Call the new ones.
SkBitmap::copyTo now takes an SkColorType instead of an
SkBitmap::Config, so do the conversion with
SkBitmapConfigToColorType or use the enum when it makes sense.
Call SkImageDecoder::decodeSubset instead of (deprecated)
SkImageDecoder::decodeRegion.
Override SkCanvas::ClipVisitor::clipRRect in ClipCopier.
In Canvas::clip calls, call SkCanvas::isClipEmpty(), which was
previously called inside the clip call, to determine the return value.
For various SkPaint effects, call the new factories (as the constructors
have been made protected).
Implement SkJavaOutputStream::bytesWritten(), overriding a new pure
virtual function on SkWStream.
Update Matrix calls to always return true (since SkMatrix calls no
longer return a value).
Depends on I816129d49c0118453222916f3c818eccac33663d (skia).
Change-Id: I5cdcea827ebff587df0bbddc0965e3e0fbf48002
Previously OSD name was based on device type. This CL makes it
independent of device type. CEC spec says "A device that implements
more than one type of CEC functionality should respond with the same
OSD name for each logical address. It is recommended that the name
refers to the complete physical product rather than the individual
CEC functionality".
Now the default name comes from system build property. I removed
setOsdName() from aidl for now since it won't be in use.
Change-Id: I3c9fb877fad4bc5efef56268d155a3f37a865fc2
It saves us from having to add numerous native methods to HdmiCecService.
A new native method that reports physical address was added in consequence
to be able to build the message in Java side.
Other changes:
- Substituted more concrete type (cec_device_type_t) to int.
- Fixed the issue about byte endianness in handling physical
address/vendor id. The bytes of variable mPhysicalAddress in native
service were being reversed previously but still worked because they
were reversed again when copied out to outgoing messages. Vendor id
had a bug of bytes being reversed. In order to fix the issue, the way
they are copied to byte array was changed so that it becomes
independent to byte endianness.
- CL's for header/HAL implementation changes are:
https://googleplex-android-review.git.corp.google.com/#/c/437667https://googleplex-android-review.git.corp.google.com/#/c/437668
Change-Id: Id1ac683fe54597a2c707f30492c7f86e5392504d
Use the uptime while creating the battery stats history to
generate a new event indicating when the CPU is actually running.
We can do this in combination with the new event reporting when
the CPU comes awake, looking at the difference between the
uptime and elapsed time at that point to determine when it last
when to sleep.
Also use this information to generate a new set of aggregated
states, the uptime caused by each wake reason.
Finally use new radio down timestamp to adjust the times we
compute for radio use. Note that this information is not (yet)
being used to adjust how these are recorded in the history.
Change-Id: I723b3b526c8e7d64de0cac9d1193e04132d5a3e4
This CL adds a system service handling HDMI-CEC protocol. The service
is equipped with the capability sending/receiving HDMI-CEC messages
Not all the messages are in place. Currently it has messages to support
a few features only, as follows:
- One touch play
- System information
- Routing control (partially - active source status maintenance only)
- Device OSD transfer
- Power status
It will be extended to cover the wider usages in the follow up CLs.
The CEC standard version referenced in the implementation is 1.3a.
Change-Id: Ifed0b02f52ebf098eddb3bd0987efbf353b7e8fe
This is a cherry-pick of https://googleplex-android-review.git.corp.google.com/#/c/399886/
Instead of storing a kb layout per device descriptor (which is expected
to be unique), store it for each vendor/product. This way we can keep
a consistent layout between identical but physically different keyboards.
There are some corner cases this is expected to fail on, namely devices
that incorrectly have the same vendor/product id. Devices that don't
define a vendor/product id will continue to use the descriptor to store
layout files.
Change-Id: I1f2508561992080459310d5a644dad65a9c24f1a
Updates the format of the calibration XML to store the Surface rotation
that a specific calibration applies to. Also updates the API to require
a rotation value for get/set, and has the native framework supply this
according to the current rotation whenever it changes.
Change-Id: I72b6703f646dd18db537365c5c9843f720a5f41e
This patch causes the InputReader to update its mAffineTransform to reflect
the currently-set calibration on startup and whenever its value is changed
through the InputManagerService.
Change-Id: I81c76e8cf168728ee140abaf148e1cd31687d5af
Depends on a modification to libsuspend so that we can get
a callback each time the device wakes up, to read the current
wakeup reasons from the kernel. These are then stuffed in
to a new field in the battery history.
Also add new dump options --history-start and --charged
to better control what is dumped.
Finally the alarm manager uses a "*walarm*" tag for history
item wake locks that are coming from a wakeup alarm.
Change-Id: I457571973d5b2b5fdc4e4b63ab16275db20d7edd
Added UsbConfiguration class, as well as accessors to UsbDevice to get configuration list
Added methods to UsbDeviceConnection to select configurations and alternate interfaces.
Also added accessors for USB descriptor name strings and fixed some memory leaks in the JNI code.
Bug: 12425052
Change-Id: Idb990f4d5c054a8cb997eb3f440f6da9f83bce05
The libskia target exports all of its public includes directories so
redefining them here is redundant. Also this cleans up and makes it
obvious where the framework is making using of private Skia headers.
Change-Id: Ie7ecc9ddd3df780bed6b9af54ba58ca58274e043
* commit '5f652b9fdfbcc279353955f7ef86b72d2ef9f5fb':
open("/dev/rtc0") failure in AlarmManagerService.setTime() should be non-fatal
Move time setting code from SystemClock to AlarmManagerService
Changes in this patch include
[x] Long(64-bit) is used to store native pointers in
AssetAtlasService and related classes as they can be 64-bit.
[x] Some minor changes have been done to conform with
standard JNI practice (e.g. use of jint instead of int
in JNI function prototypes)
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
(cherry-picked from 4de3f481bc59ab4b766dc027e41aff7cda9d62f7)
Change-Id: If22daf40eef46f8df9f94d65ddcc52c45b3acf2a
When a doze component has been specified in a config.xml resource
overlay, the power manager will try to start a preconfigured dream
whenever it would have otherwise gone to sleep and turned the
screen off. The dream should render whatever it intends to show
then call startDozing() to tell the power manager to put the display
into a low power "doze" state and allow the application processor
to be suspended. The dream may wake up periodically using the
alarm manager or other features to update the contents of the display.
Added several new config.xml resources related to dreams and dozing.
In particular for dozing there are two new resources that pertain to
decoupling auto-suspend mode and interactive mode from the display
state. This is a requirement to enable the application processor
and other components to be suspended while dozing. Most devices
do not support these features today.
Consolidated the power manager's NAPPING and DREAMING states into one
to simplify the logic. The NAPPING state was mostly superfluous
and simply indicated that the power manager should attempt to start
a new dream. This state is now tracked in the mSandmanSummoned field.
Added a new DOZING state which is analoguous to DREAMING. The normal
state transition is now: AWAKE -> DREAMING -> DOZING -> ASLEEP.
The PowerManager.goToSleep() method now enters the DOZING state instead
of immediately going to sleep.
While in the doze state, the screen remains on. However, we actually
tell the rest of the system that the screen is off. This is somewhat
unfortunate but much of the system makes inappropriate assumptions
about what it means for the screen to be on or off. In particular,
screen on is usually taken to indicate an interactive state where
the user is present but that's not at all true for dozing (and is
only sometimes true while dreaming). We will probably need to add
some more precise externally visible states at some point.
The DozeHardware interface encapsulates a generic microcontroller
interface to allow a doze dream for off-loading rendering or other
functions while dozing. If the device possesses an MCU HAL for dozing
then it is exposed to the DreamService here.
Removed a number of catch blocks in DreamService that caught Throwable
and attempted to cause the dream to finish itself. We actually just
want to let the process crash. Cleanup will happen automatically if
needed. Catching these exceptions results in mysterious undefined
behavior and broken dreams.
Bug: 12494706
Change-Id: Ie78336b37dde7250d1ce65b3d367879e3bfb2b8b
SO_BINDTODEVICE is not needed with policy routing.
SO_BINDTODEVICE was also used on the default iface which causes problems
when the default iface is IPv6 only and the socket tries to connect to a
IPv4 address.
Bug: 12940882
Change-Id: I5b2bde0ac5459433fc5749f509072a548532f730