8556 Commits

Author SHA1 Message Date
Glenn Kasten
e27002d77f resolved conflicts for merge of 1c92912b to lmp-dev-plus-aosp
Change-Id: I5a57218e81dff86f46af7067d47f7af816e2d12c
2014-10-02 10:19:12 -07:00
Glenn Kasten
6ba13ac566 Merge "AudioService: Fix monitorRotation for landscape applications" 2014-10-02 16:19:12 +00:00
Neil Fuller
f7cf5d43aa resolved conflicts for merge of ee665151 to lmp-dev-plus-aosp
Change-Id: I97671e62de26919e391dbb2686511584c59ab990
2014-10-02 11:48:08 +01:00
Sungsoo Lim
fc6581d718 am ee33c661: Merge "Update java doc for content rating systems" into lmp-dev
* commit 'ee33c661ef7055213a8e3d6d02240aab77a82756':
  Update java doc for content rating systems
2014-10-01 22:34:34 +00:00
Neil Fuller
33253a4baa Switch from FloatMath -> Math and Math.hypot where possible
The motivation is an API change: FloatMath is going to be
deprecated and/or removed. Performance is not the goal of
this change.

That said...

Math is faster than FloatMath with AOT compilation.

While making the change, occurances of:

{Float}Math.sqrt(x * x + y * y) and
{Float}Math.sqrt({Float}Math.pow(x, 2) + {Float}Math.pow(y, 2))

have been replaced with:

{(float)} Math.hypot(x, y)

Right now there is no runtime intrinsic for hypot so is not faster
in all cases for AOT compilation:

Math.sqrt(x * x + y * y) is faster than Math.hypot(x, y) with
AOT, but all other combinations of FloatMath, use of pow() etc.
are slower than hypot().

hypot() has the advantage of being self documenting and
could be optimized in future. None of the behavior differences
around NaN and rounding appear to be important for the cases
looked at: they all assume results and arguments are in range
and usually the results are cast to float.

Different implementations measured on hammerhead / L:

AOT compiled:

[FloatMath.hypot(x, y)]
benchmark=Hypot_FloatMathHypot} 633.85 ns; σ=0.32 ns @ 3 trials

[FloatMath.sqrt(x*x + y*y)]
benchmark=Hypot_FloatMathSqrtMult} 684.17 ns; σ=4.83 ns @ 3 trials

[FloatMath.sqrt(FloatMath.pow(x, 2) + FloatMath.pow(y, 2))]
benchmark=Hypot_FloatMathSqrtPow} 1270.65 ns; σ=12.20 ns @ 6 trials

[(float) Math.hypot(x, y)]
benchmark=Hypot_MathHypot} 96.80 ns; σ=0.05 ns @ 3 trials

[(float) Math.sqrt(x*x + y*y)]
benchmark=Hypot_MathSqrtMult} 23.97 ns; σ=0.01 ns @ 3 trials

[(float) Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2))]
benchmark=Hypot_MathSqrtPow} 156.19 ns; σ=0.12 ns @ 3 trials

Interpreter:

benchmark=Hypot_FloatMathHypot} 1180.54 ns; σ=5.13 ns @ 3 trials
benchmark=Hypot_FloatMathSqrtMult} 1121.05 ns; σ=3.80 ns @ 3 trials
benchmark=Hypot_FloatMathSqrtPow} 3327.14 ns; σ=7.33 ns @ 3 trials
benchmark=Hypot_MathHypot} 856.57 ns; σ=1.41 ns @ 3 trials
benchmark=Hypot_MathSqrtMult} 1028.92 ns; σ=9.11 ns @ 3 trials
benchmark=Hypot_MathSqrtPow} 2539.47 ns; σ=24.44 ns @ 3 trials

Bug: https://code.google.com/p/android/issues/detail?id=36199
Change-Id: I06c91f682095e627cb547d60d936ef87941be692
2014-10-01 14:04:15 +01:00
Sungsoo Lim
ee33c661ef Merge "Update java doc for content rating systems" into lmp-dev 2014-10-01 01:46:26 +00:00
Sungsoo Lim
d3f17921bd Update java doc for content rating systems
- DVB and ISDB ratings are added.
- Remove rating systems whose countries uses DVB and ISDB.
- Updated java doc for AR, AU, and BR.

Bug: 17494772
Change-Id: Ia2a63c7914148b42078decb8de1ae45baefb010d
2014-10-01 09:41:51 +09:00
Ruben Brunk
e06a3d8253 am b3c802f2: Merge "camera2: Use valid dimensions for RGBA8888 gralloc buffers." into lmp-dev
* commit 'b3c802f2381c3411fe753206ab89027f60164b77':
  camera2: Use valid dimensions for RGBA8888 gralloc buffers.
2014-09-30 22:09:18 +00:00
Ruben Brunk
0c79884076 camera2: Use valid dimensions for RGBA8888 gralloc buffers.
Bug: 17675571

- All of the mistakes were made.  Unmake them.

Change-Id: I23ff7a553347d4d9588c728219f4bf0604ba2e38
2014-09-30 13:54:20 -07:00
Ruben Brunk
469a55eddc am 6f34ad71: Merge "camera2: Fix native ImageReader test segfaults." into lmp-dev
* commit '6f34ad71cb00c7f4260dbf071422b334152a2cd1':
  camera2: Fix native ImageReader test segfaults.
2014-09-27 02:46:41 +00:00
Ruben Brunk
7b28c66a6c Merge "camera2: Fix native ImageReader test segfaults." into lmp-dev 2014-09-27 02:16:30 +00:00
Yao Chen
bcc4b6ccfd am 31f80f0f: Assign bindService() result to a boolean directly. One less if-else
* commit '31f80f0fddd2b59d3722dd73c942eaecf11e12c3':
  Assign bindService() result to a boolean directly. One less if-else
2014-09-27 02:01:20 +00:00
Marco Nelissen
39404c3c17 am 7e51102c: Merge "Validate MTP path" into lmp-dev
* commit '7e51102c02342ec2fe867f70d0cf3480b8f12809':
  Validate MTP path
2014-09-27 01:54:27 +00:00
Yao Chen
c8a3e0dc9d Assign bindService() result to a boolean directly. One less if-else
Bug: 17637058
Change-Id: If2f4db2ebf95f1912a752794a1ab482cf30ab014
2014-09-27 01:08:39 +00:00
Marco Nelissen
f8c4f9efcb Merge "Validate MTP path" into lmp-dev 2014-09-27 01:03:50 +00:00
Ruben Brunk
31798f3318 camera2: Fix native ImageReader test segfaults.
Bug: 17675571

- Check for JPEG footer in correct location from ImageReader
  when using the RGBA override.
- Add additional error checks in produceFrame method.
- Avoid allocating extra space for jpeg buffers due to
  incorrect width calculations.

Change-Id: I926f37e8b3e5c4bad24c16dcee48d52adb1706dd
2014-09-26 18:00:21 -07:00
Marco Nelissen
5f411696a6 Validate MTP path
Bug: 17673184
Change-Id: I51a64f065d9b3609557af81e596ebeb8720ab6c5
2014-09-26 16:07:49 -07:00
RoboErik
2da9e080aa am 55ecb483: Merge "Don\'t forward media keys to the app if the phone session is active" into lmp-dev
* commit '55ecb483ba3afdc46eb4bec5daea4e56a195df22':
  Don't forward media keys to the app if the phone session is active
2014-09-26 22:58:56 +00:00
RoboErik
de9ba39c17 Don't forward media keys to the app if the phone session is active
This checks if the phone app is currently getting or in a call when a
media key event is sent and sends it to the phone session instead of the
foreground app if it is.

bug:17527302
Change-Id: Ie5d6cf0c897da81d106f2b1a0561b79f4fc35e82
2014-09-26 14:53:06 -07:00
RoboErik
deadb32736 am cab05d54: Merge "Disable MediaSessionLegacyHelper debugging" into lmp-dev
* commit 'cab05d54baa53bc542fa35f33e612f2c41746307':
  Disable MediaSessionLegacyHelper debugging
2014-09-26 19:43:28 +00:00
RoboErik
9eb73b705d am c80873d5: Merge "Remove BT routes when BT is turned off" into lmp-dev
* commit 'c80873d5fa3976c5f6c238fdc98d67bc22cddb72':
  Remove BT routes when BT is turned off
2014-09-26 19:43:25 +00:00
RoboErik
2b731e7b7c Merge "Disable MediaSessionLegacyHelper debugging" into lmp-dev 2014-09-26 16:25:45 +00:00
RoboErik
9b2e567ad4 Merge "Remove BT routes when BT is turned off" into lmp-dev 2014-09-26 16:25:29 +00:00
Yao Chen
6f05ae578e am 86d77815: Merge "Check the return value of bindService, and notify media browser client onConnectionFailed if it returns false." into lmp-dev
* commit '86d778155f077d5af10f43d0eb7b04584559e793':
  Check the return value of bindService, and notify media browser client onConnectionFailed if it returns false.
2014-09-26 16:02:43 +00:00
Yao Chen
08fccd0093 Merge "Check the return value of bindService, and notify media browser client onConnectionFailed if it returns false." into lmp-dev 2014-09-26 15:55:52 +00:00
RoboErik
1dc5ba8665 Disable MediaSessionLegacyHelper debugging
Switched over to using Log.isLoggable instead for release.

Change-Id: Iebd6871adb9994e23292953f14b6a997c83957a0
2014-09-25 14:57:35 -07:00
RoboErik
5535ea8ef8 Remove BT routes when BT is turned off
A behavior change in the BT stack caused it to stop sending connection
changes for connected devices when you turn BT off. To work around this
we need to remove the connected BT route when BT is turned off.

bug:17512270
Change-Id: I3e5aa8863409c5abac51aa4e93a15f1978cf74b3
2014-09-25 14:57:35 -07:00
RoboErik
16404773d7 am 504752fb: Merge "Ensure MediaBrowser state is set to connecting after a reconnect" into lmp-dev
* commit '504752fb3833a90f4a226a2027939cb972cb8a9b':
  Ensure MediaBrowser state is set to connecting after a reconnect
2014-09-25 18:46:13 +00:00
RoboErik
96900279f5 am 23df1c46: Merge "Allow null queues to be set in MediaSession" into lmp-dev
* commit '23df1c46b768bb2a1363b6f671b0d0c4879538b7':
  Allow null queues to be set in MediaSession
2014-09-25 18:46:09 +00:00
RoboErik
f099e7c214 Merge "Ensure MediaBrowser state is set to connecting after a reconnect" into lmp-dev 2014-09-25 18:28:52 +00:00
RoboErik
df26651ff4 Merge "Allow null queues to be set in MediaSession" into lmp-dev 2014-09-25 18:28:21 +00:00
Ronghua Wu
ac1e24986c am ca7f391e: Merge "MediaCodecList: fix findEncoderForFormat." into lmp-dev
* commit 'ca7f391e2b04a9efc4beb5f5b769653a983ff424':
  MediaCodecList: fix findEncoderForFormat.
2014-09-25 00:27:44 +00:00
Lajos Molnar
22da05cb23 am 4e43a27a: Merge "MediaCodec: revalidate cached queued input buffers if queue fails (2)" into lmp-dev
* commit '4e43a27a9884e24ba47599597091176b772ddb24':
  MediaCodec: revalidate cached queued input buffers if queue fails (2)
2014-09-25 00:27:36 +00:00
Ronghua Wu
7e1d525b47 Merge "MediaCodecList: fix findEncoderForFormat." into lmp-dev 2014-09-25 00:23:03 +00:00
Ronghua Wu
e19a80def2 MediaCodecList: fix findEncoderForFormat.
Bug: 17460057
Bug: 17637188
Change-Id: I618ff1a4dbbecf64786207ccb5208b0a67d80ddd
2014-09-25 00:17:15 +00:00
Lajos Molnar
752c0e95d6 am aa1f0856: Merge "MediaCodec: revalidate cached queued input buffers if queue fails" into lmp-dev
* commit 'aa1f0856a144f2f2ba14c6358d633887e7e8b936':
  MediaCodec: revalidate cached queued input buffers if queue fails
2014-09-24 23:47:31 +00:00
Lajos Molnar
b15ed6337c MediaCodec: revalidate cached queued input buffers if queue fails (2)
Handle the other ways queueBuffer can fail.  Revalidate the buffers
properly, e.g. without clearing them.

Bug: 17630446
Change-Id: I22e0e89c2835eb6a461046a8cf3be03635088302
2014-09-24 16:44:47 -07:00
Lajos Molnar
7e28fc7370 Merge "MediaCodec: revalidate cached queued input buffers if queue fails" into lmp-dev 2014-09-24 23:40:56 +00:00
Ruben Brunk
bc167acc25 am 8acfdc7b: Merge "camera2: Hide JPEGs in RGBA gralloc buffers." into lmp-dev
* commit '8acfdc7bf6b8ee5250351723ab2eef28f2b71e51':
  camera2: Hide JPEGs in RGBA gralloc buffers.
2014-09-24 23:01:08 +00:00
Ruben Brunk
81ba98619b Merge "camera2: Hide JPEGs in RGBA gralloc buffers." into lmp-dev 2014-09-24 22:51:55 +00:00
Yao Chen
2354c5eb92 Check the return value of bindService, and notify media browser client
onConnectionFailed if it returns false.

Bug: 17637058
Change-Id: I2284c3a982e5ac6323f51ff7d98aae7699c695e5
2014-09-24 21:45:58 +00:00
RoboErik
88b84178d6 Ensure MediaBrowser state is set to connecting after a reconnect
When the binder had disconnected we were setting the state to suspended
and then not setting it back to connecting when we reconnected. This sets
the state correctly when we are trying to connect again.

bug:17593681
Change-Id: I3fe95fa23ba43ac2dc3692fd28309b2f8e5a3599
2014-09-24 14:35:32 -07:00
RoboErik
03fce072ca Allow null queues to be set in MediaSession
Also add some test code for it to OneMedia.

bug:17593962
Change-Id: I074e2bb0329d9a97f623e4309bb7dada157b8324
2014-09-24 14:35:32 -07:00
Lajos Molnar
00bbc7d9fa MediaCodec: revalidate cached queued input buffers if queue fails
For legacy behavior (using getInputBuffers) input buffer needs to
be made valid if queue fails.  Otherwise, it becomes unusable,
and the buffer still belongs to the user.

In the new model, buffers obtained by getIn/OutputBuffer will
become invalid even if queue/release fails.

We do not do the same logic for output buffers, as these should
not be accessed even if releaseBuffer fails (which really should not
happen anyway unless codec is in bad state).

Bug: 17630446
Change-Id: Ica72a168d8aea97a0ee3f3ef49c60d0ca5a9fa06
2014-09-24 14:12:08 -07:00
Ruben Brunk
9a417052be am e9858c6a: Merge "camera2: Update CamcorderProfile documentation." into lmp-dev
* commit 'e9858c6a5aefe2aec45a89204fab34246ff4448a':
  camera2: Update CamcorderProfile documentation.
2014-09-24 17:56:38 +00:00
Ruben Brunk
63c8e126e7 Merge "camera2: Update CamcorderProfile documentation." into lmp-dev 2014-09-24 17:54:18 +00:00
Ruben Brunk
0fd198ad89 camera2: Hide JPEGs in RGBA gralloc buffers.
Bug: 17379185

- WAR for SW Write usage flags being unavailable on
  certain devices for JPEG (blob) format buffers.

Change-Id: Ic7299785b743f35dd47264b9d1cea01a88b71d91
2014-09-24 10:43:12 -07:00
Ruben Brunk
27a845cf7c camera2: Update CamcorderProfile documentation.
Bug: 17447258

- Update documentation in CamcorderProfile for LEGACY
  mode video handling.

Change-Id: If65b93788a38ffe28caec053f81b9afa538c38a0
2014-09-24 06:59:53 +00:00
Eric Laurent
c1aa0838c8 am 337f4b98: am ee99d080: Merge "AudioRecord: add HW hotword capture flag" into lmp-dev
* commit '337f4b982e2405499270f4ea13abfa3cb221d3c6':
  AudioRecord: add HW hotword capture flag
2014-09-24 02:35:45 +00:00
Eric Laurent
c1823452ad Merge "AudioRecord: add HW hotword capture flag" into lmp-dev 2014-09-24 01:39:35 +00:00