3683 Commits

Author SHA1 Message Date
Jeff Brown
9df6e7a926 Initial commit of InputManager and keyboard layout API.
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
2012-04-05 14:42:10 -07:00
Jeff Sharkey
7e84830442 Merge "Let ViewStub be used in RemoteViews." 2012-04-03 11:25:24 -07:00
Jeff Sharkey
b27b7a1524 Let ViewStub be used in RemoteViews.
Specifically, this carefully ensures that ViewStub.inflate() uses
the restricted LayoutInflater from RemoteViews, which has a filter
to enforce the @RemoteView annotation.

Bug: 2541651
Change-Id: I341aacbf6029cdd717a894eb084760c6ec224786
2012-04-02 21:32:45 -07:00
Jeff Brown
94a8bf5c6d Update API for new key codes.
Change-Id: I84e4f8993351bad17120447c79afd8cb42370304
2012-04-02 17:35:44 -07:00
Dianne Hackborn
3a3a6cfd8e Add new feature to let apps layout over status bar / system bar.
The main change is a few new flags you can supply to
View.setSystemUiVisibility().  One is a new visibility mode,
SYSTEM_UI_FLAG_FULLSCREEN, which is basically the same as
the global FLAG_FULLSCREEN option for windows, but driven as
part of the system UI state.

There are also three new flags for telling the framework that you
would like to have your application's UI ignore screen
decorations -- SYSTEM_UI_FLAG_LAYOUT_NO_NAVIGATION for going
behind the navigation bar and SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
for ignoring full screen decorations (that is the status bar).

In combination with this you can use SYSTEM_UI_FLAG_LAYOUT_STABLE
to have the framework report consistent insets to your application.

When using NO_NAVIGATION, when the user taps the screen we now
also automatically clear ONLY_CONTENT, so that we atomically show
both UI elements.  This should make it easy for apps like video
players that want to move between fully full-screen and regular
modes.

The ActionBar has also been extended when in overlay mode so
that it will adjust the system window insets to also account
for its space, and allow it to be hidden using the new
SYSTEM_UI_FLAG_FULLSCREEN.

Change-Id: Ic8db1adec49a0f420bfe40c1d92eb21307856d0b
2012-03-30 15:22:04 -07:00
Irfan Sheriff
8901de0af6 Merge "Add discovery broadcasts for p2p" 2012-03-29 08:41:15 -07:00
Daniel Sandler
970de33c8d Merge "The beginning of expanded notifications." 2012-03-29 06:09:02 -07:00
satok
6183cd64a9 Take sentence-level spell checking APIs public
Bug: 6136149

Change-Id: I772164d9c67e95876c228efcce2356a81a06be4f
2012-03-29 18:16:32 +09:00
Daniel Sandler
f3b7343246 The beginning of expanded notifications.
There are now two "rebuilder" classes, each of which
consumes a Notification.Builder and modifies its behavior.
(Inheritance in Builder classes is...not advisable.)

- BigPictureStyle: includes a large Bitmap above the usual
  notification strip.

- BigTextStyle: shows the contentText in a large, wrapping
  TextView instead of truncating to one line.

As for SystemUI, the notification panel now shows the
expanded form if it is available, otherwise the usual
contentView is shown.

(Note that the structure of largeIcon notifications has
changed a bit: The largeIcon is no longer handled by the
status bar at all; it's entirely inside the template now.
Not only does this make the code simpler, and make large
notifications possible, but it fixes the longstanding
irritation that tapping on a largeIcon doesn't highlight the
whole notification row. Man, that feels good.)

Change-Id: I2b9d8a6ea4385659d8cb1ed467c1caf5e12628dd
2012-03-29 00:42:15 -04:00
Irfan Sheriff
c111d1caa8 Add discovery broadcasts for p2p
This will allow apps to figure out if discovery is active or not
and based on that initiate a new discovery for fresh connections

Change-Id: I4778f135fdd88773e4f0d50c384f9b6ebf561e6d
2012-03-28 17:37:04 -07:00
Daniel Sandler
fc90b6a7c7 Merge "Add text labels to intruder actions." 2012-03-27 19:19:01 -07:00
Philip Milne
80e4ee4600 Merge "Fixes for bugs: 6104423, 6103563, 6103509, 6103807 & 6103253." 2012-03-26 14:55:36 -07:00
Fabrice Di Meglio
0adcd07ccb Merge "Improve View layoutDirection resolution" 2012-03-26 14:06:56 -07:00
Philip Milne
aac722a9c0 Fixes for bugs: 6104423, 6103563, 6103509, 6103807 & 6103253.
Add properties to Java API so as to better mirror the framework's XML API.

I'm not familiar with many of these areas so this CL is worth some scrutiny.

Change-Id: Iff63c43521305efaad5a2189c1b5556d2353cbd4
2012-03-26 13:46:33 -07:00
Daniel Sandler
b2a1c23a55 Add text labels to intruder actions.
Change-Id: I544bed7b37c043639ee0e6a11bf757c0a191c1fc
2012-03-26 16:25:21 -04:00
Jesse Wilson
e300d82828 Merge "Add an API to expose Next Protocol Negotiation (NPN)." 2012-03-26 10:14:44 -07:00
Daniel Sandler
9ea03b9f29 Merge "Add remotable methods for TextView's compound drawables." 2012-03-26 06:51:28 -07:00
Jesse Wilson
f5fb5e8096 Add an API to expose Next Protocol Negotiation (NPN).
Bug: http://b/4190756
Change-Id: If904f7ff440391a6adb2963eb2ecb990140ab7cc
2012-03-25 19:43:01 -04:00
Daniel Sandler
820ba323f9 Add remotable methods for TextView's compound drawables.
Change-Id: I67445e5b1d4a571020dfcd551ab00bd83a8eb536
2012-03-24 09:56:10 -05:00
Fabrice Di Meglio
22ab7751d4 Improve View layoutDirection resolution
- make it similar to textDirection
- unhidde also new API: resolveLayoutDirection()

Change-Id: I43c2c2ef32ed6d1f3586781a063271b72e90b9a3
2012-03-23 16:39:26 -07:00
Jeff Brown
cc001fdaf0 Merge "Provide an API for enabling foreign key constraints." 2012-03-23 15:39:02 -07:00
Dianne Hackborn
7cf4640e81 Merge "Add new thumbnail animation." 2012-03-23 15:00:59 -07:00
Jeff Brown
96496adb61 Provide an API for enabling foreign key constraints.
Also provide a lifecycle method on SQLiteOpenHelper so that
applications can configure things like this before the onCreate,
onUpgrade, onDowngrade and onOpen callbacks run.

Change-Id: If3d1396720bd2e032dd9e034733fb1ff9a9733dd
2012-03-23 14:49:39 -07:00
Dianne Hackborn
8078d8c8a2 Add new thumbnail animation.
Use it for recent tasks switching.

Not perfect yet by far, but something.

Also fix issue #6186758: Twitter crashes after tapping on a tweet on JRM75D

Change-Id: I49bf6c94aafde875ac652dedaf96d6c08cc9e7d2
2012-03-23 14:13:13 -07:00
Jeff Brown
47847f3f4d Support enabling WAL using a flag when DB is opened.
Using enableWriteAheadLogging() to enable WAL is inefficient because
we previously disabled WAL mode when the database was opened.
Switching from WAL to PERSIST then back to WAL is inefficient
and could slow down application launch time.  It would be better
to leave the database in WAL mode when we open it to begin with.

To do that, we need to know ahead of time whether we will want to
have WAL enabled for the newly opened database.

Using this flag also reduces the chance that we will encounter
an error enabling WAL mode due to there being other open connections
to the database.

Bug: 6124556
Change-Id: I38ec7a528baeda9f1ef77e25e88b3ca4b6296200
2012-03-23 13:26:26 -07:00
Fabrice Di Meglio
2c4eabced0 Merge "Reduce memory footprint for View (part 2)" 2012-03-23 11:12:29 -07:00
Fabrice Di Meglio
b934db7e3e Reduce memory footprint for View (part 2)
- make textDirection use private bits field
- update layoutDirection usage of private bits

Change-Id: Ib9f4da58dbb74f410fb9d3be3c26ef02579aaf1d
2012-03-22 13:40:29 -07:00
Daniel Sandler
a0a938cd5f Notification actions API.
Actions will be attached to the Notification object and also
used to inject additional tap targets in the default
template used by Builder.

Change-Id: Idd58686b9c44b2ca7bb9ec5aa8337f3bdce5b878
2012-03-21 22:13:30 -04:00
Jeff Brown
2d00872467 Merge "Throw if WAL enabled/disabled when connections are in use." 2012-03-21 18:30:50 -07:00
Jeff Brown
e67ca420e4 Throw if WAL enabled/disabled when connections are in use.
Changing WAL mode requires obtaining an exclusive lock on the
database and can only be done when there are NO other active
database connections.

Check that this is really the case, and bail with a useful
error message if an application attempts to change WAL mode while
transactions are in progress.

Expose disableWriteAheadLogging() in the API.

Change-Id: I87599de3b88c53dcd75677aefd72e40de216c2c1
2012-03-21 18:08:09 -07:00
Adam Powell
3004cc50f2 Add SeekBar property accessors to match available style attributes
Bug 6103624

Change-Id: I7bc863250f3b156cf6663e484baab2c35a949db5
2012-03-21 17:51:30 -07:00
Adam Powell
0b7413d5d6 GridView attribute updates
Bring GridView's API in sync with its supported style attributes.

Bug 6103758

Change-Id: Ib2c4d4d48061d23a7d886364965f0cb50c239e5d
2012-03-21 15:35:39 -07:00
Svetoslav Ganov
eb0b1da78f Merge "Revamp of the NumberPicker widget." 2012-03-20 12:14:37 -07:00
Svetoslav Ganov
d11e6151fe Revamp of the NumberPicker widget.
1. The number picker no longer shows up and down arrows, it
   has only three touch targets which are the currently selected number
   in the middle with a lesser one above and greater below, now what
   you touch is what you get, flingability and long press are still
   supported.

2. Removed the restriction for a View with an AccessibilityNodeProvider
   to not have any concrete children. If the View has a provider, then
   this provider is responsible for creating the AccessibilityNodeInfos
   for all its descendants, concrete and virtual. The number picker is
   a good example for such a case - it has a concrete input view and
   two virtual buttons as its children. This is a safe change since
   this behavior has not been released.

3. This patch also fixes bug where the number picker is stretched too
   much in the Theme theme.

bug:6177794
bug:5728294

Change-Id: I5fb370fe0b864a156f5f2aaf2de5f55f6b6d4e84
2012-03-20 12:13:06 -07:00
Fabrice Di Meglio
6077fc9b7f Merge "Reduce memory footprint for View" 2012-03-20 11:48:50 -07:00
Fabrice Di Meglio
edc1e59b34 Reduce memory footprint for View
- make layout direction use private bit fields
- fix also some Javadoc issues

Change-Id: I977a328d671b91aa82cb275767e3575f78695508
2012-03-20 11:45:36 -07:00
Svetoslav Ganov
52c1055462 Merge "Revert "Revamp of the NumberPicker widget."" 2012-03-19 20:03:45 -07:00
Svetoslav Ganov
efd1c67779 Revert "Revamp of the NumberPicker widget."
This reverts commit 912ab8506ae6409ee7fa0323b217fefaf0bd9771
2012-03-19 20:03:29 -07:00
Svetoslav Ganov
ca07bc1d35 Merge "Revamp of the NumberPicker widget." 2012-03-19 18:56:51 -07:00
Dianne Hackborn
7a2195cdd3 Start using the new activity options argument.
New class lets you make an options bundle defining a custom animation,
as an alternative to Activity.overridePendingTransition().

Change-Id: I8e209bf52398a98ab9f1bcafa1ec0a580dae57c0
2012-03-19 17:41:10 -07:00
Svetoslav Ganov
912ab8506a Revamp of the NumberPicker widget.
1. The number picker no longer shows up and down arrows, it
   has only three touch targets which are the currently selected number
   in the middle with a lesser one above and greater below, now what
   you touch is what you get, flingability and long press are still
   supported.

2. Removed the restriction for a View with an AccessibilityNodeProvider
   to not have any concrete children. If the View has a provider, then
   this provider is responsible for creating the AccessibilityNodeInfos
   for all its descendants, concrete and virtual. The number picker is
   a good example for such a case - it has a concrete input view and
   two virtual buttons as its children. This is a safe change since
   this behavior has not been released.

3. This patch also fixes bug where the number picker is stretched too
   much in the Theme theme.

bug:6177794
bug:5728294

Change-Id: Id8c0b3549174b9599f971d6e3086ca427cfbaa39
2012-03-19 13:02:22 -07:00
Jeff Brown
c0102b7a7d Merge "Port the SQLite locale setting code to Java." 2012-03-15 16:07:08 -07:00
Jeff Brown
1d9f742e00 Port the SQLite locale setting code to Java.
Make the database opening code more robust in the case of
read-only database connections.

Check whether a PRAGMA needs to be issues before doing it.
Mostly it's harmless but it can grab a transaction on the
database unnecessarily.

Change-Id: Iab2cdc96c785e767f82966b00597e19337163f2f
2012-03-15 16:02:58 -07:00
Selim Gurun
1cedb47e18 Merge "Make the credential storage change action public." 2012-03-15 14:55:15 -07:00
Romain Guy
a8bfeaf4f4 Cleanup ListView glow's optimized invalidates
Change-Id: Ie9759fd95366866512ec55072aa482f972650d15
2012-03-15 13:14:14 -07:00
Romain Guy
06298b0e2d Fix the build
Change-Id: Ic3694c295e578f7c089e698dbcebdff685a7968f
2012-03-14 17:37:40 -07:00
Marco Nelissen
467ec7eda8 Unhide MediaPlayer.setNextMediaPlayer
The Music apps are unbundled, so this needs to be unhidden for them to use it.

Change-Id: I24330a2d6cfa2f5fb5f9c282d28f5431b6165095
2012-03-14 14:49:02 -07:00
Dianne Hackborn
a4972e951b Add new "options" argument to all startActivity APIs.
This will be used to allow new features to be requested...  such as,
say, a special kind of animation.  Right now there are no options
defined.

Change-Id: I4eb6f27275cdd4bf186f6da316ab93a2372ad4b7
2012-03-14 12:57:14 -07:00
Philip Milne
b001475fc5 Merge "Fixes for bugs: #6103660, #6103957, #6104457 and #6104322." 2012-03-13 15:32:20 -07:00
Philip Milne
1018fb42cb Fixes for bugs: #6103660, #6103957, #6104457 and #6104322.
Add getters and setters to the layout widgets so as to mirror their XML apis.

Change-Id: Ie2237fd55e1c3e4ec0d08b4f8154ea7e122c1e79
2012-03-13 15:22:07 -07:00