111981 Commits

Author SHA1 Message Date
Daniel Sandler
dcbdd3b420 New sounds for K.
AudioPackage12 uses the new sounds (specifically the default
versions at 44.1kHz); device-specific makefiles can elect to
use the 48k versions instead by including
AudioPackage12_48.mk.

Bug: 9454760
Change-Id: If714fc4b98f6700163f08c92a6376f28f9616382
2013-09-18 23:09:58 -04:00
Craig Mautner
138685d9db Merge "Move flag for home launching from activity to task." into klp-dev 2013-09-18 19:46:53 +00:00
Raph Levien
c540f8e9d7 Merge "Revert "Take the input device into account for meta state"" into klp-dev 2013-09-18 19:44:16 +00:00
Jonathan Dixon
01fc088462 Merge "Update APIs for the Chromium WebView" into klp-dev 2013-09-18 19:14:09 +00:00
Craig Mautner
ae7ecab400 Move flag for home launching from activity to task.
The variable ActivityRecord.mLaunchHomeTaskNext was used to indicate
that the home task should be launched when the activity completed.
This only mattered when it was at the end of a task. As the activity
launched other activities within the same task it needed to be
migrated from activity to activity and task to task. This became
too complicated and was at the wrong level to begin with.

By moving the flag to TaskRecord.mOnTopOfHome the logic is simpler
and the results more predictable.

Fixes bug 10602256.

Change-Id: If0b752522b77be9918f1dba221d0ff670fc01af8
2013-09-18 11:48:14 -07:00
Raph Levien
3954fd9a05 Revert "Take the input device into account for meta state"
This reverts commit 8a1597b39632956cdbcb6b76874ccca786047d4c. That
commit broke some of the handling of meta state, which in turn caused
CTS test failures, notably bug 10210151 (CTS:
android.text.method.cts.BaseKeyListenerTest#testBackspace_withSendKeys
is failing on KLP).

So this revert fixes those test failures, but leaves bug 8303489
(Pressing shift on the hardware keyboard messes with unrelated
keypresses, including virtual ones) still present. We'll plan to
address that in a future release.

Change-Id: Iea42c643b6d08f33cbd2ed1747e8de3b5f8116a6
2013-09-18 11:03:02 -07:00
Amith Yamasani
840b3bd611 Merge "Fix provider leak in PFD" into klp-dev 2013-09-18 18:01:21 +00:00
Martijn Coenen
807fd04435 Merge "Validate AID format and length." into klp-dev 2013-09-18 17:56:03 +00:00
Chet Haase
d73d34c873 Merge "Use transition-only alpha property for fading transitions" into klp-dev 2013-09-18 17:51:34 +00:00
Leon Scroggins III
3490228efb Merge "Use a native buffer for decoding images." into klp-dev 2013-09-18 17:50:56 +00:00
Zhijun He
bf143ff195 Merge "ImageReader: disable NV21 support" into klp-dev 2013-09-18 17:49:30 +00:00
Chet Haase
4fa809fe74 Merge "Fix leak fix in ViewTreeObserver" into klp-dev 2013-09-18 17:48:38 +00:00
Zhijun He
4eda9f5359 ImageReader: disable NV21 support
Bug: 10787131
Change-Id: I5ff0a67144b5ec49eabde6129423a41c9597c2b8
2013-09-18 10:30:50 -07:00
Lajos Molnar
b84624571b Merge "Misc. media API changes" into klp-dev 2013-09-18 17:20:08 +00:00
Lajos Molnar
e23ce3b1fc Merge "Add CaptioningManager listener Subtitle support." into klp-dev 2013-09-18 16:46:39 +00:00
Amith Yamasani
487c11a310 Fix provider leak in PFD
Code path to release content provider associated with the PFD was
inadvertently bypassed by a previous change. Reinstate that code
when closing the PFD.

Bug: 10767447
Change-Id: I23306cfb3c28c99e587892b17ca85efd3f7a8a07
2013-09-18 09:30:43 -07:00
Leon Scroggins III
7315f1baee Use a native buffer for decoding images.
Fixes BUG:10725383

Depends on https://googleplex-android-review.git.corp.google.com/#/c/357300/
in external/skia.

In the previous fix for BUG:8432093 and BUG:6493544
(https://googleplex-android-review.googlesource.com/#/c/346191/),
instead of calling mark on the provided input stream, we
copied the entire stream in native code (except in one case;
more details below), allowing rewind no matter how much of
the stream had been read. This was because two decoders
may rewind after reading an arbitrary amount of the stream:
SkImageDecoder_wbmp and SkImageDecoder_libjpeg.

It turns out that the jpeg decoder does not need this rewind
after arbitrary length (it is a failure recovery case, and
libjpeg has a default recovery we can use - the above referenced
CL in Skia uses the default).

Although the wbmp decoder could read any amount given a
stream with the "right" data, and then return false, such a
stream would not be a valid stream of another format, so it
is okay for this rewind to fail.

Further, the previous fix was inefficient in the common case
where the caller decodes just the bounds, resets, then decodes
the entire image (since we have copied the entire stream twice).
The copy also resulted in the crashes seen in BUG:10725383.

In this CL, buffer only the amount of input needed by
SkImageDecoder::Factory to determine the type of image decoder
needed. Do not mark the input stream provided by the caller,
so their mark (if any) can remain in tact. The new Skia class
SkFrontBufferedStream allows buffering just the beginning
of the stream.

core/jni/android/graphics/BitmapFactory.cpp:
Instead of calling GetRewindableStream (which has been removed),
call CreateJavaInputStreamAdaptor. Then wrap it in an
SkFrontBufferedStream, with a large enough buffer to determine
which type of image is used.

core/jni/android/graphics/CreateJavaOutputStreamAdaptor.h:
core/jni/android/graphics/CreateJavaOutputStreamAdaptor.cpp:
Remove mark, markSupported, and rewind. CreateJavaInputStreamAdaptor
now turns an SkStream which is not rewindable. If the caller
needs rewind that needs to be handled differently (for example,
by using SkFrontBufferedStream, as is done in BitmapFactory and
Movie.
Remove RewindableJavaStream and GetRewindableStream.
Remove code specific to ByteArrayInputStream, which makes slow
JNI calls. Instead, depend on the caller to buffer the input
in the general case. There is no reason to special case this
stream (especially since we already have decodeByteArray).
Remove CheckForAssetStream, which is now always special cased
in Java.

core/jni/android/graphics/Movie.cpp:
Call CreateJavaInputStreamAdaptor and use an SkFrontBufferedStream.
Add a native function for decoding an Asset, and remove old
call to CheckForAssetStream.

graphics/java/android/graphics/BitmapFactory.java:
Write a helper function for decoding a stream to consolidate
common code.
Buffer enough of the input so that SkImageDecoder::Factory
can rewind after having read enough to determine the type.
Unlike the old code, do NOT mark the caller's stream. This is
handled in native code. The caller's mark (if any) is left alone.

graphics/java/android/graphics/Movie.java:
Check for an Asset stream before passing to native, and
call a native function for handling the asset directly.

BUG:6493544
BUG:8432093
BUG:10725383

Change-Id: Ide74d3606ff4bb2a8c6cdbf11bae3f96696f331a
2013-09-18 12:01:20 -04:00
Chet Haase
c46181a963 Use transition-only alpha property for fading transitions
The original bug is fixed already, but showed up some problems in
the underlying fade-transition implementation. This fix addresses
those and other issues. The biggest part of the change should help
transition robustness in general, as it removes the dependency on the
public 'alpha' property of views and uses, instead, a new hidden property
on views called 'transitionAlpha'. This is a value which is normally
opaque (1), but which can be used by transitions (only) to animate the
translucency of views without disturbing the actual 'alpha' value which
might be manipulated outside of transitions. This should make transitions
much more robust in general.

In implementing and testing this overall fix, I noticed a couple of things
about transitions that were simply wrong (such as starting fades from the
wrong start value, and incorrectly avoiding transitions on some views
that didn't happen to have ids), and those are fixed in this CL as well.

Issue #10726905 ActionBar weirdness in People app
Issue #10727937 Menu items in gallery appear in faded color after selecting an image/album by long press

Change-Id: If1618446db10c1bfcff4761449241de4f559afc1
2013-09-18 08:55:47 -07:00
Chet Haase
fc343967c8 Fix leak fix in ViewTreeObserver
The leak fix of the CopyOnWriteArray in ViewTreeObserver was
too aggressive, always clearing the shadow copy when it should only
have cleared it when needed. The way it works now, we will always
clear the listeners for ViewTreeObserver after the listeners
are processed.

Issue #10815924 ViewTreeObserver leak fix too aggressive

Change-Id: Iff0095d73beb38e52b0a5ae6b6378afec4458fd3
2013-09-18 08:44:33 -07:00
Martijn Coenen
fca3578773 Validate AID format and length.
Bug: 10817001
Change-Id: I7cb0d4f718c467d2fccb30068f383f8e71a4a39b
2013-09-18 17:26:18 +02:00
Alan Viverette
c255a7113a Merge "Ensure WeeksAdapter calls notifyDataSetChanged when needed" into klp-dev 2013-09-18 06:03:34 +00:00
Jonathan Dixon
5545d083d3 Update APIs for the Chromium WebView
Bug: 10361803
Bug: 8565831

Several obsolete APIs now deprecated.
TEXT_AUTOSIZING can now be unhidden.

Change-Id: Ib0afa4bb010f35816d3b9dd3695e8997f0ff0793
2013-09-17 20:47:10 -07:00
Jesse Hall
11c9201240 Merge "Fix ImageReader onImageAvailable synchronization" into klp-dev 2013-09-18 03:32:17 +00:00
Jean-Michel Trivi
f841d70155 Fix javadoc in RemoteControlClient and MediaMetadataEditor
Change-Id: Ibd333d9cb47e74c4ca1d8ec7bd950224d81783b0
2013-09-17 19:13:55 -07:00
Lajos Molnar
8a39021dfa Misc. media API changes
- MediaCodec.setParameter signature to take android.os.Bundle
- PARAMETER_KEY_VIDEO_BITRATE value
- comments for MediaFormat.KEY_LANGUAGE and createSubtitleFormat

Change-Id: I092e9830cb21df08b331854cbd28c758db06bc10
Signed-off-by: Lajos Molnar <lajos@google.com>
Bug: 10461617
2013-09-17 19:05:37 -07:00
Jean-Michel Trivi
15bcc323cb Merge "RemoteController class to expose IRemoteControlDisplay features" into klp-dev 2013-09-18 01:51:17 +00:00
Chris Craik
ce9ee16d65 Merge "Conservatively estimate geometry bounds" into klp-dev 2013-09-18 01:50:02 +00:00
Chris Craik
a42ceb03cf Merge "Disallow negative scale matrices in merged Bitmap drawing" into klp-dev 2013-09-18 01:49:32 +00:00
Jean-Michel Trivi
7ddd226e7c RemoteController class to expose IRemoteControlDisplay features
Wrap all the features of IRemoteControlDisplay.aidl in a
 new class, RemoteController, that implements the
 IRemoteControlDisplay interface.

The API functions to expose in the SDK are tagged with
 "CANDIDATE FOR API"

Bug 8209392

Change-Id: I597bcd503ac93e73889c9ae8b47b16c4fcb363bc
2013-09-18 01:47:25 +00:00
Jesse Hall
c395fffd90 Fix ImageReader onImageAvailable synchronization
This avoids a race where close() can return while there are still
onImageAvailable callbacks pending.

Bug: 10666923
Change-Id: Ic519b68f3132ceb7f95a9a42ebd1032c1638fbf5
2013-09-17 18:21:30 -07:00
Zhijun He
9b6459841e Merge "Camera2: Add docs for availableProcessedSizes" into klp-dev 2013-09-18 01:01:32 +00:00
Chris Craik
32f05e343c Conservatively estimate geometry bounds
bug:10761696

Avoids a case where a rect with top coordinate of (e.g.) 0.51f is
assumed to not draw in the first row of pixels, which leads to it not
being clipped. Since rounding can cause it to render in this first
pixel anyway, we very slightly expand geometry bounds.

Now, in ambiguous cases, the geometry bounds are expanded so clipping
is more likely to happen.

Change-Id: I119b7c7720de07bac1634549724ffb63935567fc
2013-09-17 17:48:14 -07:00
Justin Mattson
904aa38f1a Merge "Try fixing the build again" into klp-dev 2013-09-18 00:35:12 +00:00
Dianne Hackborn
222920c460 Merge "Maybe fix issue #10797796: IllegalStateException in ProcessState..." into klp-dev 2013-09-18 00:34:02 +00:00
Dianne Hackborn
53459a7020 Maybe fix issue #10797796: IllegalStateException in ProcessState...
...caused runtime restart

There were some situations where the package list could be set
with process stats when it shouldn't.  Not sure if this is causing
the problem, since there is no repro.

Also some improvements to debug output -- new commands to clear
all stats, print full details of stats, and print a one-day
summary (which should match what the UI shows).

Change-Id: I9581db4059d7bb094f79f2fe06c1ccff3e1a4e74
2013-09-17 17:30:34 -07:00
petergng@google.com
24873be6ee Merge "Make touch states neutralized by replacing default pressed states for most fw widgets" into klp-dev 2013-09-18 00:26:35 +00:00
Alan Viverette
84c5ade823 Merge "Fix vertical scroll computation in NumberPicker" into klp-dev 2013-09-18 00:21:38 +00:00
Justin Mattson
b0da450556 Try fixing the build again
Change-Id: I4b4daae3e290e3548d2bb9c122a8f576c4050994
2013-09-17 17:18:29 -07:00
Mindy Pereira
09804e41da Merge "Add isQuickScaleEnabled to ScaleGestureDetector" into klp-dev 2013-09-17 23:57:54 +00:00
Matthew Xie
c9d1d5f350 Adjust absolute volume only when the device is streaming music
The device has to be A2DP device
Remove AudioManager#avrcpUpdateVolume
bug 10681804

Change-Id: I2bc85e48fdff374638b984af593c6f1c4ddd3ee6
2013-09-17 23:48:19 +00:00
Craig Mautner
019f8cb8a7 Merge "Add bounds checks before accessing ArrayList." into klp-dev 2013-09-17 23:13:31 +00:00
Craig Mautner
dccb770b84 Add bounds checks before accessing ArrayList.
Add a test for emptiness before accessing either mTaskHistory[0] or
TaskRecord.mActivities[0]. This will keep us from hitting
IndexOutOfBoundsException.

Fixes bug 10789624.

Change-Id: If726df888a2c8b393788793b6220a6bffe2df883
2013-09-17 15:53:34 -07:00
Jeff Sharkey
e48569a870 Merge "Guard against null Context in attachInfo()." into klp-dev 2013-09-17 22:38:18 +00:00
Jean-Michel Trivi
f03ceff2f5 Merge "Revise new public API for ratings in RemoteControlClient" into klp-dev 2013-09-17 22:35:08 +00:00
Jeff Sharkey
10cb312ecd Guard against null Context in attachInfo().
Some CTS tests were running into this.

Bug: 10805216
Change-Id: I425d2a0064612af70a64f457e159498cb6257a28
2013-09-17 15:18:43 -07:00
David Braun
345d491b77 Merge "Implement new method for handling SMS/MMS on the platform" into klp-dev 2013-09-17 22:14:54 +00:00
Craig Mautner
bc65c1dbcc Merge "Do not assign InputMethod to non-input windows." into klp-dev 2013-09-17 22:13:10 +00:00
Jean-Michel Trivi
88183e67d4 Revise new public API for ratings in RemoteControlClient
Refactor RemoteControlClient.MetadataEditor to move functionality
 in new abstract class MediaMetadataEditor, so it can be also
 used on the "display" side of the RemoteControl functionality.
Compatibility of these changes has been tested against
 existing Play applications which use the RemoteControlClient API.

Move the new constants and method definitions related to the
 ratings feature to MediaMetadataEditor. This changes the
 yet-to-be-published ratings API, so this doesn't break
 compatibility.
Rating feature is handled by the new Rating class with a set
 of constructors that handle the different rating models.

Bug 8440498

Change-Id: I9b6dc2204bfc48594bad5cd6449d357f8a485da0
2013-09-17 15:13:00 -07:00
Svetoslav
a245a4f14e Merge "Update the APIs to fix the build" into klp-dev 2013-09-17 21:58:35 +00:00
Brian Colonna
4811398bfd Merge "Fix 10550373: Stopping FUL when emergency dialer opens" into klp-dev 2013-09-17 21:58:05 +00:00