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
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
We were going to piggyback existing DataUsageFeedback.FEEDBACK_URI,
but decided to introduce a new URI for this.
Bug 5475575
Change-Id: I6d467e5342f551142f047aa1b0b3503c5bf9b7fd
- 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
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
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
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
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
Instead of each application loading the KeyCharacterMap from
the file system, get them from the input manager service as
part of the InputDevice object.
Refactored InputManager to be a proper singleton instead of
having a bunch of static methods.
InputManager now maintains a cache of all InputDevice objects
that it has loaded. Currently we never invalidate the cache
which can cause InputDevice to return stale motion ranges if
the device is reconfigured. This will be fixed in a future change.
Added a fake InputDevice with ID -1 to represent the virtual keyboard.
Change-Id: If7a695839ad0972317a5aab89e9d1e42ace28eb7
Simplified input injection API down to just one call.
Removed all input state reading API. It was only used by the
window manager policy and required a permission that applications
could not obtain. READ_INPUT_STATE is now unused and deprecated.
Change-Id: I41278141586ddee9468cae0fb59ff0dced6cbc00
Added a new InputManager service for interacting with input
devices and configuring them. This will be the focus of
an upcoming refactoring.
Added an API for registering keyboard layouts with the system
based on the use of a broadcast receiver. Applications can
register their own keyboard layouts simply by declaring a
broadcast receiver in their manifests.
Added the skeleton of a package that will ultimately contain
the keyboard layouts and other input device related resources
that are part of the base system.
Bug: 6110399
Change-Id: Ie01b0ef4adbd5198f6f012e73964bdef3c51805c
Promote navigation helpers from the support library to the core
platform.
The support library's meta-data element has been replaced with a
first-class parentActivityName attribute. This attribute is valid
on both activity and activity-alias elements. An activity-alias
will inherit the target activity's parentActivityName if one is
not explicitly specified.
Automatic Up navigation for Activities
Add the public method onNavigateUp() to Activity. The default
implementation will use the metadata supplied in the manifest about an
activity's hierarchical parent (parentActivityName) to do the right
thing.
If any activities in the parent chain require special Intent
arguments, the Activity subclass should override onNavigateUp() to
properly implement Up navigation for the app, supplying such arguments
as needed.
If automatic Up navigation within the same task can't find an activity
matching the supplied intent in the current task stack, it will act as
an in-app "home" and return to the root activity (presumably the app's
front page) in that task. (From this state, pressing "back" with
default behavior will return to the launcher.)
Change-Id: If163e27e59587f7af36975a09c986cb117ec3bc6
This can be used by app to efficiently listen for draw passes. This listener
is guaranteed to not generate any garbage unlike OnPreDrawListener.
Change-Id: Ida40d11a3f8a5d2617bafe722906ee5c9af48602
- fix bug #6163772
- use bits field and pack them as much as possible
- take care of "supportsRtl" flag from Manifest
- add visual unit tests
CTS unit tests in another CL
Change-Id: Ib77c4eb423854209af130688c5ef9977401a9c1c
Add Java properties for those XML attributes that don't have getter/setter
pairs. Also, link existing methods to their XML attributes where the comments
were previously missing.
This CL is worth extra scruitiny: first because it's View, and secondly
because many of the new APIs depend on subtleties in the underlying implementations
that I'm not familiar with.
Also, please consider whether it is too much to deprecate getBackgroundDrawable().
Change-Id: I0f2641926d86e5f44b92a0057736f64b59d2e9b9
This was deprecated and the replacement provided in API level 3.
Hiding it in API 16 as a step toward removing support for it in 17.
Bug: 5012841
Change-Id: Ice66a0fc1031c0d6705973dae7cbc11b028e14c9
Some views (such as ImageView and TextView) handle non-opaque alpha
values directly. This was originally an optimization, but we can handle it faster
in many cases without this optimization when DisplayList properties are enabled.
Basically, if a view has non-overlapping rendering, we set the alpha value directly
on the renderer (the equivalent of setting it on the Paint object) and draw each
primitive with that alpha value. Doing it this way avoids re-creating DisplayLists
while getting the same speedup that onSetAlpha() used to get pre-DisplayList properties.
Change-Id: I0f7827f075d3b35093a882d4adbb300a1063c288
- introduce "supportsRtl" as a new application attribute in the AndroidManifest
- "supportsRtl" default value is FALSE (no RTL support)
- adapt the View layoutDirection and textDirection logic to take care of "supportsRtl" value
Change-Id: I5e4f9f576e14f35dedc6b0c29a7142c397f598e0