8568 Commits

Author SHA1 Message Date
Jean-Michel Trivi
5d0ac1907b am 993b533a: am 63b6d3ed: am 986468a8: am dce7a427: Merge "Full volume on remote submix for apps that need it" into lmp-dev
* commit '993b533a609ee72ebb3b99284953f8c801d5f2cf':
  Full volume on remote submix for apps that need it
2014-10-07 18:02:21 +00:00
Jean-Michel Trivi
63b6d3ed1d am 986468a8: am dce7a427: Merge "Full volume on remote submix for apps that need it" into lmp-dev
* commit '986468a8ab77ce1e89247078d4e93a3aaa5d294b':
  Full volume on remote submix for apps that need it
2014-10-07 17:42:58 +00:00
Jean-Michel Trivi
986468a8ab am dce7a427: Merge "Full volume on remote submix for apps that need it" into lmp-dev
* commit 'dce7a427593c6e11277d9e3075ab027512923276':
  Full volume on remote submix for apps that need it
2014-10-07 17:33:05 +00:00
Jean-Michel Trivi
ba5270b887 Full volume on remote submix for apps that need it
If an AudioRecord is created with the "fixedVolume" tag
  when recording from REMOTE_SUBMIX, treat the
  device DEVICE_OUT_REMOTE_SUBMIX as a fixed full volume
  device during the recording. Also register a death
  handler during the recording.
  Otherwise this is a no-op.

Bug 17635294

Change-Id: I8d26fe777047126f34308e1e1b7ac28ba269ad89
2014-10-07 09:09:41 -07:00
Benson Huang
6ad95c301c am 37fa980c: am 1e62e476: am ce4483cb: [FM] Add FM_TUNER audio source to support L version FM radio app
* commit '37fa980c55c1b5fab84110eb0355cffbae74a692':
  [FM] Add FM_TUNER audio source to support L version FM radio app
2014-10-06 19:03:38 +00:00
Benson Huang
1e62e476fa am ce4483cb: [FM] Add FM_TUNER audio source to support L version FM radio app
* commit 'ce4483cb83afb3a42a32ef2cb00cf04d6f9018fd':
  [FM] Add FM_TUNER audio source to support L version FM radio app
2014-10-06 18:54:19 +00:00
Benson Huang
ce4483cb83 [FM] Add FM_TUNER audio source to support L version FM radio app
1.MediaRecorder.java: Add FM_TUNER audio source type for FM record.
    2.AudioRecord.java: For FM output to the other device,
     (except the headset case), record the FM tuner signal to a track
      and playback the recorded signal by a track.
    3.AudioAttributes.java: Thus we use AudioRecord, need to modify
      setCapturePreset to support MediaRecorder.AudioSource.FM_TUNER.

    Review: https://partner-android-review.git.corp.google.com/#/c/182071

    Signed-off-by: Benson Huang <benson.huang@mediatek.com>

Change-Id: If068d0bbbffb4848887004396a8a8d9bcba1334e
2014-10-06 18:50:12 +00:00
RoboErik
64cb3ec432 am 26c2e5a0: am 49c14438: am 2d553e95: am 7a60cdbd: Merge "Fix regression in RCC.editMetadata(false)" into lmp-dev
* commit '26c2e5a0de022e3842e65337550214c7133aa08b':
  Fix regression in RCC.editMetadata(false)
2014-10-03 21:52:37 +00:00
RoboErik
49c14438fd am 2d553e95: am 7a60cdbd: Merge "Fix regression in RCC.editMetadata(false)" into lmp-dev
* commit '2d553e95c9e16fd37a676acaf1960e9d919c3caf':
  Fix regression in RCC.editMetadata(false)
2014-10-03 21:33:05 +00:00
RoboErik
51c07bc0bf Fix regression in RCC.editMetadata(false)
Found a very simple fix. Just set the cached metadata so we have
it to copy over when editMetadata(false) is called.

bug:17796693
Change-Id: Ib27f0c3d28e7f2a3c7d9495697f36c8045e2bcf6
2014-10-03 12:45:58 -07:00
Mike Lockwood
5d4a1aaed5 am 2039b757: am 63ffd78a: MtpDatabase: Increase size of string buffer in JNI code
* commit '2039b757fc6479d5f2a193f855ecc759a2a4ac59':
  MtpDatabase: Increase size of string buffer in JNI code
2014-10-03 18:06:59 +00:00
Mike Lockwood
63ffd78aaa MtpDatabase: Increase size of string buffer in JNI code
Fixes problems handling files that have full path length > 255 characters

Bug: 17383223
Change-Id: I2a1ebedee8dd86b3060f14c2d1af636fc9bc95cb
2014-10-03 17:54:18 +00:00
Glenn Kasten
1d6ca80ed6 resolved conflicts for merge of 1c92912b to lmp-mr1-dev-plus-aosp
Change-Id: Id873ccdfa1b9d9c157d1e1d00dcd2a980b55c386
2014-10-02 10:18:00 -07:00
Glenn Kasten
6ba13ac566 Merge "AudioService: Fix monitorRotation for landscape applications" 2014-10-02 16:19:12 +00:00
Neil Fuller
c2a0b4482d resolved conflicts for merge of ee665151 to lmp-mr1-dev-plus-aosp
Change-Id: I2588c65b7a9fa43f968151a206924a804f0595a7
2014-10-02 14:32:37 +01:00
Sungsoo Lim
52ecadbf8c am a381976b: am d5504e04: am e4495131: am ee33c661: Merge "Update java doc for content rating systems" into lmp-dev
* commit 'a381976b7b6185782e4e1ea5472130266bee028d':
  Update java doc for content rating systems
2014-10-01 22:02:20 +00:00
Ruben Brunk
e60986611f am df261085: am 4d9face6: am 7432b884: am b3c802f2: Merge "camera2: Use valid dimensions for RGBA8888 gralloc buffers." into lmp-dev
* commit 'df26108539c1ca134bece1c75d96b96f71c0e3f5':
  camera2: Use valid dimensions for RGBA8888 gralloc buffers.
2014-10-01 17:10:12 +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
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
6c583ef7ea am c6c331ee: am 174355d6: am d0f17b98: am 6f34ad71: Merge "camera2: Fix native ImageReader test segfaults." into lmp-dev
* commit 'c6c331ee6ef9dbcd8e54a1a915d5932a6dda5405':
  camera2: Fix native ImageReader test segfaults.
2014-09-27 06:17:06 +00:00
Yao Chen
ff3796bd87 am d4895aa0: am b0def77c: am 3f544e0b: am 31f80f0f: Assign bindService() result to a boolean directly. One less if-else
* commit 'd4895aa051b6d3c9fe5439b182d6cb8df263a0d6':
  Assign bindService() result to a boolean directly. One less if-else
2014-09-27 06:17:02 +00:00
Marco Nelissen
fa1f03801e am 13d7d40c: am 83c23dda: am c8db4536: am 7e51102c: Merge "Validate MTP path" into lmp-dev
* commit '13d7d40c1106a89b90ed39029e19e8871c36adbd':
  Validate MTP path
2014-09-27 06:16:56 +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
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
RoboErik
66aec18ad3 am e825d695: am 3a85b618: am 065b605c: am 55ecb483: Merge "Don\'t forward media keys to the app if the phone session is active" into lmp-dev
* commit 'e825d6958821a4d63c2e7db39c1c02b4300dd1c8':
  Don't forward media keys to the app if the phone session is active
2014-09-26 23:13:54 +00:00
Marco Nelissen
5f411696a6 Validate MTP path
Bug: 17673184
Change-Id: I51a64f065d9b3609557af81e596ebeb8720ab6c5
2014-09-26 16:07:49 -07: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
dc810db79f am 765ef814: am 5120438b: am 66bc433a: am cab05d54: Merge "Disable MediaSessionLegacyHelper debugging" into lmp-dev
* commit '765ef814c34b2d07e0a8e526e79773df6631d113':
  Disable MediaSessionLegacyHelper debugging
2014-09-26 20:52:18 +00:00
RoboErik
2a1016bd3d am 3c99bd4b: am 298314cb: am 7d111759: am c80873d5: Merge "Remove BT routes when BT is turned off" into lmp-dev
* commit '3c99bd4b8415115567c253b12b4c5b3360f4a8c0':
  Remove BT routes when BT is turned off
2014-09-26 20:52:14 +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
cc491cacf8 am 1769e28d: am a4930277: am 000dd0f8: am 86d77815: Merge "Check the return value of bindService, and notify media browser client onConnectionFailed if it returns false." into lmp-dev
* commit '1769e28d34857bf78708c595e7ce71759aa961ea':
  Check the return value of bindService, and notify media browser client onConnectionFailed if it returns false.
2014-09-26 16:17:15 +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
28c86a16c0 am 7df93654: am 54218f6b: am 10a7dfea: am 504752fb: Merge "Ensure MediaBrowser state is set to connecting after a reconnect" into lmp-dev
* commit '7df9365479e7e775bdaf32d9b5ed9a6eabcfa1fe':
  Ensure MediaBrowser state is set to connecting after a reconnect
2014-09-26 00:23:48 +00:00
RoboErik
00bbe915de am 5e8f023d: am a59c7f03: am dff59b8b: am 23df1c46: Merge "Allow null queues to be set in MediaSession" into lmp-dev
* commit '5e8f023dc17788a18bc5640a42baaf2bec609745':
  Allow null queues to be set in MediaSession
2014-09-26 00:23:43 +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
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
87fb4fb9c1 am bf14a4e6: am 2f1e6478: am 5817765c: am ca7f391e: Merge "MediaCodecList: fix findEncoderForFormat." into lmp-dev
* commit 'bf14a4e6ea6f2c70152a9456ed790fc460734e16':
  MediaCodecList: fix findEncoderForFormat.
2014-09-25 17:06:13 +00:00
Lajos Molnar
59432a4c7e am a91920f0: am f4bab345: am a3608e7a: am 4e43a27a: Merge "MediaCodec: revalidate cached queued input buffers if queue fails (2)" into lmp-dev
* commit 'a91920f0f81e32dbfd408db8b0e26c139fdded74':
  MediaCodec: revalidate cached queued input buffers if queue fails (2)
2014-09-25 17:06:04 +00:00
Lajos Molnar
94831b82be am 36dbe967: am c8d99e5c: am 7c993e8c: am aa1f0856: Merge "MediaCodec: revalidate cached queued input buffers if queue fails" into lmp-dev
* commit '36dbe967a0027842abe9051ddc4a87704785f84c':
  MediaCodec: revalidate cached queued input buffers if queue fails
2014-09-25 17:05:47 +00:00
Ruben Brunk
ea06d48527 am 01105fee: am ae7ff48d: am 6a7dcedf: am 8acfdc7b: Merge "camera2: Hide JPEGs in RGBA gralloc buffers." into lmp-dev
* commit '01105feea74a4d0a063774509efa21ae95d50a3a':
  camera2: Hide JPEGs in RGBA gralloc buffers.
2014-09-25 10:24:12 +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
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