205 Commits

Author SHA1 Message Date
Prashant Malani
a04ea61db5 Revert "Remove circular mask"
This reverts commit 2e8b27e898af3af1165a79e7c5f8b59f63f20a2f.

It also makes the circularMask option configurable via overlay.
It is set to false by default.

An offset dimension entry is also provided, for displays which have
a "chin". This is set to 0 by default.

Bug: 16380982
Change-Id: I16ec3e8d8882a6683c9155055944e5c2f5cd781e
2014-07-23 17:26:08 -07:00
Justin Koh
a63272b4b5 Merge "Revert "Wait for all windows to draw before turning screen on"" into klp-modular-dev 2014-07-17 21:09:48 +00:00
Justin Koh
528b4b7572 Revert "Wait for all windows to draw before turning screen on"
This reverts commit 0a589b929e18d05d1345d97283c3025058ddca18.

Change-Id: Ia73555cd7797b5d172f33db9f46ebc211af6fc1e
2014-07-22 00:26:23 +00:00
Prashant Malani
9353e1a2b2 Merge "Make the booting flag update unconditional" into klp-modular-dev 2014-07-17 18:11:21 +00:00
Craig Mautner
0a589b929e Wait for all windows to draw before turning screen on
Was previously only waiting for windows on the primary display to
draw which meant that windows on ActivityViews had not yet drawn.
This fix checks redraws all outstanding Surfaces before unblanking
the screen.

Fixes bug 15092354.

Change-Id: Id550db003a5f56931eb68464085596e47d25481d
2014-07-16 17:03:36 -07:00
Justin Koh
65d7c332d7 Merge "Additional cleanup after stack deletion." into klp-modular-dev 2014-07-16 22:30:55 +00:00
Craig Mautner
ee36c77acd Additional cleanup after stack deletion.
- Remove activity from PendingActivityLaunch list when it is removed
from stack. This prevents the delayed launch causing
IllegalArgumentException in b/16045752.
- Move PendingActivityLaunch from ActivityManagerService to
ActivityStackSupervisor.
- Immediately call onTaskListEmptyLocked() in cases where no
activities are found in stack.

Fixes bug 16045752.

Change-Id: Ia69a449e7f5e08ab6e36157d0fd793c4d2fdaca4
2014-07-16 15:03:11 -07:00
Prashant Malani
14bff9f55e Make the booting flag update unconditional
In case an Activity is started before we idle, there is a chance
the booting flag might never get updated.

Bug: 16015648
Change-Id: I46504bd126573e3a2ce1f914be922765ae9fe560
2014-07-16 00:00:41 +00:00
Michael Kolb
0cb38d2e5a Merge "Add configuration for activity thumbnails" into klp-modular-dev 2014-07-10 20:49:26 +00:00
Michael Kolb
5f6238e4a7 Add configuration for activity thumbnails
Bug: 15750584

Change-Id: I0b2bfb46022b46d7649f6d9ba9ba74cdfc70a6ea
2014-07-10 14:43:51 -07:00
Aaron Whyte
f5e6747440 Allow overlays to configure ConnectivityService's network sampling to not wake the device.
This can increase clockwork device battery life.
Bug:15455204

Change-Id: Ifc551e6a522627dc8e5cfdfb8f56d4e3cbeea936
2014-07-10 14:05:35 -07:00
Craig Mautner
362449af58 Do not delete stack if empty task is being reused.
If a task is being cleared due to Intent flags and that clearing
was causing the last activity in the last task on a stack to be
deleted, then we were deleting the stack. Immediately after
this we were refilling the task with the same activity but the
stack had already been deleted.

This fix preserves the task and stack when it is only being
cleared for the new activity.

Fixes bug 15611901.

Change-Id: I7bcfa826d0852d9c640daa73fe1324b89471fecd
2014-06-20 14:04:39 -07:00
Griff Hazen
2ea0d3979e DO NOT MERGE Reduce chance of notification listener dropped messages.
The existing code for notification manager/listeners uses a oneway
binder api to deliver messages. One problem with this is that
notification objects can sometimes get fairly large, and can bump
into the oneway binder transaction buffer if many happen at once.

To reduce this issue, flip the service into a oneway delivery of
a status bar notification holder, whose wrapped content is then
immediately fetched upon receipt of the one-way message. This moves
the meat of the fetch to be over a two-way interface without changing
the properties of which object is actually sent (a tickle solution
with lookup key would have changed this)

Further research: attempt to chunk notification objects themselves.
They can sometimes transfer hundreds of KB over a binder transaction.

Bug: 15426276
Change-Id: Ib1a1f4ff848c16f80bcf2ae4dfd2b87a9091f0b2
2014-06-17 20:06:45 -07:00
Craig Mautner
6335fbcba1 Revert "Revert "Close ActivityView and ActivityContainer cleanly.""
This reverts commit dd5c94717077c9366dee364c88a86a78e5ee2688.
2014-06-13 17:18:47 -07:00
Craig Mautner
6fe2184bf1 Do not treat the dummy animation as an animation
The dummy animation is a place holder. When the task stack is being
removed treating it as a true animation forced us through a path
where we deferred the detachment and made a call to tmpRemoveWindows.

Also replaced call to tmpRemoveWindows with a real remove windows
call. The tmpRemoveWindows call does not clean up the Session
and this leaves a surface on the screen.

Fixes bug 15591610.

Change-Id: I05f7bc276bfed2366bbcd8443c92a4bbbc8a4491
2014-06-13 15:46:22 -07:00
Justin Koh
dd5c947170 Revert "Close ActivityView and ActivityContainer cleanly."
This reverts commit 4a9f129874785d34930f165268dbc618e4bc2618.

Conflicts:
	services/core/java/com/android/server/am/ActivityStackSupervisor.java

Change-Id: Ic1f4df7f4cb644de7ddebcdc8ce632b46c5ba8f2
2014-06-13 09:55:09 -07:00
Craig Mautner
be63495101 Fix permission problem and NPE
Remove uid before calling into Window Manager. Restore afterwards.

Check for null stack value before dereferencing.

Fixes bug 15591112.

Change-Id: Ida3de556940440162c91b8c1614d0f21e364abd8
2014-06-12 13:50:53 -07:00
Craig Mautner
4a9f129874 Close ActivityView and ActivityContainer cleanly.
- Do not call IActivityContainer.release() from
ActivityView.finalize() if it has already been called from
ActivityView.release(). Eliminates IBinder finalized Exception.

- Call ActivityRecord.makeFinishing() before calling ActivityStack.
destroyActivityLocked(). Forces call to scheduleDestroyActivity()
and eventually removeFromHistory(). Otherwise removeFromHistory()
is never called and window manager AppWindowTokens become orphans.

- Defer call to ActivityContainer.detachLocked() until all
activities have finished or timed out. Fixes problem where Display
is removed while activities are still launching.

- Call ActivityStackSupervisor.deleteActivityContainer() when all
activities have finished or timed out. Fixes orphaned
ActivityContainers.

Fixes bug 15450798.
Fixes bug 15484154.
Fixes bug 15383479.
Fixes bug 15316558.
Fixes bug 15168560.
Fixes bug 15143914.

Change-Id: Id3c641976b6f825458690f9ee063c07818b56f23
2014-06-11 16:33:00 -07:00
Craig Mautner
e33010a261 Merge "Add NO_ANIMATION flag to ActivityView Intents." into klp-modular-dev 2014-06-11 08:41:11 +00:00
Griff Hazen
9f637d1095 Reduce notification service historical archive size to 1 for watches.
To remove the memory footprint

Bug: 15536759
Change-Id: I081bd962fef689b5d8ed126208499d56ebf4ae38
2014-06-10 15:31:48 -07:00
Craig Mautner
e6d80f4ce4 Add NO_ANIMATION flag to ActivityView Intents.
Add Intent.FLAG_ACTIVITY_NO_AMINATION to all Intents passed into
ActivityView.

Fixes bug 15393526.

Change-Id: I1899a5019416109e982f0254aaba410bb1f4a38d
2014-06-10 13:31:02 -07:00
Amit Mahajan
3f175a3587 am e5a28d34: am 20c5ce50: Handle provisioning APN by turning off/on radio.
* commit 'e5a28d34f662c469f85590dda28fc02eca12204b':
  Handle provisioning APN by turning off/on radio.
2014-06-09 19:50:09 +00:00
Michael Kolb
4bdc93d63e Merge "Remove circular mask" into klp-modular-dev 2014-06-06 15:26:17 +00:00
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
Michael Kolb
2e8b27e898 Remove circular mask
Change-Id: I83b1caea100d28be2fca46dc0280b05e9b78da44
2014-06-05 12:49:55 -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