1025 Commits

Author SHA1 Message Date
Yujie Qin
d09b020ce5 Merge \"Report error correctly for the implementation of StreamInterface::GetData()\" into nyc-dev
am: e09415344d

Change-Id: Id85ebdb2541c6145da39cf20684f85728f2ba0b6
2016-06-16 20:05:17 +00:00
Yujie Qin
cad1666867 Report error correctly for the implementation of
StreamInterface::GetData()

Bug: 28889197
Change-Id: Id07755e1b3637f85b6176a59935ad3a5597cfb05
2016-06-16 11:42:41 +02:00
Eric Laurent
c8e1206ad5 Merge "Delete Visualizer before lpJniStorage" am: 03c209b2a3
am: 913e2f83b2

* commit '913e2f83b223486ac1461dab86758848f9ad08e1':
  Delete Visualizer before lpJniStorage

Change-Id: I76aa735d8f0a100e0e106050c90966bd003235bc
2016-06-07 18:13:09 +00:00
ganxiaolin
7b9f5be914 Delete Visualizer before lpJniStorage
It is related to Change: Id17bea8a6ca7132042b9bfefed398a715c139be7
Fix ANR because of bug of Visualizer.
If lpJniStorage was delete first, callback_data_lock become a invalid value.
At mReceiver.periodicCapture() in CaptureThread, it will lock callback_data_lock.
Thus, CaptureThread will wait a invalid memory forever and visualizer wait CaptureThread exiting and causing ANR.

Signed-off-by: ganxiaolin <ganxiaolin@xiaomi.com>
2016-06-06 11:09:05 +08:00
Chih-Hung Hsieh
0b5608015b Merge "Fix misc-macro-parentheses warnings in audio media jni." am: 9ecb10d1b5
am: ca3f49d594

* commit 'ca3f49d594f5c00e6b5d6817bcdb0af02e7224e6':
  Fix misc-macro-parentheses warnings in audio media jni.

Change-Id: I3828c9720f7fe91bc60058daeca2d598f0302d32
2016-05-24 18:56:37 +00:00
Chih-Hung Hsieh
0ca16ef3b8 Fix misc-macro-parentheses warnings in audio media jni.
Bug: 28705665
Change-Id: Iff476943a0a2c2ae68778d1f4bca5d3e9e04bd26
2016-05-19 15:14:54 -07:00
Wei Jia
613dc4cc1d Merge "android_media_MediaSync: Do not pass NULL to AString ctor." into nyc-dev
am: c4e8471ba4

* commit 'c4e8471ba4afb0d2cae0d9e29f5c14b4bbfe4524':
  android_media_MediaSync: Do not pass NULL to AString ctor.

Change-Id: Id138df3cfe1ee989d4abf52ae283b63419e7047a
2016-05-17 21:39:01 +00:00
Wei Jia
838a4ed101 android_media_MediaSync: Do not pass NULL to AString ctor.
Bug: 28643582
Change-Id: I75eaf61007adffdd7e3b07aebb37c12a8e71cf75
2016-05-16 17:40:02 -07:00
Sungsoo Lim
2505b200a2 Merge "ExifInterface: Set mPosition in AssetStream with proper values" into nyc-dev
am: a7ad6e912f

* commit 'a7ad6e912f82124b9a7e6f2d14a2ccbae79d16f2':
  ExifInterface: Set mPosition in AssetStream with proper values

Change-Id: I59abff01d593647048fe42e7b0dd546f9a68ebdd
2016-05-10 22:12:07 +00:00
Sungsoo Lim
2584cda885 ExifInterface: Set mPosition in AssetStream with proper values
Bug: 28649955
Change-Id: I25ab833f54e4ee853d3b89af513b4ecd7dc02df9
2016-05-07 18:45:07 +09:00
Jeff Tinker
4d1543fd80 Merge "Remove MediaDrm stack from mediaserver" into nyc-dev
am: 892a6a3

* commit '892a6a343d3c53caef3388f83861af814c8ba20a':
  Remove MediaDrm stack from mediaserver

Change-Id: I9f5194d388c2814d336a10f95755d3036b7d7464
2016-04-27 05:27:06 +00:00
Jeff Tinker
d12b7c0600 Remove MediaDrm stack from mediaserver
Part of media security hardening

MediaDrm was temporarily allowed to
run in either mediaserver or mediadrmserver
while all nexus devices were implementing
support for the native_handle representation
of secure buffers.  Now that all nexus
devices support native_handle, the MediaDrm
stack can be removed from mediaserver.

b/22990512

Change-Id: I96a5222f94cd1580ac411de5b48beb44b99cc8d7
2016-04-27 00:49:15 +00:00
Daichi Hirono
4ab0f745d5 Merge "Handle API review comments from the council." into nyc-dev
am: b9c64cd2c0

* commit 'b9c64cd2c06933eda7ff1e691b80c53a74ff09d7':
  Handle API review comments from the council.

Change-Id: I9f082a99d5c8cbce3aaa9708f5f0ea75cc5a9ed6
2016-04-22 00:12:20 +00:00
Daichi Hirono
b9c64cd2c0 Merge "Handle API review comments from the council." into nyc-dev 2016-04-22 00:00:33 +00:00
Insun Kang
b3f8a968e2 Merge "ExifInterface: Fix a bug to return only a JPEG-compressed thumbnail" into nyc-dev
am: 801d416

* commit '801d4161dd9e872bec73d855d21d030ba39a8b91':
  ExifInterface: Fix a bug to return only a JPEG-compressed thumbnail

Change-Id: I4ab59b2b7ced0cf9449fdc780692cfcb707d8df4
2016-04-20 21:11:41 +00:00
Insun Kang
82c2ce1d16 ExifInterface: Fix a bug to return only a JPEG-compressed thumbnail
Bug: 26923978
Change-Id: I929802ae7ff878a80a43058d3c6fa922c706edf6
2016-04-19 17:56:10 +09:00
Daichi Hirono
399df701a1 Handle API review comments from the council.
* MtpEvent: Remove public constructor since properties cannot be set
   directly.
 * MtpEvent: Move event constants from MtpConstants to MtpEvent class.
 * getPartialObject64: the byte[] must have indices of Integer.MAX_VALUE
   at most. Document as such.
 * sendObjectInfo: what happens if the transfer doesn’t succeed? How is
   the app notified? If there is a reason for the failure communicated,
   how does the app find this out? Add docs.
 * Add isOperationSupported(int) and isEventSupported(int) helpers.

Change-Id: Ifd80016d2ddd3b66d5c45f6da76b6133f0c9a617
Fixes: 28146379
2016-04-18 13:03:29 +09:00
Jaesung Chung
468a0796cb Merge "ExifInterface: keep the original metadata data instead of strings" into nyc-dev
am: 865cef4

* commit '865cef475dd4b0ffcb4df0dd62cb86d4ce65ab08':
  ExifInterface: keep the original metadata data instead of strings

Change-Id: Ie02b5ac90a8dde0389ace4bcae081f8bd4e064a0
2016-04-16 02:46:14 +00:00
Jaesung Chung
0e7d22535d ExifInterface: keep the original metadata data instead of strings
This CL makes ExifInterface store the tag values as the original forms
and the format validiation is added that compares the given value and
the data format specificed in EXIF specification in order to keep the
valid tag values only.

Bug: 27583378, Bug: 27614052, Bug: 28075709
Change-Id: If60bbddefe74c4b87b4ce64b5fc79e467e36a5b9
2016-04-15 23:27:21 +00:00
Jaesung Chung
2129b9cc17 Merge "ExifInterface: return only a JPEG-compressed thumbnail of RAW images" into nyc-dev
am: 02f9e23

* commit '02f9e23525bd3ae97528041bc0eaf25d43d8fc53':
  ExifInterface: return only a JPEG-compressed thumbnail of RAW images

Change-Id: If826f5f7612e06d94c0cf17505bf468851d96faa
2016-04-15 00:29:09 +00:00
Jaesung Chung
02f9e23525 Merge "ExifInterface: return only a JPEG-compressed thumbnail of RAW images" into nyc-dev 2016-04-15 00:19:09 +00:00
Philip Cuadra
e7c8b947c9 Merge "Increase the SoundPoolThread queue size to 128 entries." into nyc-dev
am: a6dea12

* commit 'a6dea121e81e4759718ec7f522f7d9b9926df59a':
  Increase the SoundPoolThread queue size to 128 entries.

Change-Id: Icfa989ea5ec3e62c6a27ab2a4b3af123fb7bf1f1
2016-04-13 17:28:35 +00:00
Jaesung Chung
742e89f67d ExifInterface: return only a JPEG-compressed thumbnail of RAW images
Bug: 26923978
Change-Id: I120723c9e28a24d6fb3b7034892e0196484ee5e4
2016-04-14 01:54:45 +09:00
Philip Cuadra
1f1f4bf91d Increase the SoundPoolThread queue size to 128 entries.
SoundPoolThread queue is undersized, bump it up to 128 entries.  This
improves the performance of loading camera by unblocking the thread that
asks SoundPool to load sounds.  Longer term, an API for setting this
number of entries should be added.

Bug: 28087906

Change-Id: Ie5cea5d11844cf035ca13979c188f2c57a8e333a
2016-04-11 23:01:04 +00:00
Marco Nelissen
d0198f27e8 Merge "Expand mediaextractor dumpsys" into nyc-dev
am: aaacd00

* commit 'aaacd001fba22ef5ed9ca882749919034f1720c4':
  Expand mediaextractor dumpsys

Change-Id: Ie70b95d73a0994285c55dca1729cd782331b35bd
2016-04-07 17:33:13 +00:00
Marco Nelissen
aaacd001fb Merge "Expand mediaextractor dumpsys" into nyc-dev 2016-04-07 17:26:19 +00:00
Jaesung Chung
288d70f79b Merge "Fix build" into nyc-dev
am: 5905bf7

* commit '5905bf738c175edfc63bf2e5ee28a43d83977e2d':
  Fix build

Change-Id: Icabf911c0eb4a96e88032312fd6fb6785b043932
2016-04-06 12:55:34 +00:00
Jaesung Chung
fd3446e0aa Fix build
Change-Id: I38aa2f70fef3cb5b4a6fe42a3e4aa8e0a16e6fe0
2016-04-06 21:44:13 +09:00
Marco Nelissen
7a83ee9a32 Merge "Fix MTP_TYPE_UINT128 data conversion issue" am: ba23e45
am: 287dfa1

* commit '287dfa10cd6d5c6eb7cb39e20e1b6532c320927c':
  Fix MTP_TYPE_UINT128 data conversion issue

Change-Id: I72aa6c2bcd009a2e0607832c44dc4b96c5da6b1f
2016-04-05 18:11:26 +00:00
Andy Hung
9a99629eaa Merge "Stop SoundPool decode if NdkMediaCodec returns null buffers" into nyc-dev 2016-03-30 17:06:18 +00:00
Wanwu Peng
8937f1aa8b Fix MTP_TYPE_UINT128 data conversion issue
If type is MTP_TYPE_UINT128, use MtpDataPacket.putUInt128()
not MtpDataPacket.putInt128() to write data to the packet.

Change-Id: Icb9994e24ac216f3bb07d0a2b3cd7ccf3f8c6f3f
2016-03-30 16:32:11 +02:00
Andy Hung
0474773aab Stop SoundPool decode if NdkMediaCodec returns null buffers
Also increase error checking.

Bug: 27346228
Change-Id: Ib94505f852344298f88a3fdcbd65ca8031084188
2016-03-29 15:43:02 -07:00
Daichi Hirono
1337deb6ea Update the comment of MtpDevice#getObjectSizeLong
BUG=27805369

Change-Id: I63762fedf540e89e9ca811a143cb178881ef1830
2016-03-28 04:37:14 +00:00
Marco Nelissen
73c74698d0 Expand mediaextractor dumpsys
Bug: 22775369
Change-Id: I87452084bb5405280c48085fb909aa247055ea01
2016-03-25 09:33:13 -07:00
Daichi Hirono
787821bce4 Add getObjectSizeLong hidden API to MtpDevice class.
In the MTP spec, the object size is stored in MtpObjectInfo as unsigned
32-bit integer and fetched by the getObjectInfo operation. For the
objects that are more than 4GB, the object size is provided as one of
extra properties, which are fetched by different operation.

The CL adds to getObjectSizeLong hidden method to Java MtpDevice class
so that client code can obtain 4GB+ object size.

BUG=27805369

Change-Id: I8a5b85c8db39734f00e49709c61b271eb48ff33d
2016-03-25 20:06:13 +09:00
Glenn Kasten
58ae278294 Merge "Use audio_session_t consistently" into nyc-dev 2016-03-17 14:22:53 +00:00
Lajos Molnar
bd4acc2f9b Merge "media: don't expose private keys in MediaFormat" into nyc-dev 2016-03-15 19:22:28 +00:00
Yin-Chia Yeh
7b79090252 Camera: fix expectation of BLOB buffer size
Bug: 27340302
Change-Id: I7f40065661d06bba210c3cb888598623fad0e56c
2016-03-14 16:17:38 -07:00
Lajos Molnar
c04399feab media: don't expose private keys in MediaFormat
Bug: 25684127
Change-Id: Ie263d290037633291b791ca78ba7cf4d6b3de9c8
2016-03-14 14:07:22 -07:00
Glenn Kasten
33b840444f Use audio_session_t consistently
Also prefer AudioManager.AUDIO_SESSION_ID_GENERATE over
AudioSystem.AUDIO_SESSION_ALLOCATE, because
AudioSystem.AUDIO_SESSION_ALLOCATE is @hide.

Bug: 27562099
Change-Id: I5924554feb919db7f2390f5b062faedd515421af
2016-03-10 10:35:49 -08:00
Jaesung Chung
6e08d2b082 ExifInterface: add RAW input stream support
And also the following things are included:

- Remove mInputStream.
- Update javadoc accordingly.

Bug: 11224701
Change-Id: I30b4c29ac800ae396fca8f6b2c2c0f68028a44b3
2016-03-09 17:22:11 +09:00
Zhijun He
0ab416269a ImageReader/Writer: refactor and cleanup
Below changes are included:
* Defer the buffer lock to Image#getPlanes call. This will save quite a bit
CPU cycles associated with lock buffer if the application doesn't really
want to access the data.
* Refactor the code: move some common code to some utility class, and use
one unified consumer (BufferItemConsumer) in ImageReader native implementation.
The code refactoring will also make it easier to support non-opaque image
attach/detach.

Bug: 22356918
Bug: 19962027
Change-Id: I4fb865b0ea3deb6650afc64c32a5906f30e8ccbd
2016-03-08 13:21:36 -08:00
Jeff Tinker
b849eeab26 Merge "Add error code to MediaCodec.CryptoException" into nyc-dev 2016-03-07 18:18:10 +00:00
Jeff Tinker
d393216f8a Add error code to MediaCodec.CryptoException
Added a code to represent unsupported operations

bug: 25929554
Change-Id: Id8bfa092f29de073db19c4d7444f89249ea2cdd5
2016-03-05 11:53:23 -08:00
Jeff Tinker
e883f6c299 Merge "Fix uninitialized crypto pattern" into nyc-dev 2016-03-04 01:35:55 +00:00
Jeff Tinker
e872ac45f7 Fix uninitialized crypto pattern
Apps built against an older API don't have the recently
added pattern field in MediaCodec.CryptoInfo which causes
the crypto pattern fields to be uninitialized.  This change
ensures the pattern is initialized in all cases.

bug: 27477422
Change-Id: I5796bf5fbca93dba5bf9a2b74c1c6638b9e90f65
2016-03-03 15:47:09 -08:00
Lajos Molnar
11c2eaab97 Merge "media: correctly return cached size for MediaDataSource"
am: 6ca2cb4991

* commit '6ca2cb499112871fd840597184dc75ba26fdeae8':
  media: correctly return cached size for MediaDataSource
2016-03-03 17:29:04 +00:00
Lajos Molnar
f78c984e05 media: correctly return cached size for MediaDataSource
Bug: 27431229
Change-Id: I884e43960789c139b48964deba8f56b3bc3ba590
2016-03-03 08:05:41 -08:00
Lajos Molnar
7c7fef1585 media: correctly return cached size for MediaDataSource
Bug: 27431229
Change-Id: I884e43960789c139b48964deba8f56b3bc3ba590
2016-03-02 17:05:10 -08:00
Eino-Ville Talvala
5d2d7788f1 Camera2: Switch to auto-gen C++ binder interfaces
- Move camera AIDL files to frameworks/av
 - Update makefiles to point to new AIDL locations
 - Adjust camera2 implementation to match modifications to AIDL needed
   for native AIDL auto-generation
 - Move Surface.aidl to frameworks/native to allow use in
   native AIDL. Use android::view::Surface in Surface JNI to
   serialize Surface objects to ensure parceling compatibility.
 - Adjust service binder tests to new interface

Bug: 25091611
Change-Id: I85b817374b34a4540fa145328dbe4bbf7f746baf
2016-03-01 17:15:17 -08:00