429 Commits

Author SHA1 Message Date
John Spurlock
f9e1a0b369 Annotate framework vibrate calls with stream hints.
Migrate existing framework usages of Vibrator.vibrate to use
the new overload with an explicit stream hint.  This prevents
them from being blocked by rules targeting the unspecified stream.

For calls that pass the existing appops check in VibrateService,
pass streamHint down to the input device vibrator so we don't lose
the signal, but leave it up to InputManager to decide what to do
with it - currently unused.

Change-Id: I65c944e4010edea29a412bf57d8d7d3b8098b746
2014-03-21 08:57:53 -04:00
Svetoslav
503fb80d0e Fix build
Change-Id: I2b27d51d8f555ee160dc99dba7e223f1cb3557e7
2014-03-20 10:22:41 -07:00
Svetoslav
8e3feb15c5 Added accessibility APIs for introspecting interactive windows.
1. The old introspection model was allowing querying only the active window
   which is the one the user is touching or the focused one if no window is
   touched. This was limiting as auto completion drop downs were not inspectable,
   there was not way to know when the IME toggles, non-focusable windows were
   not inspectable if the user taps them as until a screen-reader starts
   introspecting the users finger is up, accessibility focus was limited to
   only one window and the user couldn't use gestures to visit the whole UI,
   and other things I can't remember right now.

   The new APIs allow getting all interactive windows, i.e. ones that a
   sighted user can interact with. This prevents an accessibility service
   from interacting with content a sighter user cannot. The list of windows
   can be obtained from an accessibility service or the host window from an
   accessibility node info. Introspecting windows obey the same rules for
   introspecting node, i.e. the service has to declare this capability
   in its manifest.

   When some windows change accessibility services receive a new type
   of event. Initially the types of windows is very limited. We provide
   the bounds in screen, layer, and some other properties which are
   enough for a client to determined the spacial and hierarchical
   relationship of the windows.

2. Update the documentation in AccessibilityService for newer event types.

3. LongArray was not removing elements properly.

4. Composite accessibility node ids were not properly constructed as they
   are composed of two ints, each taking 32 bits. However, the values for
   undefined were -1 so composing a 64 long from -1, -1 prevents from getting
   back these values when unpacking.

5. Some apps were generating inconsistent AccessibilityNodeInfo tree. Added
   a check that enforces such trees to be well formed on dev builds.

6. Removed an necessary code for piping the touch exploration state to
   the policy as it should just use the AccessibilityManager from context.

7. When view's visibility changed it was not firing an event to notify
   clients it disappeared/appeared. Also ViewGroup was sending accessibility
   events for changes if the view is included for accessibility but this is
   wrong as there may be a service that want all nodes, hence events from them.
   The accessibility manager service takes care of delivering events from
   not important for accessibility nodes only to services that want such.

8. Several places were asking for prefetching of sibling but not predecessor
   nodes which resulted in prefetching of unconnected subtrees.

9. The local AccessibilityManager implementation was relying on the backing
   service being ready when it is created but it can be fetched from a context
   before that. If that happens the local manager was in a broken state forever.
   Now it is more robust and starts working properly once the backing service
   is up. Several places were lacking locking.

bug:13331285

Change-Id: Ie51166d4875d5f3def8d29d77973da4b9251f5c8
2014-03-20 16:52:59 +00:00
Craig Mautner
3bf0fb1a90 Merge "Fix oversight when checking in last CL" 2014-03-20 02:56:05 +00:00
Craig Mautner
dd221b3780 Fix oversight when checking in last CL
Too much was deleted due to the order of operations while
debugging. CL 435015 removed some critical lines.

Fixes bug 13410184.

Change-Id: Ia1fbf985d73163742c4c531e8505606454897f69
2014-03-19 19:53:45 -07:00
Nick Kralevich
244d18bfb3 am 857fe511: am 0b4f63c3: am dd6b7495: am 83725810: Merge "Get rid of noise during boot."
* commit '857fe511fe7139a41ad3d587a73758be53340e90':
  Get rid of noise during boot.
2014-03-20 02:03:01 +00:00
Nick Kralevich
0b4f63c319 am dd6b7495: am 83725810: Merge "Get rid of noise during boot."
* commit 'dd6b7495577eca7a00aa37bfdca3449cf1443681':
  Get rid of noise during boot.
2014-03-20 01:52:42 +00:00
Michael Wright
046e0a7ba6 Merge "Use DisplayPowerRequest#wantLightSensorEnabled in ABC." 2014-03-20 01:15:39 +00:00
Dianne Hackborn
40c8725804 batstats: fix wake lock tracking, service bug
- Fix bug I introduced in handling wake lock changes where
  we weren't iterating over the new work sources correctly.
- Fix bug in ActiveServices that would wtf too much.
- Prepare to start tracking uptime in the battery history.

Change-Id: Ia94316be51bc6eab7b02f214a5c40c08e99cc3b1
2014-03-19 17:13:43 -07:00
John Spurlock
07cf4da1d0 Merge "Add stream-level suppression to vibrate/audio services." 2014-03-19 21:58:19 +00:00
Etan Cohen
4a6f087950 Merge "Catch Netd exceptions to avoid runtime restart" 2014-03-19 21:30:15 +00:00
Robert Greenwalt
d9cb2f3d06 Catch Netd exceptions to avoid runtime restart
bug:13475636
Change-Id: If36a0051a957fc066711fe8225f8981bc07add04
2014-03-19 14:26:28 -07:00
Nick Kralevich
70b7d163aa am 31654e19: am b630ffe3: am e75d340a: am 5c8e1a6e: Merge "Allow PMS to restorecon directories under /data."
* commit '31654e19c92c94675c0e2f2a86b59683d4c48d2f':
  Allow PMS to restorecon directories under /data.
2014-03-19 20:34:32 +00:00
Nick Kralevich
b630ffe3fd am e75d340a: am 5c8e1a6e: Merge "Allow PMS to restorecon directories under /data."
* commit 'e75d340ae5919942d19f57856ae9e3f8bc62e098':
  Allow PMS to restorecon directories under /data.
2014-03-19 20:24:32 +00:00
Jeff Sharkey
c1ae44fb8a Merge "Define an OEM directory, scan features and APKs." 2014-03-19 20:16:17 +00:00
Jeff Sharkey
1be762c1ba Define an OEM directory, scan features and APKs.
To support OEM customizations, define a new top-level directory
that roughly mirrors the layout of the system partition.  Scan this
location for (non-privileged) apps, and for additional features.

Bug: 13340779
Change-Id: Idb6d6626655061ee31ad952cab734d30ea6130b9
2014-03-19 12:44:48 -07:00
Robert Greenwalt
1b98e90db0 resolved conflicts for merge of 0bff77d6 to master
Change-Id: Ia4c86126079740978658a05579b56d59d41a7b01
2014-03-19 12:41:54 -07:00
John Spurlock
1af30c7ac4 Add stream-level suppression to vibrate/audio services.
- Add new audio restriction layer to app-ops.  Restrictions add
additional constraints to audio operations at a stream-level.
Restrictions do not affect the persistable state, and are purely
additive: that is, they can only impose additional contstraints, not
enable something that has already been disabled.  Restrictions
also support a whitelisted set of exempt package names.

- Add new audio stream-level checks to app-ops.

- Implement a provisional OP_PLAY_AUDIO suppression to three
java entry points MediaPlayer, AudioTrack, & SoundPool.

- Enhance vibrator api to take stream information as an optional
hint - the constants correspond to AudioManager stream types.
OP_VIBRATE now supports the stream-level restriction check.

- Simplify Vibrator subclasses by adding default implementations
for two .vibrate calls.

- Migrate NoMan's zen-mode control to use the new app-ops
stream-level restriction mechanism.

Change-Id: Ifae8952647202f728cf1c73e881452660c704678
2014-03-19 15:32:51 -04:00
Michael Wright
e5659baa4f Use DisplayPowerRequest#wantLightSensorEnabled in ABC.
Change-Id: I2cb869a40ed91331a55972d0ea557269733d5204
2014-03-19 12:25:20 -07:00
Robert Greenwalt
45b1e5ec05 am 42b746e4: am bd84f01c: am 5d3d4ee3: Merge "Handle provisioning APN by turning off/on data." into klp-dev
* commit '42b746e4d8baa6141598ddaae7148baea2ddf366':
  Handle provisioning APN by turning off/on data.
2014-03-19 19:13:00 +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
Ashish Sharma
0535a9f7aa Include elapsed realtime (nanos) of the event in the radio state change notifications.
Bug: 13247811
Change-Id: I3454aa159a68b9087b4762df947b41965b5a3941
2014-03-18 21:42:02 +00:00
Craig Mautner
76aa61a920 Merge "Defer removal of activity until animation complete." 2014-03-18 21:36:02 +00:00
Craig Mautner
81481fc201 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-18 14:35:04 -07:00
Doug Zongker
dd23853e63 am 06fe82d8: am 2e6d960c: am cdf00888: add option to shutdown after factory reset
* commit '06fe82d8e01780b7b6c16364f81f8dd75d467420':
  add option to shutdown after factory reset
2014-03-18 21:00:04 +00:00
Dianne Hackborn
8fc2eba0f7 am a2a13718: am 7987d84e: am d1d91eca: am 7cb1dfe6: Merge "Insufficient ProcessRecord cleanup when persistent process is killed"
* commit 'a2a13718d00172d224960146e4956de58da5b484':
  Insufficient ProcessRecord cleanup when persistent process is killed
2014-03-18 20:52:51 +00:00
Doug Zongker
2e6d960c85 am cdf00888: add option to shutdown after factory reset
* commit 'cdf008883921c2eb7daf10c82687e9a36461eb16':
  add option to shutdown after factory reset
2014-03-18 20:49:12 +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
Craig Mautner
157b645e5d Merge "Fix activities appearing behind home icons" 2014-03-18 19:24:29 +00:00
Dianne Hackborn
7987d84e35 am d1d91eca: am 7cb1dfe6: Merge "Insufficient ProcessRecord cleanup when persistent process is killed"
* commit 'd1d91eca3e78f2074b110a0e3530aeff6deef6fe':
  Insufficient ProcessRecord cleanup when persistent process is killed
2014-03-18 18:36:53 +00:00
Dianne Hackborn
e9ebd60fc4 Merge "Treat IME processes as hosting activities" 2014-03-18 16:50:25 +00:00
Craig Mautner
95e9daab03 Fix activities appearing behind home icons
Notify the Window Manager when a task has been moved to the front.

Fixes bug 13410184.

Change-Id: I85ec63ae6d1dbd917ba2288b1486f531a69dd1a0
2014-03-18 09:32:47 -07:00
Kenny Guy
ecc9f9b6f3 Merge "Add flag to allow fetching related users recent tasks." 2014-03-18 11:43:46 +00:00
Wonsik Kim
edb67190d6 Merge "Revert "VideoPlaneView initial implementation"" 2014-03-18 01:00:59 +00:00
Dianne Hackborn
f0f94d129b Treat IME processes as hosting activities
When we stop using an IME process, we still treat that
process as if it is hosting activities (in the activity part
of the LRU list), to try to keep it around.  This is intended
to help the experience of switching between IMEs, reducing
the chance of your previous IME process being killed and thus
requiring much more time to switch.

Change-Id: Ie5793fd9b40d980fa18f80246326511ed6ae0597
2014-03-17 16:04:21 -07:00
Kenny Guy
82326a98a4 Add flag to allow fetching related users recent tasks.
Fetch related users recent tasks along with requested users
tasks when flag is set
Set flag in requests coming from systemui/recents.

Change-Id: I985e2d9d6b9728603685fc6126e8193af119e172
2014-03-17 19:45:17 +00:00
Dianne Hackborn
10ad98223f Start enforcing explicit intents for Context.bindService()
No longer prints a warning, now throws an exception.

Also fix a bug in UserManagerService that was causing an
exception while booting.

Change-Id: I3b43cfe08067da840b6850b9bed58664d36d34f1
2014-03-17 11:28:36 -07:00
Wonsik Kim
475e3f0e88 Revert "VideoPlaneView initial implementation"
This reverts commit 5f8aa4142919b3001fd2621f7acd5f609a5129a5.

Change-Id: I161748f365512c5e24acba2c3d9ebd9405fa8e3f
2014-03-17 11:17:47 +00:00
Tim Kilbourn
5dac28f59d am c2b8df82: am 42dd0bb6: am 9539b4a0: Merge "FEATURE_LEANBACK implies that the device is a tv." into klp-modular-dev
* commit 'c2b8df82d701eb3508da06f75b2201c3f9796373':
  FEATURE_LEANBACK implies that the device is a tv.
2014-03-15 00:24:44 +00:00
Tim Kilbourn
42dd0bb6b5 am 9539b4a0: Merge "FEATURE_LEANBACK implies that the device is a tv." into klp-modular-dev
* commit '9539b4a02f74b447db0e3aa1039229f6b913aa87':
  FEATURE_LEANBACK implies that the device is a tv.
2014-03-14 23:33:11 +00:00
Craig Mautner
d00f47402c Launch new tasks with Doc Centric flag.
Introduction of new Intent flag FLAG_ACTIVITY_NEW_DOCUMENT. When
this flag is set the target activity will be launched in its own
task. This is the start of the new Doc Centric mode of working.

Change-Id: I719168532134ab2c5ea3300df676c2b2a0e81795
2014-03-14 14:42:23 -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
Victoria Lease
09d47bbb43 am c2d934d7: am f8ce43ea: am 1365d982: am 4cde7734: Merge "remove unnecessary switchUser call"
* commit 'c2d934d7e87b9eb8cbb15ccc0c39b13ad32de460':
  remove unnecessary switchUser call
2014-03-14 18:01:38 +00:00
Victoria Lease
f8ce43ea14 am 1365d982: am 4cde7734: Merge "remove unnecessary switchUser call"
* commit '1365d98270e0a0a61d10743820e923aeff974b39':
  remove unnecessary switchUser call
2014-03-14 17:54:32 +00:00
Dianne Hackborn
c9519fcd38 am 32a9180a: am f29a4981: am d4981014: am e5191aab: am a796168d: Merge "Fix issue #11965706: Calls using IntentChooser are now Broken in 4.3 and 4.4" into klp-dev
* commit '32a9180a6c1ac12503aaf0d123c2bfff73349508':
  Fix issue #11965706: Calls using IntentChooser are now Broken in 4.3 and 4.4
2014-03-14 17:53:30 +00:00
JP Abgrall
7238585e2e am 4f261396: am 4ecd833e: am 7baa7c80: Merge "ConnectivityService: add support to set TCP initial rwnd" into klp-dev
* commit '4f26139661b0039cff5e570975e6bf9b0bbce1af':
  ConnectivityService: add support to set TCP initial rwnd
2014-03-14 16:32:21 +00: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
Dianne Hackborn
f29a498161 am d4981014: am e5191aab: am a796168d: Merge "Fix issue #11965706: Calls using IntentChooser are now Broken in 4.3 and 4.4" into klp-dev
* commit 'd4981014d486c3ff72813d0d37048ee2abdb3d63':
  Fix issue #11965706: Calls using IntentChooser are now Broken in 4.3 and 4.4
2014-03-14 16:32:02 +00: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