181 Commits

Author SHA1 Message Date
Prashant Malani
42db3761c9 Merge "DO NOT MERGE Change display state modification during dozing" into klp-modular-dev 2014-06-05 23:03:19 +00:00
Prashant Malani
448a4e59ad DO NOT MERGE Change display state modification during dozing
Check that the BrightnessRamp animation has completed before updating
the display state to STATE_DOZING.

Bug: 13472578
Change-Id: Ib9751f7a987463e4df98571e846d829ec8e73b5e
Signed-off-by: Prashant Malani <pmalani@google.com>
2014-06-05 22:25:23 +00:00
Justin Koh
89b6bf5a11 DO NOT MERGE Readd removal of notification listener limit on posting
Listener packages are allowed to post > 50 notifications

This reverts commit 500a6b0ca68aaad6140b5af2dae94349be9f7aeb.
2014-06-05 13:50:58 -07:00
Justin Koh
8200b667ea Merge "Revert "Add check to allow notification listener packages to post >50 notifications"" into klp-modular-dev 2014-06-05 19:03:33 +00:00
Justin Koh
500a6b0ca6 Revert "Add check to allow notification listener packages to post >50 notifications"
Broke build.

This reverts commit 2dbd36fc7f9341ecef51c2ed96a0f21b046f5a8d.

Change-Id: I2fdf1de21b6598f85bbd94acef44e771b2df9f42
2014-06-05 19:02:47 +00:00
Justin Koh
2be3d6f936 Merge "Add check to allow notification listener packages to post >50 notifications" into klp-modular-dev 2014-06-05 18:06:46 +00:00
Justin Koh
2dbd36fc7f Add check to allow notification listener packages to post >50 notifications
Bug: 13433398
Change-Id: I77abf19982add240e1bbe8196fbe148d32884f68
2014-06-04 21:14:26 -07:00
Craig Mautner
e34fcf8ff9 Merge "Add callback when ActivityView activities complete" into klp-modular-dev 2014-06-05 03:28:21 +00:00
Craig Mautner
d94b47f3b6 Add callback when ActivityView activities complete
Users of ActivityViews can now be informed when there are no more
active activities in ActivityView by registering a callback.

Fixes bug 15330616.

Change-Id: I39d55bdb0db8b0a12ee751cdcb039b7fbb899c85
2014-06-04 17:25:49 -07:00
Craig Mautner
81dfc082d2 Merge "Force all windows to redraw before unblanking screen" into klp-modular-dev 2014-06-03 22:41:38 +00:00
Craig Mautner
228742d278 Force all windows to redraw before unblanking screen
The screen turning on would show windows as they were when the screen
turned off. This fix forces all showing windows to redraw first and
only then allow the screen to turn on.

Fixes bug 15092354.

Change-Id: I349995bf6446d6c462dccdc2b599bab9ab0ab2c8
2014-06-02 20:29:38 -07:00
Michael Kolb
ca5b9cfc07 Fix circular mask
Bug: 15110243

Change-Id: Ic6a3728998f3f9fb73567ed1aff012d620a19486
2014-05-30 14:03:55 -07:00
Jeff Brown
010e561a70 Add dumpsys to dock observer.
Minor refactoring of dock observer to allow its state to be
inspected and modified via dumpsys for debugging purposes.

eg. View current state.
adb shell dumpsys DockObserver

eg. Simulate being docked.
adb shell dumpsys DockObserver set state 1

eg. Reset back to normal.
adb shell dumpsys DockObserver reset

Change-Id: Ie48db775290ebed9aa4d9d9d5ac5a6fcb6122ac9
2014-05-29 17:48:33 -07:00
Craig Mautner
1b4bf857d3 Do not start tasks on ActivityViews unless explicit
New tasks were being started on ActivityViews because they
matched packages. This fix enforces a rule that new tasks
can only be started on ActivityViews if they are explicitly
targeted for that ActivityView.

Fixes bug 15162447.

Change-Id: I9ccb72171b5cda0897a0b9ffe4cbebfbb0d92c2c
2014-05-27 09:19:28 -07:00
Dan Sandler
7509733c8d Elide extras strings from noman dumpsys output.
Bug: 14292528
Change-Id: I19cfb6b692e6901fa7f115ea675b1b03fc5ba176
(cherry picked from commit 44de3cfc08428378b93172a2b03f9785a3638678)
2014-05-21 15:57:10 +00:00
Jeff Brown
4255869ac0 Defer display ready until brightness ramp completes.
Bug: 14494096
Change-Id: I6da6fffbbce2c7058170e5c6139eae4cb5a06d88
2014-05-20 22:02:46 -07:00
Jeff Brown
6d8fd27e51 Make power button behavior configurable.
Allow power button to be used to either go to sleep as usual,
which may doze, or skip that completely and really go to sleep.
May also really go to sleep and go home all at once.

Bug: 14406056
Change-Id: Ia19e2551b9c2a72271bb2eddd5c0d1749761e019
2014-05-20 21:24:38 -07:00
Jeff Brown
969579bb9d I'm feeling the good vibrations.
When the device enters a non-interactive state, we normally
cancel all active vibrations as a safety precaution.  However if
the system is performing haptic feedback then we want to allow
it to run to completion.

Bug: 14319563
Change-Id: I673781bbf32562e45c1595689e6b423bd178ea73
2014-05-20 19:29:29 -07:00
Jeff Brown
27736f5c0a Allow display timeouts to be set in config.xml.
Bug: 13671523
Change-Id: I79fc21999bc62743178d2d22071455a0c11070c9
2014-05-20 17:17:10 -07:00
Colin Cross
aa943d1b2d BootReceiver: add ro.boot.bootreason property to SYSTEM_LAST_KMSG
Instead of requiring the kernel to join last_kmsg and the reboot
reason together, allow both to be passed to userspace and have
userspace combine them the way the log parsers want them.

Existing devices with no ro.boot.bootreason property and kernel
support for putting the reason in last_kmsg will continue to
use the kernel's formatting.

Bug: 13813279
Change-Id: I079b0107feb1533c6a54044ca6a114741127dfbc
(cherry picked from commit 431614cb6b2170fc715757dc6f964fdbb140ee7d)
2014-05-09 22:30:23 +00:00
Heather Lee Wilson
9da8301e0a Prevent crashing when disabling MCU during dream wakeup
AmbientMode attempting to send message to DozeHardware no longer results in an
uncaught IllegalStateException.  The exception was crashing Android Wear when
DozeHardware had already been released by PowerManagementService at time of
AmbientMode's message.

Change-Id: I5956a453802b5b764e88638f6b6d899cbc94cc8d
2014-05-06 15:31:57 -07:00
Jeff Brown
84aaf124b7 Merge "Plumb display state and interactive information to BatteryStats. (DO NOT MERGE)" into klp-modular-dev 2014-05-06 20:27:34 +00:00
Jeff Brown
01ee6f6cf7 Plumb display state and interactive information to BatteryStats. (DO NOT MERGE)
Fixes an issue where dozing was treated the same as the screen
being fully on.  Now dozing is treated the same as the screen
being fully off which is slightly better.  The decision of how
to represent this state is now internal to the battery stats
so it can be improved later.

Removed noteInputEvent() since it is unused.

Bug: 14480844
Change-Id: Iee8cf8dce1a1f91c62678bb6d3d9fe567ad6db42
2014-05-06 13:18:19 -07:00
Craig Mautner
e88097bd00 Merge "Pause and resume ActivityView when visibility changes" into klp-modular-dev 2014-05-05 20:58:15 +00:00
Craig Mautner
05678d5a31 Add null check to embeddedAllowed check
If the component being checked has been removed an NPE will be
thrown. This checks for that situation and handles it.

Fixes bug 14562234.

Change-Id: Ica5713378f356ac8441862d455b7d284ea111212
2014-05-05 12:32:40 -07:00
Craig Mautner
d13a558397 Pause and resume ActivityView when visibility changes
Once a Surface has been established the activity in an ActivityView
must be paused and resumed as the view goes in and out of visibility
= View.GONE.

Fixes bug 14034658.

Change-Id: Icab43678053c225db70f051dceacd4d024df2153
2014-05-05 12:07:40 -07:00
Jeff Brown
140ffc783c Clean up some terminology related to interactive state.
Change-Id: Ife4445685a5314dea64332a3490fa8dd3ffd89a2
2014-05-01 15:22:27 -07:00
Jinsuk Kim
8fe27e8818 Merge "Move logical address allocation logic into native service from HAL" into klp-modular-dev 2014-04-29 21:32:50 +00:00
Craig Mautner
247ab65a49 Throw exception from startActivity if not allowed.
The ActivityView.startActivity method may defer calling
ActivityContainer.startActivity if the ActivityView is not yet
visible. If the activity being started doesn't have allowEmbedded
attribute set to true then the SecurityException will not be
thrown until the ActivityView is visible. In such a case the caller
of ActivityView.startActivity cannot catch the SecurityException.

This fix checks the attribute at the time ActivityView.startActivity
is called.

Fixes bug 14317210.

Change-Id: I7fff23e39b67a9a0aa1b2e555920d02ae38906d9
2014-04-25 11:20:01 -07:00
Craig Mautner
3a656ea32e Merge "Too soon." into klp-modular-dev 2014-04-25 03:03:37 +00:00
Craig Mautner
2e46e65e9d Too soon.
Change-Id: I1abb1d4841e4e6342c3b861d33ae22e22ed0a161
2014-04-25 03:01:40 +00:00
Craig Mautner
3359bbe02c Merge "Add test for attribute android:allowEmbedded" into klp-modular-dev 2014-04-25 00:39:06 +00:00
Michael Kolb
e597d5f931 Merge "Use rotation to position circular display mask" into klp-modular-dev 2014-04-24 16:08:21 +00:00
Michael Kolb
8b275ca9d3 Use rotation to position circular display mask
Bug: 14231785

Change-Id: Ib6d69f3b9c2a638731539f1c1e51b56ad1698adc
2014-04-24 09:01:19 -07:00
Craig Mautner
75731016e9 Add test for attribute android:allowEmbedded
Throw a SecurityException if it is not true for an activity launched
using ActivityContainer.startActivity().

Change-Id: Id1d70e630195a49a3eccdc64a0beccc420400332
2014-04-24 08:42:32 -07:00
Craig Mautner
7f7bdb2712 Force ActivityView activities to start in new task
Activities were associating with existing tasks when their
components matched. This was causing them to be launched
into existing stacks rather than into their ActivityView. Adding
these flags forces the launches to be in unique tasks on their
ActivityView.

Fixes bug 14252286.

Change-Id: I9ba65a4a2da198435748c0a17396d3f7f8c75f5e
2014-04-23 13:55:36 -07:00
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
Jinsuk Kim
cbafd1b3ea Move logical address allocation logic into native service from HAL
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
2014-04-21 07:42:35 +09: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