10717 Commits

Author SHA1 Message Date
Jeff Brown
8abd7021a6 Merge "Ensure dreams can be started when not powered." into jb-mr1-dev 2012-10-03 15:24:45 -07:00
Jeff Brown
645832dd2b Ensure dreams can be started when not powered.
Previously dreams could not be started unless plugged in.
Now we allow them to start but they will eventually stop
if a user activity timeout occurs and no screen wakelocks
are held.

Bug: 7253639
Change-Id: I84703e144ca6d4aba1ef9437f04a201c3dde8a49
2012-10-03 14:57:03 -07:00
rich cannings
cdf932e050 Fix PackageInstaller displays with multi-user
With this fix, when all users cancel installing an app they were warned about,
then the "Installing..." screen disappears, as desired.

Bug: 7255231
Change-Id: I2475fa790a5d09abbf94411c696682502fb1e8df
2012-10-03 14:32:38 -07:00
Victoria Lease
fc6770e748 Merge "Remove checkPermission() call in getAllProviders()." into jb-mr1-dev 2012-10-03 08:43:43 -07:00
Jeff Brown
3f0a57dcd9 Merge changes Iccea764b,I624b559e into jb-mr1-dev
* changes:
  Improve the screen dim duration calculation.
  Implement screen on hack for wireless chargers.
2012-10-02 23:29:47 -07:00
Jeff Brown
5558b79e7a Merge "Fix some synchronization issues in BatteryService." into jb-mr1-dev 2012-10-02 23:28:02 -07:00
Jeff Brown
ff532540f1 Improve the screen dim duration calculation.
Take into account whether the screen off timeout is very short.
If so, we use a shorter dim timeout.  Don't allow the dim
time to be more than 20% of the total screen on time so that
the screen remains bright at least 80% of the time even when
the timeout is short.

Bug: 7273646
Change-Id: Iccea764b90f0d8b1df7009d26160c6bcf6eabe5b
2012-10-02 21:18:04 -07:00
Jeff Brown
f3fb895269 Implement screen on hack for wireless chargers.
We can't accurately detect whether the device is resting
on a wireless charger unless it is actually charging.
So we need to tweak the screen on when plugged / unplugged
policy accordingly to avoid spurious wakeups.

Bug: 7234284
Change-Id: I624b559e2e92b8813b12090bc20eca5f5158997e
2012-10-02 20:57:05 -07:00
Dianne Hackborn
75b694f1d6 Merge "Fix issue #7274813: A few sticky broadcasts aren't being sent to all users" into jb-mr1-dev 2012-10-02 19:19:41 -07:00
Craig Mautner
3e2358a0e6 Merge "Delay setting hidden until after isVisibleNow test." into jb-mr1-dev 2012-10-02 19:14:00 -07:00
Jeff Brown
a4d8204e30 Fix some synchronization issues in BatteryService.
Some of the BatteryService state was being locked
sometimes and it wasn't at all consistent.

Bug: 7158734
Change-Id: I46e75f66fde92c5a577a80a6bd99c9573066f3c1
2012-10-02 19:11:19 -07:00
Jeff Sharkey
1ed299f822 Merge "Make USB services multi-user aware." into jb-mr1-dev 2012-10-02 18:11:48 -07:00
Craig Mautner
4b5aa78c89 Delay setting hidden until after isVisibleNow test.
Setting hidden prior to test guarantees the test will fail. This
then causes the exit animation to not be loaded and consequently
the window is immediately hidden. Then, when the window is removed
later it reappears in order to animate away. The consequent flash
is undesirable.

Bug: 7242373 fixed.
Change-Id: I56966bd9060124be372702090f86b29b4deea8c0
2012-10-02 18:11:25 -07:00
Jeff Sharkey
fc3f24b4b6 Make USB services multi-user aware.
USB settings are now isolated per-user, since they revolve around
installed packages.  User-specific settings are returned based on
calling user, or referenced by UserHandle passed to SystemUI.  Each
settings Context is wrapped as a specific user, so all broadcasts are
sent correctly.  Upgrades any existing USB settings to OWNER.

Physical events, like new devices, are routed to the currently active
user.  Switch to using AtomicFile when persisting settings.

Bug: 7244888
Change-Id: I8a723ad3d55ac1bff99276c5f3a3f5e8f013432f
2012-10-02 18:09:10 -07:00
Jeff Brown
031e9d2e21 Merge changes I0ed9ba00,Ia8c6d7fe into jb-mr1-dev
* changes:
  Fix bug removing all windows that belong to a display.
  Add some missing debug output.
2012-10-02 17:08:07 -07:00
Jeff Brown
bcbe9cf475 Merge "Add new Display API for secure video capabilities." into jb-mr1-dev 2012-10-02 16:39:08 -07:00
Svetoslav Ganov
9bfb8bcfeb Merge "Up motion event not injected by the touch explorer at the end of a drag." into jb-mr1-dev 2012-10-02 16:36:29 -07:00
Jeff Brown
cb882f90e4 Fix bug removing all windows that belong to a display.
Removing one window causes its subwindows to also be removed.
We have to be careful when traversing the window list
because multiple windows may be removed at a time so we
don't get IndexOutOfBoundsException due to the window
list changing in unexpected ways.

Bug: 7273702
Change-Id: I0ed9ba00c325ad178ab28919ce2e763cb6fd38ba
2012-10-02 16:35:35 -07:00
Dianne Hackborn
5bc54bf354 Merge "Fix issue #7272775: Auto Start Apps Not Starting" into jb-mr1-dev 2012-10-02 16:25:15 -07:00
rich cannings
3ed62adad1 Merge "Fix package verification with multi-user" into jb-mr1-dev 2012-10-02 16:25:15 -07:00
Jeff Brown
77aebfdbae Add new Display API for secure video capabilities.
Added a new API to determine whether the display supports
protected buffers so that an application can choose a different
content stream or change how it decodes the content so
that it will be viewable on the display.

At present, wifi display does not fully support protected
buffers although this may be enhanced in the future.

Bug: 6986623
Change-Id: If53a53d72b0ec92753cc4b29f99fcb131e00449b
2012-10-02 16:25:10 -07:00
Jeff Brown
c2726643e7 Add some missing debug output.
Bug: 7257579
Change-Id: Ia8c6d7fefe6d4c4e6c37f20722c7ffce4bcfcbae
2012-10-02 16:25:10 -07:00
Dianne Hackborn
aa4b3c79f2 Fix issue #7274813: A few sticky broadcasts aren't being sent to all users
Change-Id: I2fc89de36be0709946f562f64002d0f6d223401f
2012-10-02 16:23:39 -07:00
Laurent Tu
0d21e2161f Remove checkPermission() call in getAllProviders().
getAllProviders() should return all locators, including those not
allowed or not enabled (according to the existing javadoc, at least).
The checkPermission() call prevented this behavior by throwing a
security exception. We restore the previous behavior by removing the
call.

Bug: 6950369

Change-Id: I0c6bc676d4c4db482bb68f1ab7fa5c93675118b4
2012-10-02 16:02:23 -07:00
Dianne Hackborn
4a9f071f3d Fix issue #7272775: Auto Start Apps Not Starting
Bad defaults were causing stopped state to be set at each
boot.

Change-Id: I49b04e9c62f6ac391054201b508fddb6c7985615
2012-10-02 15:29:06 -07:00
Craig Mautner
d5523dc7b7 Call Surface.destroy when Display is removed.
Prevents leaked Surfaces.

Bug: 7272421.
Change-Id: I6c87eb11bb0bedcf8de451b04477c70c248f905d
2012-10-02 15:28:09 -07:00
rich cannings
d55deb0a71 Fix package verification with multi-user
Fixes the porblem of PackageManagerService always sending Intents to user 0.

Bug: 7272549
Change-Id: I25995d8b2b9a24346f4813e6d8d9a84e5d5d2b6b
2012-10-02 14:53:08 -07:00
Svetoslav Ganov
aeb8d0ed0d Up motion event not injected by the touch explorer at the end of a drag.
1. The up event was not injected when the last pointer went up, i.e.
   at the end of the drag. This patch sends an up event if the dragging
   pointer goes up for both cases, when the dragging pointer goes up
   first and when it goes up second.

bug:7272830

Change-Id: I708a2b93ee2d0a4c46dbeea002841666e919602d
2012-10-02 14:33:27 -07:00
Jeff Sharkey
6e2bee75ce Migrate more System and Secure settings to Global.
Includes telephony, WindowManager, PackageManager, and debugging
settings.  Update API to point towards moved values.

Bug: 7231764, 7231252, 7231156
Change-Id: I5828747205708872f19f83a5bc821ed0a801cb79
2012-10-02 13:55:15 -07:00
Svetoslav Ganov
0944d62544 Merge "Touch explorer and magnifier do not work well together." into jb-mr1-dev 2012-10-02 13:14:06 -07:00
Svetoslav Ganov
45af84a483 Touch explorer and magnifier do not work well together.
1. If tocuh exploration and screen magnification are enabled and the screen
   is currently magnified, gesture detection does not work well. The reason
   is because we are transforming the events if the screen is magnified before
   passing them to the touch explorer to compensate for the magnification so
   the user can poke what he thinks he pokes. However, when doing gesture
   detection/velocity computing this compensating shrinks the gestured shape/
   decreases velocity leading to poor gesture reco/incorrect velocity.

   This change adds a onRawMotionEvent method in the event transformation chain
   which will process the raw touch events. In this method of the touch explorer
   we are passing events to the gesture recognized and the velocity tracker.

2. Velocity tracker was not cleared on transitions out of touch exploring state
   which is the only one that uses velocity.

bug:7266617

Change-Id: I7887fe5f3c3bb6cfa203b7866a145c7341098a02
2012-10-02 12:02:05 -07:00
Irfan Sheriff
56925d65fd Always update peer list in display controller
Display controller should always stay in sync with peer list to avoid
showing incorrect available status on peers which would
cause connectivity issues.

Bug: 7268307
Change-Id: If04644339c1ee3f567939e4441dd6f6a45e4179a
2012-10-01 23:01:57 -07:00
Svetoslav Ganov
30ed33b141 Merge "Owner should not be announces as a user switch." into jb-mr1-dev 2012-10-01 21:19:11 -07:00
Svetoslav Ganov
59f07690c2 Owner should not be announces as a user switch.
1. The accessibility layer announces user switches. Even though
   the initial switch to the owner on a singe user device is a
   valid use switch we should not announce it for accessibility.

bug:7264693

Change-Id: Idf022fab6b74c84b7a96bc4ed7c7fee2b83029a6
2012-10-01 19:22:43 -07:00
Victoria Lease
3750db176a Merge "Route GPS notifications to all users." into jb-mr1-dev 2012-10-01 17:46:27 -07:00
Dianne Hackborn
6f354ed999 Merge "Fix issue #7226101: Secure image capture takes 5 seconds to start" into jb-mr1-dev 2012-10-01 17:46:27 -07:00
Jeff Brown
046cff13fc Merge "Fix CTS test failures." into jb-mr1-dev 2012-10-01 17:41:53 -07:00
Jeff Brown
9ba8d78186 Fix CTS test failures.
Bug: 7001730
Change-Id: I5649b601c310458de5d64b549a407e251d745b7c
2012-10-01 17:34:07 -07:00
Craig Mautner
b97d8764a0 Merge "Switch from uevent model to /dev/input/event." into jb-mr1-dev 2012-10-01 16:38:46 -07:00
Dianne Hackborn
cc5a055613 Fix issue #7226101: Secure image capture takes 5 seconds to start
Mostly (turned off) debug output.  Main fix is to resume the next
activity if we are pausing while sleeping and the top activity is
not the now pausing activity.  Also helped things by fixing a problem
where removing a task would leave around dead destroy timeout
messages.

Change-Id: I9d550c216b4d7e2afe3d93553bb680cec41e2ed1
2012-10-01 16:32:39 -07:00
Jeff Brown
410bc60a77 Merge changes I790820b1,I3fcf3619,Ia0d5a156 into jb-mr1-dev
* changes:
  Enable hardware acceleration for pointer location overlay.
  Disable use of twilight mode for auto-brightness.
  Use new API to override user activity timeout from keyguard.
2012-10-01 15:22:43 -07:00
Jeff Brown
cb6f950f15 Merge "New internal API to eliminate poke locks." into jb-mr1-dev 2012-10-01 15:20:23 -07:00
Victoria Lease
2961d11157 Merge "Avoid NPE in GpsLocationProvider" into jb-mr1-dev 2012-10-01 14:59:57 -07:00
Jeff Brown
db21284a7f Disable use of twilight mode for auto-brightness.
This adjustment is still experimental.

Bug: 7165399
Change-Id: I3fcf361933995d02a5329eeaec80155b39371ba3
2012-10-01 14:33:42 -07:00
Jeff Brown
1e3b98d47d New internal API to eliminate poke locks.
Added a new WindowManager.LayoutParams inputFeatures flag
to disable automatic user activity behavior when an input
event is sent to a window.

Added a new WindowManager.LayoutParams field userActivityTimeout.

Bug: 7165399
Change-Id: I204eafa37ef26aacc2c52a1ba1ecce1eebb0e0d9
2012-10-01 14:27:34 -07:00
Craig Mautner
1f7a09b5df Merge "Only inform DisplayManager of visible content." into jb-mr1-dev 2012-10-01 14:23:39 -07:00
Craig Mautner
65d11b3eef Only inform DisplayManager of visible content.
WindowManager was notifying DisplayManager of content if any window
existed on a display. Now the window must be visible and we must not
be showing a Dream or the Keyguard.

Bug: 7214060.
Change-Id: I9ce4a49aabfbac22ff1e39a837199ce35b9f7503
2012-10-01 13:59:52 -07:00
Amith Yamasani
b525c3cfc7 Merge "Fix broadcast to a specific user" into jb-mr1-dev 2012-10-01 13:05:28 -07:00
Amith Yamasani
2036a94a90 Merge "Fix cache deletion for secondary users" into jb-mr1-dev 2012-10-01 13:05:28 -07:00
Victoria Lease
5c24fd0342 Avoid NPE in GpsLocationProvider
Oops, looks like we were spinning up a secondary thread to run some
tasks that will just happen on the main thread regardless. Removed
the secondary thread and fixed up initialisation order regarding
mHandler and things that post to it. Also reordered GPS and
PASSIVE provider initialisation order since GPS depends on PASSIVE.

This should be both safer and easier to read.

Bug: 7248029
Change-Id: I8630caf0a7bd1b2c401603075676f13dda5be4fa
2012-10-01 12:04:37 -07:00