1152 Commits

Author SHA1 Message Date
Steven Moreland
65e2ca2808 ScopedUtfChars: use proper nativehelper headers
libnativehelper exports headers under nativehelper. These were
available before incorrectly as global headers in order to give
access to jni.h.

Test: modules using ScopedUtfChars find headers
Bug: 63762847
Change-Id: I5e9f2b56f569b83ece0d854f7066655e1d64cc65
2017-08-10 23:00:10 +00:00
Steven Moreland
9f430b2782 Merge "frameworks/base: use proper nativehelper headers" am: 826eafd958 am: 5c091dc944
am: c840945a78

Change-Id: I654e14f0d1b495450db81592a2e564e308746350
2017-07-20 03:05:02 +00:00
Steven Moreland
5c091dc944 Merge "frameworks/base: use proper nativehelper headers"
am: 826eafd958

Change-Id: I36f10ff4d963284a313f1cc5b368f82549a4adb2
2017-07-20 02:50:53 +00:00
Steven Moreland
2279b25342 frameworks/base: use proper nativehelper headers
libnativehelper exports headers under nativehelper. These were
available before incorrectly as global headers in order to give
access to jni.h.

Test: modules using frameworks/base find headers
Bug: 63762847
Change-Id: I0f9f231acdebe460f279135462f43d3e32eff64d
2017-07-19 10:06:40 -07:00
Steven Moreland
8e9b7efefd Reference nativehelper/jni.h as jni.h am: d82cdb4624
am: 6b9d4b76ae

Change-Id: I27f7f300b0a4e3d8d8d150e7902ed2763b442a4b
2017-07-19 02:41:21 +00:00
Steven Moreland
d82cdb4624 Reference nativehelper/jni.h as jni.h
nativehelper will no longer export nativehelper/jni.h so that everywhere
can reference this file with the same name.

Bug: 63762847
Change-Id: I3e58d478a2eb17b19db540414545a3c1f9c381af
(cherry picked from commit 98f40c71399e63f2b10cf6e3dffbbcea84d52490)
2017-07-19 02:26:57 +00:00
Steven Moreland
9882d6da79 Merge "Reference nativehelper/jni.h as jni.h" am: 899a1f23c5 am: d2bf323c40
am: 238be4a67b

Change-Id: Icb75bc6c2ba9750349de0e4f0ea15c29b5502b7b
2017-07-18 21:51:49 +00:00
Steven Moreland
d2bf323c40 Merge "Reference nativehelper/jni.h as jni.h"
am: 899a1f23c5

Change-Id: I30ec4f6b329360ea4161f2ad5538ecd238db7b62
2017-07-18 20:05:36 +00:00
Steven Moreland
889f9952d8 Reference nativehelper/jni.h as jni.h
nativehelper will no longer export nativehelper/jni.h so that everywhere
can reference this file with the same name.

Bug: 63762847
Change-Id: I8d2e9587439efa2d6ab03a5bdfa749fc620759e1
2017-07-17 12:08:45 -07:00
Marco Nelissen
beea9f7636 Revert "Multiple worker threads for SoundPool"
This reverts commit 7201d9cb6a5d9bcd4f82dfde32e25a1ca8e825e2.

This reduces CPU usage during Camera startup.

Bug: 38031165
Bug: 62447848
Change-Id: I857aefec9dd7566bfdd3b84873eb5d495449815c
2017-06-21 19:30:17 +00:00
Eino-Ville Talvala
20e2394f75 Merge "ImageReader: Set BufferItem mGraphicBuffer to null when returning it" into oc-dev
am: 20c2116c1f

Change-Id: I8385f1e65de888d602e5775f6811ec7c908f9073
2017-06-15 21:12:29 +00:00
Eino-Ville Talvala
730a1168e6 Merge "ImageReader: Set BufferItem mGraphicBuffer to null when returning it" into oc-dev
am: 20c2116c1f

Change-Id: I82b234f1fa7ea6b231bacdd99543b68fa8be51c6
2017-06-15 21:10:51 +00:00
Eino-Ville Talvala
0af9435572 ImageReader: Set BufferItem mGraphicBuffer to null when returning it
The ImageReader JNI layer needs to maintain a list of BufferItems that
back the Java Image objects. At start, we allocate maxImages of these
in a list, and acquire and release them from this list as the
application acquires and releases Images.

However, on release, the contents of the BufferItem are not adjusted,
so it can retain a reference to a GraphicBuffer until the BufferItem
is reused.

Test: Camera CTS passes, memory usage drops after camera bursts
Bug: 62652080
Change-Id: I9aade5e32cbe0af0c15a3886e16ada1a70392b74
2017-06-15 06:34:31 -07:00
Marco Nelissen
7201d9cb6a Multiple worker threads for SoundPool
This makes SoundPool create multiple worker threads for loading sounds.
Threads are created on demand, and go away when no work is available.
Bug: 38031165
Test: manual

Change-Id: Ic73f2777215e4aa65aa1c41b283b7838cebd165d
2017-06-01 12:37:29 -07:00
Andy Hung
0dc609a113 Merge "VolumeShaper: Enable xOffset from Java" into oc-dev am: b33c0eb07a
am: 0cc01b5bc2

Change-Id: I9afcd844391b56991b5cc686808f89b4ec878a31
2017-05-18 16:34:39 +00:00
Andy Hung
0cc01b5bc2 Merge "VolumeShaper: Enable xOffset from Java" into oc-dev
am: b33c0eb07a

Change-Id: Icc37873492d612a66484d731168de5c5e27213c9
2017-05-18 16:26:41 +00:00
Andy Hung
3c0f5d296e VolumeShaper: Enable xOffset from Java
Previously only accessible from native.
Also improve documentation and comments.

Test: CTS VolumeShaperTest, Ducking
Bug: 38353147
Change-Id: I27bb34f0a5d28f80d138111bbeeb92653b5195c5
2017-05-17 18:31:38 -07:00
Colin Cross
0bd45d3f2c Merge "Convert libsoundpool to Android.bp" am: dde9ee9edd am: e9ffa404ae
am: 13ea256d71

Change-Id: I8af55458b0bba29701249f7a8165f30055262f46
2017-05-17 22:03:06 +00:00
Colin Cross
da8082bda2 Convert libsoundpool to Android.bp
See build/soong/README.md for more information.

Test: m -j checkbuild
Change-Id: If0b7cb1e2c86ff1be41c00d98fd9ddec31287a53
Merged-In: If0b7cb1e2c86ff1be41c00d98fd9ddec31287a53
(cherry picked from commit 98c127f8cc652d1179871ad47cac99d15ea1a5a0)
2017-05-17 13:22:34 -07:00
Colin Cross
b5af660ff6 Merge "Convert libsoundpool to Android.bp" 2017-05-17 20:15:20 +00:00
Colin Cross
58d87e8ab7 Convert libmedia_jni to Android.bp
See build/soong/README.md for more information.

Test: m -j checkbuild
Change-Id: I1817c75ee45537ca0d5fc40a035f94a3dfeccc11
Merged-In: I1817c75ee45537ca0d5fc40a035f94a3dfeccc11
(cherry picked from commit 76de4f6b4d09423b3a5d3603527ce79acae4ed32)
2017-05-16 22:05:39 -07:00
Colin Cross
eb27d2798a Convert libmedia_jni to Android.bp
See build/soong/README.md for more information.

Test: m -j checkbuild
Change-Id: I1817c75ee45537ca0d5fc40a035f94a3dfeccc11
Merged-In: I1817c75ee45537ca0d5fc40a035f94a3dfeccc11
(cherry picked from commit 76de4f6b4d09423b3a5d3603527ce79acae4ed32)
2017-05-17 03:02:21 +00:00
Colin Cross
14b2beb0ef Merge "Convert libmedia_jni to Android.bp" 2017-05-17 02:42:41 +00:00
Andy Hung
f7162a3a43 Merge "AudioEffect: return DEAD_OBJECT for FAILED_TRANSACTION" into oc-dev am: 52f57cb720
am: 24ac07e1e0

Change-Id: I0c662869ebda4d99a81a0c31407a47ea6699a907
2017-05-17 01:46:12 +00:00
Andy Hung
24ac07e1e0 Merge "AudioEffect: return DEAD_OBJECT for FAILED_TRANSACTION" into oc-dev
am: 52f57cb720

Change-Id: Idb0f8a1565c4eb36ad0031a86b244f698e9cefbd
2017-05-17 01:39:55 +00:00
Colin Cross
98c127f8cc Convert libsoundpool to Android.bp
See build/soong/README.md for more information.

Test: m -j checkbuild
Change-Id: If0b7cb1e2c86ff1be41c00d98fd9ddec31287a53
2017-05-16 13:08:19 -07:00
Colin Cross
76de4f6b4d Convert libmedia_jni to Android.bp
See build/soong/README.md for more information.

Test: m -j checkbuild
Change-Id: I1817c75ee45537ca0d5fc40a035f94a3dfeccc11
2017-05-16 13:07:57 -07:00
Andy Hung
32d516381c AudioEffect: return DEAD_OBJECT for FAILED_TRANSACTION
Test: CTS AudioSecurityTest
Bug: 38346284
Change-Id: I96b4995c2d11b4a33c4b2fa6987922e26c91d336
2017-05-16 12:33:56 -07:00
Jeff Tinker
dffb216140 Merge "Fix drm hal resource leaks" into oc-dev am: 63398bbd71
am: 8b1e0e1254

Change-Id: I14d864345f84d801aef48b45af1c59a1e08f7087
2017-05-15 20:14:15 +00:00
Jeff Tinker
8b1e0e1254 Merge "Fix drm hal resource leaks" into oc-dev
am: 63398bbd71

Change-Id: Iae4c7f407e638dd2dba5acfc43a3ca894f665bd4
2017-05-15 20:03:16 +00:00
Jeff Tinker
94dd36cae9 Fix drm hal resource leaks
bug:36408047
test: manual testing to verify leaks are fixed
Change-Id: Ic6a29572874a9fe30f36e7fdabb68d2ddeffb278
2017-05-15 09:27:18 -07:00
Colin Cross
2a5d782689 Update path for libmediandk headers
Platform usages of libmediandk headers are now in media/.

Test: builds
Change-Id: I16385cab86ae9cac225304557df416bbb232ecf3
(cherry picked from commit c8ed45d38f3b42e06c9e0980e133a84181752b5e)
2017-05-05 13:05:55 -07:00
Colin Cross
0ece443558 Update path for libmediandk headers
Platform usages of libmediandk headers are now in media/.

Test: builds
Change-Id: I16385cab86ae9cac225304557df416bbb232ecf3
(cherry picked from commit c8ed45d38f3b42e06c9e0980e133a84181752b5e)
2017-05-05 20:03:42 +00:00
Colin Cross
28f320c5be Merge "Update path for libmediandk headers" 2017-05-05 20:02:14 +00:00
Eino-Ville Talvala
2e385f76f8 Merge "Merge "ImageWriter: Attach non-opaque Images as well." into oc-dev am: 97258cd731" into oc-dev-plus-aosp
am: 74d76f406b

Change-Id: I0ace22eb4cb7e4c90baf3ff066a400e609f5e620
2017-05-05 16:37:28 +00:00
Colin Cross
c8ed45d38f Update path for libmediandk headers
Platform usages of libmediandk headers are now in media/.

Test: builds
Change-Id: I16385cab86ae9cac225304557df416bbb232ecf3
2017-05-04 17:58:11 -07:00
Eino-Ville Talvala
07ad459c84 ImageWriter: Attach non-opaque Images as well.
With all the work under the hood of ImageReader/Writer in the last few
releases, this is much more straightforward to enable.

Only trick is to ensure that the Image detached from the ImageReader
correctly clears out its planes, if present.

Bug: 19962027
Test: Camera CTS still passes on angler, sailfish, ryu
Change-Id: Ic8a1f3e2f45cf15971d76e308a5af25eb2fd66f1
2017-05-04 11:04:56 -07:00
Wei Jia
f316c99123 Merge "MediaPlayer: fix new API seekTo to address API review." into oc-dev am: 62a3aa745a
am: f38aa207b2

Change-Id: Ib2c0db36dd3f9958f0ecb714a1b6e73d73e3455d
2017-04-21 21:25:04 +00:00
Wei Jia
bebeaf9ae3 MediaPlayer: fix new API seekTo to address API review.
Test: compiles
Bug: 36790516
Bug: 37514763
Change-Id: I91307d10e6c9bc65779651c056053b3a025b0d50
2017-04-21 11:05:13 -07:00
Mike Reed
7c0ae0f58b bitmaps and pixelrefs no longer need lock/unlock
Test: covered by CtsGraphicsTestCases and hwui_unit_tests

Change-Id: I42a25961a2eb3755d2fd22a617aa21a24ec0994f
2017-04-18 10:22:42 -04:00
Ray Essick
10353e3601 Rework getMetrics() api per API council
Reworking the media metrics getMetrics() calls (currently in MediaCodec,
MediaExtractor, MediaPlayer, and MediaRecorder) to fit new direction
from the API Council.

Drop the MediaMetricsSet that we had in the first round; go back
to a PersistableBundle as the return type. Moves the key definitions
from MediaMetricsSet.MediaCodec to MediaCodec.MetricsConstants

Bug: 37083862
Test: ran the corresponding CTS tests
Change-Id: I7905959ad2109887dd8fd16f0eb2831247abab2a
2017-04-14 17:24:42 -07:00
TreeHugger Robot
fd89a95f35 Merge changes from topic 'api-review' into oc-dev
* changes:
  MediaCas: combine openSession methods
  MediaCas: address comments for API reviews
2017-04-13 06:23:51 +00:00
Chong Zhang
addc39ec27 MediaCas: address comments for API reviews
- Wrap session id byte array in Session object

- Move session operations from MediaCas to Session

- Remove position prarameters on descramble() method

- Retrieve cas info for a track by getCasInfo() instead
  of getDrmInitData().

bug: 22804304
bug: 36791613
bug: 36783335

Change-Id: Ib3ad8d6a2f679c0e60d2bb025ac5999339722306
2017-04-11 13:13:22 -07:00
Zhijun He
916d8ac650 ImageReader/Writer: add usage flag support
Also add an ImageWriter ctor to take additional arugment (format)

Test: ImageReader and Writer CTS tests
Bug: 32766711
Change-Id: I99e3862dd5b9a85c9df7879c14c84b68a35718ec
2017-04-10 23:38:32 +00:00
Ray Essick
ed5b028693 Move MediaMetrics into its own library
Changes for the new HAL structure have brought about a build time
circular dependency between libmedia and libmediadrm. This set of
changes the media metrics code into its own library and arranges
for the relevant consumers of the media metrics code to link
to this new library (where they had previously picked it up by
including libmedia).

Bug: 36990807
Test: build, boot.
2017-04-05 14:01:00 -07:00
Mathias Agopian
845eef05ff Remove useless GraphicBuffer() constructor
Test: compiled & run
Bug: 36869708
Change-Id: Ie825979cd03874904b6f953ece4a05d4a0d52253
2017-04-03 17:51:15 -07:00
Chong Zhang
dadee0c33e MediaCas: rethrow MediaCas specific exception
Translate ServiceSpecificException from aidl to CAS-specific
exceptions. Also, throw CAS specific exception for descramble().

bug: 22804304

Change-Id: I6d68c335c87fbb95fd8cc227e432eed4e5951550
2017-03-24 14:28:43 -07:00
Jerry Zhang
e30d5723e4 Merge "Add support for MTP perceived device type property." am: b6ed343e85 am: 7644b885c7
am: 136f37b88f

Change-Id: I446cd52e5fd8cda48e9af46ee3faee5578cae286
2017-03-20 21:54:28 +00:00
Ray Essick
5204ad0a2a Merge "Integrate API Council feedback into Media Metrics APIs" 2017-03-16 01:02:25 +00:00
Ray Essick
f2d0e40bf0 Integrate API Council feedback into Media Metrics APIs
Integrates the API Council's feedback into the Media Metrics
related APIs.
-- return types for the getMetrics() calls
-- definition of keys in the set of data that comes back

Bug: 35811992
Test: booted, CTS subset, checked dumpsys media.metrics output
Change-Id: Ib750f9631bd3453be3132760273ccfff0a891f88
2017-03-15 11:43:08 -07:00