3758 Commits

Author SHA1 Message Date
Irfan Sheriff
1205054240 Merge "Open p2p pre-association service discovery API" 2012-04-17 11:40:03 -07:00
Irfan Sheriff
2e3dec5aeb Merge "Open network service discovery API" 2012-04-17 11:39:08 -07:00
satok
fbf7e1f343 Merge "Get rid of "isSentenceLevelSpellCheckSupported"" 2012-04-16 22:07:45 -07:00
Dianne Hackborn
ac76e72272 Merge "Add new scale-up window manager animation." 2012-04-16 17:34:25 -07:00
Dianne Hackborn
eabfb3a36e Add new scale-up window manager animation.
Like zoom thumbnail, but without the thumbnail.

Change-Id: I9486dd204398b87c9e70ff0d05d03f4a22449cd6
2012-04-16 17:32:50 -07:00
Jeff Brown
9704e78418 Merge "Refactor SensorManager to move non-API bits into a subclass." 2012-04-16 15:46:47 -07:00
Andreas Huber
901cb6160d Merge "Unhide new media related java APIs." 2012-04-16 14:06:05 -07:00
Jamie Gennis
d1661dcc90 Merge "Unhide new SurfaceTexture & TextureView APIs" 2012-04-16 13:21:53 -07:00
Jeff Brown
25157e458d Refactor SensorManager to move non-API bits into a subclass.
Changed the SensorManager class so that it only contains API-related
bits including what's needed to support legacy sensors.  Mostly just
moved stuff around.  Making the class abstract is safe because
it does not have a visible constructor in the API.

One minor change is that the cache of sensor type to sensor lists
is now per instance of SensorManager instead of being static.
We can fix this if desired.

Another small change is that we bail out early from registerListener
if the listener has already been registered for the particular
sensor.  This happened for both legacy and standard listeners.
The problem is that the ListenerDelegate maintains two lists of
sensors, one is a Map and the other is a List.  Adding a sensor
twice causes one entry to be added to the Map and two entries to be
added to the List, but when the sensor is removed the next time, only
one entry is removed from the List, leaving it in an inconsistent
state.

Removed Sensor.getLegacyType() since the value it provides is only
needed in LegacyListener and we don't really save any significant
computation by caching it.  Removing the field makes support for
legacy sensors a little more self-contained.

Bug: 6339552
Change-Id: I50d41ac97cf535924f2bfa2026d28547a4d00286
2012-04-16 13:03:55 -07:00
Jeff Sharkey
c0e5b8c7fa Merge "DownloadManager and metered networks." 2012-04-16 12:03:43 -07:00
Jeff Sharkey
792e091045 DownloadManager and metered networks.
API to control whether a download is allowed to use metered networks.

Bug: 3001465
Change-Id: I29153d2a7495a2e9f76ef5be0a77696a85823839
2012-04-16 12:00:43 -07:00
Jeff Sharkey
7bf8fba6f0 Merge "API to report if active network is metered." 2012-04-16 11:22:22 -07:00
Jeff Sharkey
9f7cbf0e50 API to report if active network is metered.
Report to developers if active network is "metered" and define it
as the user being sensitive to heavy data usage.

Bug: 3001465
Change-Id: I855ca3cd3eb1de3c4814148d70ccf24957af898a
2012-04-16 11:20:27 -07:00
Andreas Huber
07ea426e3a Unhide new media related java APIs.
Change-Id: If0b8201eaca74f51f3499b6ecdfb73088586ee24
2012-04-16 10:14:05 -07:00
Philip Milne
4e1cb3b794 Merge "Fix for bug 6110465." 2012-04-16 10:03:17 -07:00
satok
c7ee1b9369 Get rid of "isSentenceLevelSpellCheckSupported"
Bug: 6320351
Change-Id: I0e931b7248f8c65268b60af599c07432d58d2f1f
2012-04-16 20:02:37 +09:00
Jonathan Dixon
caf97c7db9 Merge "Two WebView API cleanups" 2012-04-16 01:05:06 -07:00
Irfan Sheriff
92784670c4 Open network service discovery API
Add support for DNS based network service discovery API. This
allows applications to discover and resolve applications on a
local network such as Wi-Fi

Change-Id: Ie89895edd35d12b7f7a23fb5fed36cb2b2079f7a
2012-04-15 17:09:48 -07:00
Irfan Sheriff
8bf825f48f Open p2p pre-association service discovery API
This allows applications to filter out the devices by the
services supported for the purpose of establishing a
connection.

so, a game app can connect to devices that support the game,
and a media streaming app can filter and connect only to
the available media display devices

Change-Id: Ia792e292d2ca771beeb4ca3b007a047527c19229
2012-04-14 14:41:45 -07:00
Svetoslav Ganov
4213804541 Accessibility focus - framework
Usefulness: Keep track of the current user location in the screen when
            traversing the it. Enabling structural and directional
            navigation over all elements on the screen. This enables
            blind users that know the application layout to efficiently
            locate desired elements as opposed to try touch exploring the
            region where the the element should be - very tedious.

Rationale: There are two ways to implement accessibility focus One is
           to let accessibility services keep track of it since they
           have access to the screen content, and another to let the view
           hierarchy keep track of it. While the first approach would
           require almost no work on our part it poses several challenges
           which make it a sub-optimal choice. Having the accessibility focus
           in the accessibility service would require that service to scrape
           the window content every time it changes to sync the view tree
           state and the accessibility focus location. Pretty much the service
           will have to keep an off screen model of the screen content. This
           could be quite challenging to get right and would incur performance
           cost for the multiple IPCs to repeatedly fetch the screen content.
           Further, keeping virtual accessibility focus (i.e. in the service)
           would require sync of the input and accessibility focus. This could
           be challenging to implement right as well. Also, having an unlimited
           number of accessibility services we cannot guarantee that they will
           have a proper implementation, if any, to allow users to perform structural
           navigation of the screen content. Assuming two accessibility
           services implement structural navigation via accessibility focus,
           there is not guarantee that they will behave similarly by default,
           i.e. provide some standard way to navigate the screen content.
           Also feedback from experienced accessibility researchers, specifically
           T.V Raman, provides evidence that having virtual accessibility focus
           creates many issues and it is very hard to get right.
           Therefore, keeping accessibility focus in the system will avoid
           keeping an off-screen model in accessibility services, it will always
           be in sync with the state of the view hierarchy and the input focus.
           Also this will allow having a default behavior for traversing the
           screen via this accessibility focus that is consistent in all
           accessibility services. We provide accessibility services with APIs to
           override this behavior but all of them will perform screen traversal
           in a consistent way by default.

Behavior:  If accessibility is enabled the accessibility focus is the leading one
           and the input follows it. Putting accessibility focus on a view moves
           the input focus there. Clearing the accessibility focus of a view, clears
           the input focus of this view. If accessibility focus is on a view that
           cannot take input focus, then no other view should have input focus.
           In accessibility mode we initially give accessibility focus to the topmost
           view and no view has input focus. This ensures consistent behavior accross
           all apps. Note that accessibility focus can move hierarchically in the
           view tree and having it at the root is better than putting it where the
           input focus would be - at the first input focusable which could be at
           an arbitrary depth in the view tree. By default not all views are reported
           for accessibility, only the important ones. A view may be explicitly labeled
           as important or not for accessibility, or the system determines which one
           is such - default. Important views for accessibility are all views that are
           not dumb layout managers used only to arrange their chidren. Since the same
           content arrangement can be obtained via different combintation of layout
           managers, such managers cannot be used to reliably determine the application
           structure. For example, a user should see a list as a list view with several
           list items and each list item as a text view and a button as opposed to seeing
           all the layout managers used to arrange the list item's content.
           By default only important for accessibility views are regared for accessibility
           purposes. View not regarded for accessibility neither fire accessibility events,
           nor are reported being on the screen. An accessibility service may request the
           system to regard all views. If the target SDK of an accessibility services is
           less than JellyBean, then all views are regarded for accessibility.
           Note that an accessibility service that requires all view to be ragarded for
           accessibility may put accessibility focus on any view. Hence, it may implement
           any navigational paradigm if desired. Especially considering the fact that
           the system is detecting some standard gestures and delegates their processing
           to an accessibility service. The default implementation of an accessibility
           services performs the defualt navigation.

bug:5932640
bug:5605641

Change-Id: Ieac461d480579d706a847b9325720cb254736ebe
2012-04-13 19:05:24 -07:00
Jamie Gennis
33efb231cb Unhide new SurfaceTexture & TextureView APIs
This change unhides the new SurfaceTexture and TextureView APIs that were added
to allow transferring ownership of the SurfaceTexture from the UI framework to
the application.

Change-Id: Ic4b781d907a59e99ff1a5974009305c1f9aee36a
2012-04-13 18:33:38 -07:00
Jeff Brown
90aba7caac Merge "Add support for input devices that have vibrators." 2012-04-13 17:34:20 -07:00
Jeff Brown
75e0dcbca1 Merge "Extract Vibrator implementation from interface." 2012-04-13 17:03:05 -07:00
Jeff Brown
a47425a13c Add support for input devices that have vibrators.
Added a getVibrator() method to InputDevice which returns a Vibrator
associated with that input device.  Its uses the same API as the
system vibrator which makes it easy for applications to be modified
to use one or the other.

Bug: 6334179
Change-Id: Ifc7f13dbcb778670f3f1c07ccc562334e6109d2e
2012-04-13 17:01:15 -07:00
Dianne Hackborn
2a07308ed2 Merge "Add direct support for HTML formatted text in ClipData etc." 2012-04-13 16:47:38 -07:00
Philip Milne
1557fd7809 Fix for bug 6110465.
Add layout bound metadata to 9-patch files and make layouts take them into account.

This CL contains a proposed API for dealing with layout bounds.

This solution exposes:

1. Class: Insets - for storing layout Insets (and later possibly padding).
2. Methods: View:(get/set)LayoutInsets() - for storing layoutBounds.
3. Methods: ViewGroup:(get/set)LayoutMode() - for controlling layoutMode.

It also iuncudes the changes to GridLayout to support layout bounds.

Change-Id: I60c836b6530b61c5abf37f93ee9c44aad73573f1
2012-04-13 16:25:08 -07:00
Dianne Hackborn
acb69bb909 Add direct support for HTML formatted text in ClipData etc.
When using the clipboard, ACTION_SEND, etc., you can now supply
HTML formatted text as one of the representations.  This is exposed
as a set of methods on ClipData for building items with HTML
formatted text, and retrieving and coercing to HTML (and styled)
text.  In addtion, there is a new EXTRA_HTML_TEXT for interoperating
with the old ACTION_SEND protocol.

Change-Id: I8846520a480c8a5f829ec1e693aeebd425ac170d
2012-04-13 15:36:06 -07:00
Martijn Coenen
a94afeb5b3 Merge "Unhide new Beam push APIs." 2012-04-13 15:22:11 -07:00
Makoto Onuki
e64d187553 Merge "Introduce new URI to clear data usage information" 2012-04-13 15:22:05 -07:00
Daniel Lehmann
58ab2bcca9 Merge "Depcrecate increment function (should have been done back in ICS)" 2012-04-13 13:36:22 -07:00
Daniel Lehmann
a1620dc521 Depcrecate increment function (should have been done back in ICS)
Change-Id: I5c7d4d80a5d10b6ed2460f6dac30e53cc2714521
2012-04-13 13:29:49 -07:00
Makoto Onuki
7ebbfd0f0c Introduce new URI to clear data usage information
We were going to piggyback existing DataUsageFeedback.FEEDBACK_URI,
but decided to introduce a new URI for this.

Bug 5475575

Change-Id: I6d467e5342f551142f047aa1b0b3503c5bf9b7fd
2012-04-13 13:18:22 -07:00
Daniel Sandler
4dfbe83e1a Unhide some new Notification APIs.
Bug: 6318391
Change-Id: Ie51f373cc84d845fa4aababab702c115fcc9e2e5
2012-04-13 14:05:25 -04:00
Jonathan Dixon
939e5040b5 Two WebView API cleanups
- remove final from classes which we will need to provide subclasses
  in future: CookieManager, GeolocationPermissions, WebIconDatabase
  and WebStorage. None of these have published constructors,
  so applications cannot subclass them anyway.

- Also convert some protected members of JsResult to private, as its of
  no use to legal subclasses, and applications cannot subclass it.

Change-Id: Iaca9d2db31e25853b6c55feae41d9e7774087479
2012-04-13 16:36:16 +01:00
Jeff Brown
c2346134bb Extract Vibrator implementation from interface.
Moved the core logic of Vibrator into SystemVibrator, potentially
allowing for the creation of other Vibrator subclasses.

Fixed several places where we were creating new Vibrator
instances unnecessarily instead of getting it from the Context.

It is safe to make Vibrator abstract because its constructor
was hidden from the SDK so it was not possible to subclass it.

Bug: 6334179
Change-Id: I18ece6544c26a7efb2d5099f8346a10aef8a5e18
2012-04-13 04:05:17 -07:00
Jonathan Dixon
b36584042e Merge "Hide the public constructors for singleton classes" 2012-04-13 02:35:00 -07:00
Wu-cheng Li
5573ac0149 Merge "Unhide camera autofocus move callback." 2012-04-13 01:03:57 -07:00
Jeff Brown
882735972e Merge "Notify applications when input devices change." 2012-04-12 18:55:57 -07:00
Jeff Brown
af9e8d3818 Notify applications when input devices change.
This change allows the InputManager to keep track of what input
devices are registered with the system and when they change.
It needs to do this so that it can properly clear its cache of
input device properties (especially the key map!) when changes
occur.

Added new API so that applications can register listeners for
input device changes.

Fixed a minor bug in EventHub where it didn't handle EPOLLHUP
properly so it would spam the log about unsupposed epoll events
until inotify noticed that the device was gone and removed it.

Change-Id: I937d8c601f7185d4299038bce6a2934fe4fdd2b3
2012-04-12 18:54:54 -07:00
Fabrice Di Meglio
62901af52a Merge "Add Paint.setTextLocale()" 2012-04-12 17:37:44 -07:00
Fabrice Di Meglio
517825f1a9 Add Paint.setTextLocale()
- will be used for better shaping CJK and other goodies

Change-Id: If64945a337edd915f5ebb88f04b6fd18e92ca587
2012-04-12 17:31:17 -07:00
Stephen Hines
e267f5f2b0 Merge "Add missing support for Element.FONT()." 2012-04-12 16:45:00 -07:00
Martijn Coenen
20e8dd9f9e Unhide new Beam push APIs.
Also added support for multiple Uris, removed mimeType argument.

Change-Id: Iad2c4d0e36a174080d7bc9c9c8ab893f90231d02
2012-04-12 16:37:18 -07:00
Alex Sakhartchouk
0e2c70112b Merge "Unhiding J API's for Renderscript." 2012-04-12 16:06:02 -07:00
Jonathan Dixon
a3dc86e637 Hide the public constructors for singleton classes
WebStorage and GeolocationPermissions are not intended for direct use
by application code. Existing APKs using this will still work (as well
as they ever could have), but this change will cause a compile break if they
move to SDK >= 16, which should be fixed by using getInstance() instead.

Bug: 6238010
Change-Id: I75789cc260c8fe005c42942bc81483193cc54f17
2012-04-12 20:23:37 +01:00
Wu-cheng Li
6574539bae Unhide camera autofocus move callback.
Camera autofocus move callback tells the clients when
continuous aufofocus is moving. Applications can show
autofocus animation based on this.

bug:5687212
Change-Id: I3191fd447b1e9de0ccf939eb346344f0be9bcf1a
2012-04-12 18:07:16 +08:00
Jonathan Dixon
39edeeefe7 Merge "Hide WebView.getZoomControls()" 2012-04-12 02:29:50 -07:00
Brett Chabot
f1253cd68a Upgrade junit.runner classes to their JUnit4.10 implementation.
Bug 5826326

Change-Id: If7e4c48a4369c1056dee5a2049c891bb6ab7d8d0
2012-04-11 19:01:30 -07:00
Stephen Hines
3a29141321 Add missing support for Element.FONT().
Change-Id: Id66676958cc41d934b7f01acd65916f6d777d355
2012-04-11 18:15:55 -07:00
Jeff Brown
4d6a82d79e Unhide new animation runnable API on View.
Change-Id: Id626688d6c7d632c01d9897777c854cb601d3301
2012-04-11 14:23:51 -07:00