144 Commits

Author SHA1 Message Date
Jeff Brown
3af3926749 Merge "Fix HDMI hotplug display blanking behavior." into klp-modular-dev 2014-04-23 01:20:01 +00:00
Jeff Brown
44b1f76474 Fix HDMI hotplug display blanking behavior.
Bug: 14109146
Change-Id: Ie7de4fb05da210e8c74c795f7896cf9951701aeb
2014-04-22 18:07:24 -07:00
Ying Wang
b081a59a0f Javac (at least for 1.7.0_51 on Mac) wants fully qualified class name
It looks like a Javac bug.

Bug: 14255510
Change-Id: Id3899994226049ff77854fd2a13a6d1b687a0392
2014-04-22 15:20:16 -07:00
Craig Mautner
6985badc63 Fix black ActivityView
Don't add the surface to the VirtualDisplay until the activity
has drawn. That will keep the TextureView from turning black.

Fixes bug 12821632.

Change-Id: Ia06e9f91be3e14ad724f735ae4e201ac798863a2
2014-04-21 15:28:43 -07:00
Craig Mautner
f4c909bcb8 Fix ActivityView lifecycle
Major changes to maintain the VirtualDisplay across repeated
attach/detach cycles of an ActivityView. This keeps the activities
and VirtualDisplays in the ActivityView from getting into bad states.

Fixes bug 14107002.

Change-Id: Idc2aaf85ac496eab0eeb436736cb10a2020040e8
2014-04-21 15:28:42 -07:00
Jeff Brown
92207df753 Add support for dynamically setting the virtual display surface.
Previously, the surface that backs a virtual display had to be set
at the time when the display was created.  This change now makes
it possible to set or remove the surface later.  The virtual display
is treated as if it were "off" while no surface is attached to it.

Change-Id: Ib4fdbbb8b4ee79f0fb9ceb648f9bda4a8fa6a2ca
2014-04-16 18:45:05 -07:00
Craig Mautner
e3a00d745f Fix ActivityContainer callback parcelling.
The Binder interface for passing a callback was not implemented
properly. Also the callback for ActivityContainer now has a new
API.

Change-Id: I6b719be0cb57542f022a3cc14e8f4efde60b1a50
2014-04-16 13:03:26 -07:00
Christopher Lane
b72d8b4091 Add support for custom TXT records in NSD
Change-Id: I8e6dc9852ad4d273c71ad6a63a7fbd28a206806d
2014-04-14 14:10:36 -07:00
Jeff Brown
d912e1f6a1 Use the display's actual state in the view hierarchy.
Previously, the view hierarchy would suppress drawing whenever the
PowerManager.isScreenOn() method returned false.  However, this method
really describes the interactive state of the device rather than the
actual display state.  This is especially a problem when there are
multiple displays but it also breaks drawing while in doze mode.

This change makes the view hierarchy consider the actual state of the
display instead on an individual basis.

Bug: 13133142
Change-Id: I69870b6b14a3504607a30562aa48c3452f777c1f
2014-04-11 18:46:22 -07: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
f24687e273 Merge "Plumb display power state through display manager." into klp-modular-dev 2014-04-11 03:47:08 +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
Jesse Gunsch
8d31358fb4 Merge "Merge "NsdService does not clean up after exiting clients"" into klp-modular-dev 2014-04-09 18:09:03 +00:00
Jeff Brown
13014b5fe5 Move certain internal activity manager methods to new class.
This is a little bit of refactoring in preparation for changing how
the power manager notifies system components about changes in power
state.

Deleted the startRunning method since it is no longer useful.

Bug: 13133142
Change-Id: I7f845c61ecc7ee890154ed0cbd90795de609b7ea
2014-04-08 20:51:07 -07:00
Jeff Brown
ad9ef191f5 Move display power controller to display manager service. (DO NOT MERGE)
This refactoring is in preparation for enabling the display manager
to have more control over the blanking state of individual displays.
There are no functional changes.  Some bits will be cleaned up in
a subsequent patch.

Bug: 13133142
Change-Id: Ib811835e8757449c7899ac61807029baaf998161
2014-04-08 20:41:46 -07:00
Dave Platt
8e5df442cd Merge "NsdService does not clean up after exiting clients" 2014-04-08 17:35:57 -07:00
John Spurlock
6c191299a7 Introduce new UI_MODE_TYPE_WATCH and qualifier.
Default ui mode to watch if we have FEATURE_WATCH.

Bug:13395758
Change-Id: Ie5ff95de60e69e91ad3612c7d2f1fca7f49061bd
2014-04-04 15:21:53 -04: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
b1dca1624d Merge "Maintain display power status for playback device" into klp-modular-dev 2014-04-02 22:39:41 +00:00
Jinsuk Kim
4e90fcd190 Maintain display power status for playback device
With this CL, the power status of TV/display is keep tracked of
by hdmi cec server part, specfically HdmiCecDevicePlayback.
Turned the HdmiCecDevice to abstract class from which classes of
concrete device type(HdmiCecDevicePlayback, HdmiCecDeviceTV) are
inherited. The display power status code is put in HdmiCecDevicePlayback
only. HdmiCecDeviceTv will have its own logic that manages power status of
devices connected to it. For now it only has a bare minimum code.
Will be worked on in follow up CLs.

Other changes:

    - Replaced sendGiveDevicePowerStatus() with isTvOn() so that the status
      can be queried by clients.

    - Defensively check the availability of HdmiCecService so that
      HdmiCecManager.getClient() returns null in case the service couldn't
      be initialized. This ensures clients of the service gets the nulled-out
      HdmiCecClient when called in the state/configuration where the service
      is not available, thus proceed accordingly.

Change-Id: Idaf69e73cfbd639c0b40b1bd4b6146f011246180
2014-04-02 14:46:14 +09:00
Michael Kolb
39a6db7cd5 Add circular anti-aliasing mask to circular display
Bug: 13635645

  Add a 2 px wide anti-aliased circle as a Layer to WindowManagerService

Change-Id: Ic8d319ca43c222f5b2e69af896749b8f2018ce3e
2014-04-01 15:28:01 -07:00
Jinsuk Kim
41eaa32c10 Merge "Replace individual methods with a consolidated CEC nativeSendmessage" into klp-modular-dev 2014-03-31 01:40:30 +00:00
Adam Hampson
594c73fc57 Merge "hdmi: cec: add permission name to dump permission denial message" into klp-modular-dev 2014-03-28 22:22:52 +00:00
John Spurlock
5579ec33eb DO NOT MERGE Enhance the NotificationListenerService api.
Add to NotificationListenerService:
 - getActiveNotificationKeys() : String[]
 - getActiveNotifications(String[] keys) : StatusBarNotification[]
 - cancelNotifications(String[] keys) : void
 - onListenerConnected(String[] keys) : void

Add to StatusBarNotification:
 - getKey() : String

Bug:13562828
Change-Id: I9da222cb4af22864bc0ecdecc3f121bced0723d6
2014-03-28 10:19:00 -04:00
Adam Hampson
25b32c65e7 hdmi: cec: add permission name to dump permission denial message
The android.security.cts.ServicePermissionsTest--testDumpProtected test was
failing on this service because it is looking for the permission name in the
denial message.

Change-Id: I4b4d38cd27b782470d1f21e36104164d2c8962a3
Signed-off-by: Adam Hampson <ahampson@google.com>
2014-03-27 14:20:23 -07:00
Craig Mautner
bffd4d437d Merge "Check return values for null." into klp-modular-dev 2014-03-27 20:22:20 +00:00
Craig Mautner
d3849f5415 Check return values for null.
When a Display has been removed there is a delay until all of its
windows have been removed. Therefore there is a possibility that
WindowState.getDisplayContent() returns null. Guard against that
possibility.

Fixes bug 13616765.

Change-Id: Ia2074d293b0e1bd4ca2cd14aeb4a2cc09ed9f41e
2014-03-27 13:19:29 -07:00
Adam Lesinski
e824026554 Fix a race in NotificationManager with Listeners
After being bound to, a NotificationListenerService could
make a call into NotificationManagerService before having been
added to the list of active services.

Bug: 13644375
Change-Id: I4ed920d165f46d009f91e28ca13c3926563cd110
2014-03-26 17:52:54 -07: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
Craig Mautner
79e6578b6c Defer removal of activity until animation complete.
Do not remove an AppWindowToken or its Task if it is running an
animation. Doing so leaves windows orphaned and bad things happen
when the system tries to retrieve the task assoicated with the
windows during layout.

Fixes the ugly output associated with bug 13440426.

Change-Id: I9d5fc50a7cb6189160d51cee3c82f7813baee715
2014-03-25 16:48:47 -07:00
Craig Mautner
f32b22e9c7 resolved conflicts for merge of ca903d38 to klp-modular-dev
Change-Id: I44b8cbeb9ae9f6e5c8b2fe1363127d6eccfdf041
2014-03-25 11:05:08 -07:00
Adam Lesinski
415e6f8ed4 Merge "Fix issue with early service start" into klp-modular-dev 2014-03-25 17:22:11 +00:00
Matthew Williams
c798e4f549 am 4701b51a: am bb87ac7f: DO NOT MERGE: Downgrade expedited to normal on reschedule.
* commit '4701b51af216ce2b6fa9fa508ebba47bf13063c7':
  DO NOT MERGE: Downgrade expedited to normal on reschedule.
2014-03-25 09:57:36 +00:00
Adam Lesinski
a6db4ab619 Fix issue with early service start
NotificationListener services would start too early
and crash due to system_server not being ready.

Bug: 13439345
Change-Id: I86ee93b50d016bfa0119e21a8cde8635212b16a4
2014-03-24 12:39:47 -07:00
John Spurlock
cf44a124ab Unhide Notification kind, rename to category.
Change-Id: I8e6d5a30dff519d7ed4f38e018646dd2bc55db33
2014-03-24 11:02:36 -04:00
Jinsuk Kim
c01e1aeb0d Merge "Add HdmiCecManager" into klp-modular-dev 2014-03-23 23:24:44 +00:00
Jinsuk Kim
fbcd503645 Add HdmiCecManager
Introduces HdmiCecManager/HdmiCecClient to provide apps/system components
with the way to access HdmiCecService via Context.getSystemService(HDMI_CEC_SERVICE).

Change-Id: I39da071a328074a4b7b049947943688bd7779c26
2014-03-24 08:19:39 +09:00
Chad Brubaker
850eb678d7 am eb3c0d9a: am 1aad3ad4: Merge "Fix support for simultaneous VPN tuns" into klp-dev
* commit 'eb3c0d9ac387bb0aea5b4956daac1403253bc76d':
  Fix support for simultaneous VPN tuns
2014-03-21 21:02:47 +00:00
Chad Brubaker
c772614714 am 1fce89d9: am de4e7b49: Merge "Include the interface for clearDnsInterfaceForUidRange" into klp-dev
* commit '1fce89d946760a1bcf3a733f55494f963eab00c2':
  Include the interface for clearDnsInterfaceForUidRange
2014-03-21 21:02:43 +00:00
Jinsuk Kim
d73e66cce1 Fix broken build
Change-Id: Ia7d207f7937e29cf48dce30d8c5a91f50c9e7d4c
2014-03-21 12:30:59 +09: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
Jim Miller
bd33dc01f6 am 8e69abf8: am 46e63117: DO NOT MERGE - Fix memory leak caused by mismatched linkToDeath() in WindowManagerService
* commit '8e69abf8c62452e6e9bcd254a55a2d80c8ef5b3d':
  DO NOT MERGE - Fix memory leak caused by mismatched linkToDeath() in WindowManagerService
2014-03-20 02:47:09 +00:00
Robert Greenwalt
42b746e4d8 am bd84f01c: am 5d3d4ee3: Merge "Handle provisioning APN by turning off/on data." into klp-dev
* commit 'bd84f01c6ce122ab58fc7c5b687dc8bfb0fb03e6':
  Handle provisioning APN by turning off/on data.
2014-03-19 19:08:44 +00:00
Doug Zongker
cdf0088839 add option to shutdown after factory reset
Add a new hidden method to recovery system to trigger a factory reset
followed by a shutdown, rather than a reboot back to the regular
system.  Use this flag when the MASTER_CLEAR intent is broadcast with
a boolean extra "shutdown" set to true.

Change-Id: I2ceb25b715d9f0ef492a75b3d287d1e17cec89ef
2014-03-18 12:52:04 -07:00
Tim Kilbourn
0722968c59 FEATURE_LEANBACK implies that the device is a tv.
For managing the ui mode, consider the device to be a television if it
has either the FEATURE_TELEVISION or FEATURE_LEANBACK system features.

When leanback is available for non-television devices, we need to
reconsider the use of these features for setting the television ui mode.

Change-Id: I7b82372ce19067e010be9b42111816bab186f95b
2014-03-14 13:44:12 -07:00
JP Abgrall
4f26139661 am 4ecd833e: am 7baa7c80: Merge "ConnectivityService: add support to set TCP initial rwnd" into klp-dev
* commit '4ecd833ee35d1120f8c1ae52367947cacfc263a4':
  ConnectivityService: add support to set TCP initial rwnd
2014-03-14 16:28:09 +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
Dianne Hackborn
d4981014d4 am e5191aab: am a796168d: Merge "Fix issue #11965706: Calls using IntentChooser are now Broken in 4.3 and 4.4" into klp-dev
* commit 'e5191aabff5b9b751349b8634836a858af744905':
  Fix issue #11965706: Calls using IntentChooser are now Broken in 4.3 and 4.4
2014-03-14 16:27:40 +00:00