Currently, the native canvas is accessed/manipulated from several
unrelated classes.
In order to facilitate SaveFlags emulation, this CL encapsulates
the field and refactors its external users.
Two main changes:
* new getNativeCanvas() getter for use in Java-level clients.
* JNI canvas swappers (GraphicsBuffers, Surface, TextureView &
AssetAtlasService) are refactored based on the exising/equivalent
safeCanvasSwap() Canvas method.
Change-Id: I966bd4898f0838fb3699e226d3d3d51e0224ea97
HAL interface for CEC has more apis that haven't
connected with HdmiCecController.
Here is a list of apis.
1. addLogicalAddress
2. clearLogicalAddress
3. getPhysicalAddress
4. getVersion
5. getVendorId
Verified that it does not affect to other components in nakasi
Change-Id: I535bde47c43dd25bbede002c0a2aefbe86779076
This change includes native jni implementation for
incoming and outgoing message of CEC.
For incoming message, native layer converts it into three
pieces, source address (initiator), destination address (follower)
and data body which includes opcode. In Java layer, it is delegated to
main io thread. For now all messages are rejected by sending <Feature Abort>
to initiator.
For outoging message, all messages are sent to io thread and it delegates
it into native layer. Native logic converts it into cec_message and
pass it to HAL so that HAL performs sending message.
In order to handle <Feature Abort> message, added [Abort reason] which is
defined in hdmi_cec.h.
Change-Id: If9fd74745f476105e5cfae964e39c78bae69d3e2
This consolidates all of the information that was in the native
KeyEvent and the KeyLayout files into the managed KeyEvent class.
It also moves the definition for all of the key names to the native
side, rather than having them in both places.
Change-Id: I172e3b554e7eb52c79ae2ec406ef4332e8b25ffa
HdmiCecService is a system service handling HDMI-CEC features
and command. Recently we found out that industry has more
requirements to support HDMI-CEC. Also, MHL is another
standard should be in our pocket. Basically, MHL is
a standard to support communication between mobile device
and TV or Av device. As CEC is a control standard over HDMI
cable, MHL has control channel for peer device.
There behavior is very similiar. Both have commands that
can change Tv's current input and can send/receive key
to other device to control other deivce or TV.
In order to cover both CEC and MHL, current HdmiCecService
implementation has limitation. We had several
session of discussion and decided to refactor
HdmiCecService into HdmiControlService.
For each standard it will have separate controller instance
like HdmiCecController and HdmiMhlController.
In this change I didn't touch original HdmiCecService
because some component, like cast receiver, uses HdmiCecService.
For a while we will keep HdmiCecService until HdmiControlService
accomodates all features of HdmiCecService.
Change-Id: I5485280ab803dbf071d898bfbe34be0b11ce7958
Logical address logic is independent from hardware, and the algorithm is
standardized in the spec. Moved the logic to service so that all HAL
implementations doesn't have to duplicated logic inside.
Related change in HAL definition is in:
https://googleplex-android-review.git.corp.google.com/#/c/447951/
Change-Id: I9699309719f3214fc2dbdf219faad484c0c1c5bf
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