71 Commits

Author SHA1 Message Date
Jinsuk Kim
4bdcd299da am 55dab4dd: am b11f250e: Merge "Delegate HdmiCecService method impl to HdmiCecDevice subclass" into klp-modular-dev
* commit '55dab4dd3b5b56ade91c012d688b581b6cbdebdf':
  Delegate HdmiCecService method impl to HdmiCecDevice subclass
2014-04-11 09:43:37 +00:00
Jinsuk Kim
55dab4dd3b am b11f250e: Merge "Delegate HdmiCecService method impl to HdmiCecDevice subclass" into klp-modular-dev
* commit 'b11f250e09195d1ab250c93bfed0b31ed3a40f3d':
  Delegate HdmiCecService method impl to HdmiCecDevice subclass
2014-04-11 09:40:46 +00:00
Jinsuk Kim
b11f250e09 Merge "Delegate HdmiCecService method impl to HdmiCecDevice subclass" into klp-modular-dev 2014-04-11 09:38:23 +00:00
Jinsuk Kim
61791075f4 Delegate HdmiCecService method impl to HdmiCecDevice subclass
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
2014-04-11 18:35:01 +09:00
Jeff Brown
4e5c089ef3 resolved conflicts for merge of 337e764d to master
Change-Id: I8168dbf42b68c2f7b5ccb300e0080dddc627af26
2014-04-11 01:33:20 -07:00
Jeff Brown
337e764deb am f24687e2: Merge "Plumb display power state through display manager." into klp-modular-dev
* commit 'f24687e2731811fd0e3803b691fd47a659f89329':
  Plumb display power state through display manager.
2014-04-11 03:49:37 +00:00
Jeff Brown
037c33eae7 Plumb display power state through display manager.
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
2014-04-10 20:46:14 -07:00
Michael Wright
118d113478 Merge "Fix size_t format specifier" 2014-04-04 23:51:36 +00:00
Ruchi Kandoi
654d75fec9 PowerManager: Fix build
fix build breaks by commit 667372e39bfe01bd15f0803d51ef0e9816f18808

Change-Id: I9e6e0f9146f860d27337cef0551c686ba2d60e23
2014-04-04 16:34:56 -07:00
Michael Wright
9ecba5269b Fix size_t format specifier
Change-Id: I7d4ce5e0c7bb4d9e0cc19edf68f30f6b2b054bc7
2014-04-04 15:29:53 -07:00
Leon Scroggins
7716b7d8ef Merge "Update to call new Skia APIs." 2014-04-04 20:31:00 +00:00
Ruchi Kandoi
f20a5eb279 PowerManager: add powerHint method
Add powerHint method to IPowerManager for passing power hints from other
processes.

Change-Id: Ic596ace2ed1796a6da4cddb2163dcc4536115e55
2014-04-04 20:24:16 +00:00
Leon Scroggins
cc11f15f76 Update to call new Skia APIs.
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
2014-04-04 14:42:39 -04:00
Jinsuk Kim
f602835987 am f2fe3505: am 31518f74: Merge "Use build property for CEC device OSD name" into klp-modular-dev
* commit 'f2fe3505dac16dfa990fbab56713abab6ba0bc54':
  Use build property for CEC device OSD name
2014-04-03 02:11:40 +00:00
Jinsuk Kim
f2fe3505da am 31518f74: Merge "Use build property for CEC device OSD name" into klp-modular-dev
* commit '31518f745ffa5e832274c332ac957a065948fdaf':
  Use build property for CEC device OSD name
2014-04-03 00:39:23 +00:00
Jinsuk Kim
60b17cc094 Use build property for CEC device OSD name
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
2014-04-03 07:59:27 +09:00
Jinsuk Kim
00bc283453 am 2e59bd78: am 41eaa32c: Merge "Replace individual methods with a consolidated CEC nativeSendmessage" into klp-modular-dev
* commit '2e59bd788546e29e48b85bda72da6af61704113d':
  Replace individual methods with a consolidated CEC nativeSendmessage
2014-03-31 01:50:56 +00:00
Jinsuk Kim
2e59bd7885 am 41eaa32c: Merge "Replace individual methods with a consolidated CEC nativeSendmessage" into klp-modular-dev
* commit '41eaa32c100d8a903daa7b7d09d34887a3e45ffd':
  Replace individual methods with a consolidated CEC nativeSendmessage
2014-03-31 01:44:51 +00:00
Narayan Kamath
ecd072161e resolved conflicts for merge of 22d07464 to master
Change-Id: Ic037261eedd6e224938c960d2b4597590c81ed9d
2014-03-27 14:22:47 +00:00
Narayan Kamath
22d074643e resolved conflicts for merge of eaab4df0 to klp-modular-dev-plus-aosp
Change-Id: I871431e5a3ce45a33563ced845e044d37471689b
2014-03-27 12:50:58 +00:00
Jinsuk Kim
40a00a341b Replace individual methods with a consolidated CEC nativeSendmessage
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/437667
   https://googleplex-android-review.git.corp.google.com/#/c/437668

Change-Id: Id1ac683fe54597a2c707f30492c7f86e5392504d
2014-03-27 07:59:31 +09:00
Dianne Hackborn
a1bd79268b Battery stats: track actually running time
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
2014-03-21 16:14:59 -07:00
Colin Cross
a42cb8b0e2 resolved conflicts for merge of a67e34c8 to master
Change-Id: I597525886260884c9b2dfc7945e01eb8138a58c2
2014-03-21 13:11:02 -07:00
Jinsuk Kim
f2fecf48f7 am c61f4dd7: Merge "Add HDMI-CEC service" into klp-modular-dev
* commit 'c61f4dd744b1b0396703aa58eb22fc31d2b7050e':
  Add HDMI-CEC service
2014-03-21 02:37:00 +00:00
Jinsuk Kim
c61f4dd744 Merge "Add HDMI-CEC service" into klp-modular-dev 2014-03-21 02:32:38 +00:00
Jinsuk Kim
4f512fb451 Add HDMI-CEC service
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
2014-03-20 16:40:22 +09:00
Chad Brubaker
4b59883afd am 7c2b1625: am 78f204ae: am 8e240af5: Merge "Remove SO_BINDTODEVICE from VPN protect" into klp-dev
* commit '7c2b1625d66d3c80c313160f78c8bccd9499539e':
  Remove SO_BINDTODEVICE from VPN protect
2014-03-14 16:32:18 +00:00
Chad Brubaker
7c2b1625d6 am 78f204ae: am 8e240af5: Merge "Remove SO_BINDTODEVICE from VPN protect" into klp-dev
* commit '78f204aed8c0f3c8174616801d66f96a9a00a5fd':
  Remove SO_BINDTODEVICE from VPN protect
2014-03-14 16:27:58 +00:00
RoboErik
306c46884e am ca9eef62: b/12068020 Make kb layouts only unique to vendor/product. Do not merge
* commit 'ca9eef6203b7cfb0084f8305d4dcc5d70a7a25cd':
  b/12068020 Make kb layouts only unique to vendor/product. Do not merge
2014-03-12 21:12:26 +00:00
RoboErik
ca9eef6203 b/12068020 Make kb layouts only unique to vendor/product. Do not merge
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
2014-03-12 13:21:08 -07:00
Jason Gerecke
d522074232 Support unique calibration per orientation
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
2014-03-10 16:33:48 -07:00
Jason Gerecke
857aa7be88 Initialize mAffineTransform and update on modification
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
2014-03-10 15:54:21 -07:00
Dianne Hackborn
c51cf03cf2 Start recording wakeup reasons in battery history.
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
2014-03-07 15:18:45 -08:00
Chad Brubaker
f87b224849 Merge "Remove SO_BINDTODEVICE from VPN protect" 2014-02-28 19:28:45 +00:00
Derek Sollenberger
4915fb22c7 Merge "Cleanup unnecessary includes for libskia." 2014-02-27 18:09:31 +00:00
Mike Lockwood
7531aa2235 Add support for USB devices with multiple configurations and alternate interfaces
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
2014-02-27 09:59:02 -08:00
Derek Sollenberger
950fe8f8d4 Cleanup unnecessary includes for libskia.
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
2014-02-27 16:21:24 +00:00
Greg Hackmann
4418372b21 am 5f652b9f: am 0cab896a: resolved conflicts for merge of 9e413bf4 to klp-modular-dev-plus-aosp
* commit '5f652b9fdfbcc279353955f7ef86b72d2ef9f5fb':
  open("/dev/rtc0") failure in AlarmManagerService.setTime() should be non-fatal
  Move time setting code from SystemClock to AlarmManagerService
2014-02-22 00:46:52 +00:00
Greg Hackmann
0cab896a98 resolved conflicts for merge of 9e413bf4 to klp-modular-dev-plus-aosp
Change-Id: Ibc41f0248235afca9546829e00b31003d09f4f7e
2014-02-21 16:35:52 -08:00
Ashok Bhat
17ab38f8a8 AArch64: Make AssetAtlasService 64-bit compatible
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
2014-02-21 13:02:34 +00:00
Jeff Brown
10102e4c0e resolved conflicts for merge of baaa080b to master
Change-Id: I3ee12321e298f7a2ea577a99f30c49f3bb497fae
2014-02-20 18:05:03 -08:00
Jeff Brown
90506a41c6 am 07e6d1b9: Merge "Add a new "doze mode" based on Dream components." into klp-modular-dev
* commit '07e6d1b9a5f81ff5a5bf91f2b260ee487d5f2b65':
  Add a new "doze mode" based on Dream components.
2014-02-20 21:47:08 +00:00
Jeff Brown
2687550272 Add a new "doze mode" based on Dream components.
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
2014-02-20 13:39:13 -08:00
Narayan Kamath
520a5673fb am b152473f: am 9fce8535: Merge "AArch64: Make AssetAtlasService 64-bit compatible"
* commit 'b152473f46d8176e7eb2c55b54342a7a29c525cf':
  AArch64: Make AssetAtlasService 64-bit compatible
2014-02-20 13:02:21 +00:00
Jeff Sharkey
e62c4a10cb am ab528077: am 37d894a4: am 660a514e: am 60097a9c: Merge "Structure device not freed in error case"
* commit 'ab5280776f40c473228d3e920771a41289ed7fee':
  Structure device not freed in error case
2014-02-18 17:26:17 +00:00
Jeff Sharkey
37d894a42b am 660a514e: am 60097a9c: Merge "Structure device not freed in error case"
* commit '660a514e80e0019d8c6632e84bd03491722fc2ab':
  Structure device not freed in error case
2014-02-18 17:19:38 +00:00
Chad Brubaker
bcf12b302c Remove SO_BINDTODEVICE from VPN protect
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
2014-02-13 18:19:43 -08:00
Andreas Huber
d430354c6b Merge "Revert "Split AndroidRuntime into AndroidRuntimeBase base-class and the rest."" 2014-02-13 17:22:49 +00:00
Andreas Huber
9ae000ca8c Revert "Split AndroidRuntime into AndroidRuntimeBase base-class and the rest."
This reverts commit 7825334929b098b36e1144872200e75ba6d24b13.

Change-Id: I1702eb3ff9d7192d64039c8bf4bc3fc5d8e458c4
2014-02-13 17:22:33 +00:00
Andreas Huber
04f0cab79d Merge "Split AndroidRuntime into AndroidRuntimeBase base-class and the rest." 2014-02-13 16:35:03 +00:00