5155 Commits

Author SHA1 Message Date
Chet Haase
138c58a941 Merge "Add overlays to views" into jb-mr2-dev 2013-03-18 14:29:06 +00:00
Dianne Hackborn
1545d7c5f7 am 5e2552bd: am d468df73: Merge "Fix a bug where we could lose a loader content change." into jb-mr2-dev
* commit '5e2552bd16ae09da826270363ac0f3f56af91922':
  Fix a bug where we could lose a loader content change.
2013-03-15 23:14:17 +00:00
Dianne Hackborn
d468df73d5 Merge "Fix a bug where we could lose a loader content change." into jb-mr2-dev 2013-03-15 23:10:47 +00:00
Chet Haase
91cedf1c3d Add overlays to views
It is useful, particularly in animations, to be able to add a view, or at
least some graphics, on top of a view. For example, to have a child of a layout
fade away, we might want to remove the child from that layout and then fade it out
gradually. Meanwhile, we have to have a place to put that view where it will be
drawn. We could do this in the content container sometimes, but this is not a
reliable workaround in the general case, and may obscure other siblings/parents of
the layout/view in the hierarchy. A better approach would be to place a view/graphic
temporarily in the layout itself.

This feature adds the ability to add one or more Views and Drawables to an "overlay"
layer, after which the view will handle drawing that extra content when it redraws itself.

Issue #8350510 Add APIs needed for future animation capabilities

Change-Id: I70bf78c46ee3db8bd87ea1cdc2ecb5c0747ccbf9
2013-03-15 15:53:31 -07:00
Dianne Hackborn
ca614f78be Fix a bug where we could lose a loader content change.
If AsyncTaskLoader starts a background update due to a
content change, and that update is cancelled, we drop the
data when it finally arrives and forget that the content changed.
If we later come back to the loader, we then end up showing
stale data because we don't know that we still need to update
due to the old content change.

This change adds a couple new APIs to Loader to deal with the
time between when you ask for whether there is a content change
and finally either commit the data or cancel the update.
AsyncTaskLoader is changed to make use of this so that it doesn't
lose changes.

Change-Id: I3866236b1c22bb9138f2d9f6032b126aeaee2e6e
2013-03-14 19:17:00 -07:00
Jaikumar Ganesh
1aab1dbca5 Revert "Add new sensor types."
This reverts commit bc03a348d78326dee779a8ecc325799c9fceac98.
2013-03-13 15:00:21 -07:00
Bjorn Bringert
133e2db873 Merge "Hide VOICE_ASSIST intent DO NOT MERGE" into jb-mr2-dev 2013-03-13 13:28:01 +00:00
Shawn Pearce
d665b49518 Merge "Add new sensor types." into jb-mr2-dev 2013-03-12 23:01:53 +00:00
Bjorn Bringert
964e7d2549 Hide VOICE_ASSIST intent DO NOT MERGE
Bug: 8289964
Change-Id: I49874f379647ff4e85402a298b4181923212a0aa
2013-03-12 19:35:57 +00:00
Yorke Lee
4f401ebf14 Add new apis to CP2
Add Data.Contactables.CONTENT_URI and CONTENT_FILTER_URI
Add VISIBLE_CONTACTS_ONLY boolean parameters to Data

Bug: 8123918

Change-Id: I8cef7a66d4ab0b910cba7feb158ec007f318f5a8
2013-03-12 11:05:03 -07:00
Jaikumar Ganesh
bc03a348d7 Add new sensor types.
1. Add uncalibrated gyros and magnetic field sensor.
2. Change max number of events from 3 to 16.
3. Add new APIs for trigger sensors.

Change-Id: I1957d723de2b65c31dadaee7386fd8d51ea2f7e5
2013-03-12 10:50:41 -07:00
Jean Chalard
8a1597b396 Take the input device into account for meta state
Interesting nits about this:
- getMetaState(long) and getMetaState(long, int) do not
  seem to be used anywhere in the framework. Maybe we
  want to skip adding getMetaState(long, KeyEvent) and
  getMetaState(long, int, KeyEvent).
- getMetaState(CharSequence, int) is used extensively
  throughout the code. In some places, a KeyEvent is
  available and should be considered - this change does
  implement this. In many other cases, there is no
  relevant KeyEvent for this action (for example,
  Editor#extractTextInternal). In these cases, the
  behavior is affected by the current latch state, so
  it's fine to leave them as is.

Bug: 8303489

Change-Id: I4a948c497c49e48f83ba1048520e7fe5bfe84727
2013-03-12 20:36:29 +09:00
Michael Wright
607dcedaa6 am 63530ed8: am b13eb3e7: Merge changes I674b9804,If2d2e37b into jb-mr2-dev
* commit '63530ed8dad1ca77d5f9d20f2af7317611cdd175':
  Add touch navigation input source
  Add InputDevice#isFromSource convenience method
2013-03-12 01:09:01 +00:00
Michael Wright
e7a9ae8ba0 Add touch navigation input source
Bug: 8276741
Change-Id: I674b9804bf9ae76d694ae7073b54a7d43474a43c
2013-03-11 17:58:22 -07:00
Michael Wright
74e4156e5c Add InputDevice#isFromSource convenience method
Change-Id: If2d2e37bc3fff5a862ea3652c7ef9778018e7ecc
2013-03-11 16:02:51 -07:00
ztenghui
ec509edfa6 am 8313ba36: am 8c63487f: Merge "Java API for MediaMuxer" into jb-mr2-dev
* commit '8313ba36b0186dd93c481cd85418d3e78b33e6ed':
  Java API for MediaMuxer
2013-03-11 21:52:42 +00:00
ztenghui
68ccf103a1 Java API for MediaMuxer
Implement the Java API for MediaMuxer.

bug:7991013

Change-Id: Ibf3aa256cc1d89f1c7636b74c9fb53073d173636
2013-03-11 12:30:56 -07:00
Elliott Hughes
a850a3a87e am b9230f3c: am d6875e33: am 2cb314eb: am e0cd3c19: Merge "Improve DateFormat.format."
* commit 'b9230f3c312068bf603f8657db8e818f6a78ddc4':
  Improve DateFormat.format.
2013-03-09 00:23:40 +00:00
Elliott Hughes
d6875e3334 am 2cb314eb: am e0cd3c19: Merge "Improve DateFormat.format."
* commit '2cb314ebc7bb6495a94f577dfb57f9e6c56033ef':
  Improve DateFormat.format.
2013-03-08 16:21:21 -08:00
Chet Haase
fbde30877f Merge "add getAlpha() to Drawable" 2013-03-08 23:52:33 +00:00
Amith Yamasani
f2ac737a40 am 36047905: am 515b51f8: Merge "Make account cloning API public" into jb-mr2-dev
* commit '36047905ed42561bf88e27aa2a6b3b5199459d61':
  Make account cloning API public
2013-03-08 23:41:29 +00:00
Chet Haase
b1af7f3d4b add getAlpha() to Drawable
Drawable has setAlpha(int), but no getAlpha() (although some subclasses have added the
method). This makes it more tedious to use the property. For example, animations that wish to
animate this property must explicitly give it a start value since this value cannot be queried
from the object.

The trick is that setAlpha(int) is abstract, only implemented by subclasses. We cannot take this
approach for getAlpha(), as we would break all subclasses of Drawable until they implemented the
method. Instead, we'll add a default method which returns an invalid value, making it easier for
clients of the method to detect whether the value is valid.

All subclasses of Drawble in frameworks have been changed to add an override of getAlpha() when
appropriate.

Issue #7485875 Drawables is missing getAlpha()

Change-Id: I06b6e35f1a56d202838eca44759c85c82595020a
2013-03-08 15:40:28 -08:00
Amith Yamasani
c8a1ff4036 Make account cloning API public
Change-Id: If48d93dab49afcaaa301a5a3aa514f3d4dd3bab8
2013-03-08 15:29:55 -08:00
Elliott Hughes
8326b9a429 Improve DateFormat.format.
Add support for the 'c' format character, required in many non-English locales.
Reimplement 'c' and 'E', and 'L' and 'M', so they correctly interpret 5-count
pattern characters.

Replace the old incorrect class documentation with a pointer to the
well-maintained libcore equivalent and the Unicode UTS to which these two
implementations are supposed to conform.

Deprecate the useless constants for pattern characters. No one sane is going
to write MONTH + MONTH + MONTH + MONTH instead of "MMMM".

Correct the documentation for getLongDateFormat and getMediumDateFormat.

Also fix DateUtils.getStandaloneMonthString for LENGTH_SHORTEST.

Tests are in https://android-review.googlesource.com/53291.

Change-Id: I4dda8b18070f05ccdc11c1f0a9381a9d233db4e8
2013-03-08 15:06:14 -08:00
Chet Haase
9f48f3eeae Revert "add getAlpha() to Drawable"
This reverts commit a227f59691246d23e47531de4dcdaa01f94b8875

Change-Id: Ic6337b773a2a2302d9d3f84fa9ff9c2324edd2ae
2013-03-08 23:00:02 +00:00
Chet Haase
a227f59691 add getAlpha() to Drawable
Drawable has setAlpha(int), but no getAlpha() (although some subclasses have added the
method). This makes it more tedious to use the property. For example, animations that wish to
animate this property must explicitly give it a start value since this value cannot be queried
from the object.

The trick is that setAlpha(int) is abstract, only implemented by subclasses. We cannot take this
approach for getAlpha(), as we would break all subclasses of Drawable until they implemented the
method. Instead, we'll add a default method which returns an invalid value, making it easier for
clients of the method to detect whether the value is valid.

All subclasses of Drawble in frameworks have been changed to add an override of getAlpha() when
appropriate.

Issue #7485875 Drawables is missing getAlpha()

Change-Id: I3211bb03789282e010356bad92da0a4a9fe9afb3
2013-03-08 14:16:13 -08:00
Andy McFadden
ecda86cebc am fe8b6efb: am dd3e75fa: Merge "Publish new MediaCodec API" into jb-mr2-dev
* commit 'fe8b6efbb44476b28b0d8ea3d6cd405d5fbea770':
  Publish new MediaCodec API
2013-03-08 01:55:12 +00:00
Andy McFadden
dd3e75fa6b Merge "Publish new MediaCodec API" into jb-mr2-dev 2013-03-08 01:50:00 +00:00
Andy McFadden
34f17dd1f6 Publish new MediaCodec API
Un-hide two new methods in MediaCodec, one new constant, and a new
EGL extension.

Bug 7991062
Bug 8191230

Change-Id: I028669132d9ffda1e4b34a561bab3997bbd7dae5
2013-03-07 14:20:46 -08:00
Jeff Brown
cbf4cd73a3 am 7987082e: am 3afc18af: Enhance MediaRouter API.
* commit '7987082ecdcbe5a9e7ca5e0e89e9e30985611dd6':
  Enhance MediaRouter API.
2013-03-07 22:04:09 +00:00
Jeff Brown
3afc18af2c Enhance MediaRouter API.
The support library MediaRouter implementation needs a couple
of extra generally useful APIs in the platform MediaRouter to ensure
that it can safely synchronize its state.

Change-Id: I72c5652e10f3b6de48800abfa922affbefbd250f
2013-03-07 13:26:40 -08:00
Glenn Kasten
7003ffdd43 Merge "Subclassing AudioTrack considered harmful" 2013-03-05 23:11:35 +00:00
Dianne Hackborn
ee61a7fb95 am 530b2b1c: am a5513616: Merge "Add new WindowId for cross-process monitoring of focus." into jb-mr2-dev
* commit '530b2b1c98e3a3d86fd90cd91a08005370b8aa49':
  Add new WindowId for cross-process monitoring of focus.
2013-03-05 21:08:13 +00:00
Dianne Hackborn
07a55b376c Merge "Welcome, Key Lime Pie." 2013-03-05 19:50:54 +00:00
Dianne Hackborn
5d2bfa1604 Welcome, Key Lime Pie.
Change-Id: I00ebaffda975b368aa5f727963899e80a233c744
2013-03-05 10:28:34 -08:00
Dianne Hackborn
a55136169e Merge "Add new WindowId for cross-process monitoring of focus." into jb-mr2-dev 2013-03-05 17:37:43 +00:00
Dianne Hackborn
e3f23a36d8 Add new WindowId for cross-process monitoring of focus.
This is a class representing a window and providing limited
interaction with it, which can be handed across processes.

Change-Id: I22885f2064a9cc8c68d690a5858c2e28bbb6a0f3
2013-03-05 09:33:48 -08:00
Philip Milne
211d03322c Provide (general) mecahnism for users of GridLayout to either suppress or react to diagnostics.
GridLayout uses a constraint solver to perform its layout operation. Some layout problems
result in systems of constraints that are inconsistent and so cannot be solved. GridLayout
detects this condition and makes corrections so as to always guarantee that the layout
operation will complete. In those cases where corrections are made, GridLayout issues a
warning to the Log. This CL allows (internal) clients of GridLayout to both swtich off
the logging and/or detect when this condition is encountered.

Change-Id: I5b871003381f81cf0a76ad3de767e7f8b8349923
2013-03-04 16:40:30 -08:00
Derek Sollenberger
6eeb41cf21 am cdac4972: Deprecate read/write Pictures to streams.
* commit 'cdac497289fd2c39a352f6167dae3f77cc608cb8':
  Deprecate read/write Pictures to streams.
2013-03-04 15:24:42 +00:00
Derek Sollenberger
cdac497289 Deprecate read/write Pictures to streams.
bug: 8241089
Change-Id: I435a534f5110cb2b8aba87c047b509020a22fd67
2013-03-04 10:10:15 -05:00
Bjorn Bringert
8d628f0c69 am bc086862: Declare VOICE_ASSIST intent
* commit 'bc086862e216bbe8ffc2dfb68f09a872505d9d48':
  Declare VOICE_ASSIST intent
2013-03-01 17:21:32 +00:00
Bjorn Bringert
bc086862e2 Declare VOICE_ASSIST intent
Bug: 8289964
Change-Id: I241b5166a98a7a462691f0169bf1b6f4fe7b2e0f
2013-03-01 12:59:24 +00:00
Jonathan Dixon
ea48c442be am 0af1c597: Merge "Deprecate various WebView related methods" into jb-mr2-dev
* commit '0af1c59762d0cad2ef9755b15217a253cbb32005':
  Deprecate various WebView related methods
2013-02-28 22:39:00 +00:00
Jonathan Dixon
0af1c59762 Merge "Deprecate various WebView related methods" into jb-mr2-dev 2013-02-28 22:11:36 +00:00
Jonathan Dixon
835b1fcc31 Deprecate various WebView related methods
WebSettings:
PluginState - plugins depreacted and will not be supported in future.
setRenderPriotity - b/6335436
setLightTouchEnabled - b/7683972 it's s no-op.
setAppCacheMaxSize - has a sensible default and will  be obsolete in
                     future with HTML Quota Management API. b/6236763

WebStorage.setQuotaForOrigin - same as setAppCacheMaxSize

WebView:
clearView, showFindDialog - buggy, can be achieved otherways
savePassword - not useful/usable in practice; see b/5012826
             - stock browser used hidden APIs to achieve this feature

WebIconDatabase:
Other than the open() method, this does nothing useful. b/7331507

Change-Id: I01793f7b34978046eb54033477fca2da96e69c2e
2013-02-28 13:01:48 -08:00
Ian Rogers
0664d95090 am 0493d799: am 75dcb333: am 545464df: Merge "Deprecate and document memory allocation counting."
* commit '0493d7997e22376524d707e407662d0f98f40c47':
  Deprecate and document memory allocation counting.
2013-02-27 23:22:44 +00:00
Ian Rogers
0493d7997e am 75dcb333: am 545464df: Merge "Deprecate and document memory allocation counting."
* commit '75dcb3338d85d12991249598e1ed407c8a6be1eb':
  Deprecate and document memory allocation counting.
2013-02-27 16:53:20 +00:00
Alon Albert
f2624bf7cd am 174ea7d1: Merge "Document extra account_types" into jb-mr2-dev
* commit '174ea7d1a72d9e666c95c5ee3ecccdb62967db82':
  Document extra account_types
2013-02-26 23:22:21 +00:00
Alon Albert
50359c26e7 Document extra account_types
The action android.settings.ADD_ACCOUNT_SETTINGS supports an extra
"account_types" (See AddAccountSettings & ChooseAccountActivity) but
that's not documented anywhere.
Oddly, the other 2 places that support the "authorities" extra do not
also support "account_types".

Change-Id: I99b7be0b0d6fff1cbccdf8b8b8e4fd2be9548e6c
2013-02-26 14:54:07 -08:00
Ian Rogers
fe067a4cc5 Deprecate and document memory allocation counting.
Bug: 8241521
Change-Id: I174c4024600c5b78e74030ecc99e784a98295f09
2013-02-26 13:30:08 -08:00