1051 Commits

Author SHA1 Message Date
Alex Klyubin
abdc2b47b3 Make users of MtpServer fill in DeviceInfo field values
This is part of weaning apps off accessing system identifiers via
system properties API. Apps should use android.os.Build API instead.

Bug: 33700679
Test: Enable MTP mode then check that mtp-detect output same as before this commit
Change-Id: I4e6696cdee18b9c3e987c432c095911e85a997db
2016-12-21 13:56:28 -08:00
Jerry Zhang
bb598ee16f Modify UsbDeviceManager stack to allow MtpServer to use FunctionFS drivers.
Functionfs requires MtpServer to write descriptors before the device can be
configured. This adds a new configure call that will occur only when
functions are changed (new argument added to updateUsbStateBroadcast for this)
and be called after sys.usb.config is changed but before the waitForState
call to ensure compatibility with configfs devices.

Bug: 30976142
Change-Id: I7e94a5847d3b19c0fd75139e1b15a3f2a1cea01d
Test: Manual
2016-12-12 11:05:32 -08:00
Marco Nelissen
618c1a9ae6 Merge "Make AmrInputStream use MediaCodec"
am: 866658261f

Change-Id: Id25833efb8baa54e729bdc823e5849819c53cd64
2016-11-11 20:10:00 +00:00
Marco Nelissen
01d023e966 Make AmrInputStream use MediaCodec
Bug: 32114618
Test: ran CTS test
Change-Id: I9fe77689bf0bcd1bc8f6c5a4d62135271c7bef8b
2016-11-11 10:53:09 -08:00
Marco Nelissen
1d10b88f40 Merge "Use libaudioclient"
am: 0a05c49248

Change-Id: I134c9c5b95e446fcc18e2b35a3eca2a4a794e8c8
2016-11-07 17:22:36 +00:00
Marco Nelissen
74abdda6a0 Use libaudioclient
Test: build/boot
Change-Id: I7c730bfd47297f311e00798b5927888ddc3f5062
2016-11-04 19:31:54 -07:00
John Reck
946d11d216 Merge "Re-unite sources with their headers"
am: e43444a00b

Change-Id: I8f3ef6a1ddcf78d28f7444b6e83c552b8305fd8c
2016-11-04 21:47:34 +00:00
John Reck
03b5d506bc Re-unite sources with their headers
Move all the includes for androidfw under
a common base path for that library instead
of frameworks/base/includes.

Also fixes -Werror issues that resulted in
no longer being -isystem.

Test: builds
Change-Id: Ic4312eb61b197af114dded5691d5ae1ec82923f7
Merged-In: Ic4312eb61b197af114dded5691d5ae1ec82923f7
(cherry picked from commit f6113af2d6f6eebee68d3ac510fe96d38a7a39e9)
2016-11-04 13:27:37 -07:00
Colin Cross
e9b5b70114 Merge "Fix struct vs. class mismatch in forward definitions" am: 8f1011d584 am: 6d0b466935
am: 95311818f0

Change-Id: I45b57d37d08699afc070699d07485cb83c51850a
2016-10-03 20:32:01 +00:00
Colin Cross
95311818f0 Merge "Fix struct vs. class mismatch in forward definitions" am: 8f1011d584
am: 6d0b466935

Change-Id: I9602684e0ac91f7c08dafe70309433bb233ceeaf
2016-10-03 20:27:46 +00:00
Colin Cross
08f5f1f03a Fix struct vs. class mismatch in forward definitions
The warnings were being hidden by the use of -isystem to include
frameworks/native/include.

Bug: 31752268
Test: m -j
Change-Id: Ib7227295e7b94c79cdc52e19c71be4066a11cedc
2016-09-30 21:07:26 -07:00
rago
addb7af2c0 resolve merge conflicts of a80bdc3 to nyc-mr1-dev-plus-aosp
Change-Id: If5b6322e611cc1171f767d48001d9672bfd0024d
2016-09-15 18:38:16 -07:00
rago
8dc9afa966 Fix scope for visualizer object release
Bug: 30684284
Change-Id: I4170511c6c7f36aa1bce3e439054bc6b8a4a2623
2016-09-15 12:12:27 -07:00
Chih-hung Hsieh
da6d274a7d Merge "Fix google-explicit-constructor warnings in media utils." am: 5e91082b3c am: d1dd5ae76b
am: 68b9ebcd59

Change-Id: I49a2d607d1d0adfe5a4297a83771336c4cd9c870
2016-09-10 17:26:10 +00:00
Chih-hung Hsieh
68b9ebcd59 Merge "Fix google-explicit-constructor warnings in media utils." am: 5e91082b3c
am: d1dd5ae76b

Change-Id: I71778eb5a253ebf5342f863d34e178513d386783
2016-09-10 17:20:37 +00:00
Chih-hung Hsieh
5e91082b3c Merge "Fix google-explicit-constructor warnings in media utils." 2016-09-10 17:07:53 +00:00
Chih-hung Hsieh
cb98cac6d3 Merge "Fix google-explicit-constructor warnings in soundpool." am: feee33ce2c am: 17f1fc6c76
am: c80db139b3

Change-Id: I6a5f93e80d4ef18286fcb45987b6f9bbd7425f88
2016-08-30 22:50:14 +00:00
Chih-hung Hsieh
c80db139b3 Merge "Fix google-explicit-constructor warnings in soundpool." am: feee33ce2c
am: 17f1fc6c76

Change-Id: If968940949e97633e99832a3edc1d3003662dac2
2016-08-30 22:41:26 +00:00
Chih-Hung Hsieh
ae1aadc04f Fix google-explicit-constructor warnings in soundpool.
* Add explicit keyword to conversion constructors.
Bug: 28341362
Test: build with WITH_TIDY=1

Change-Id: Id1183b2929242cdf1fd0a1558d0e70194a1de9bb
2016-08-29 14:53:50 -07:00
Chih-Hung Hsieh
bd42349f7e Fix google-explicit-constructor warnings in media utils.
* Add explicit keyword to conversion constructors.
Bug: 28341362
Test: build with WITH_TIDY=1

Change-Id: I13958693f28fae9016124a43cd211e5302ed8d51
2016-08-29 14:49:57 -07:00
Eino-Ville Talvala
bc20c106df ImageReader: Add discardFreeBuffers method
am: 2e2aaf6e04

Change-Id: I142f1b011a045aa0f5af7c33eb76b059eb67e30d
2016-07-22 21:52:51 +00:00
Eino-Ville Talvala
2e2aaf6e04 ImageReader: Add discardFreeBuffers method
This method (currently @hide) discards all cached buffers for
the ImageReader, which can be useful to free up memory at the
cost of reallocationt time if more buffers are needed later.

It has no effect on acquired Images, filled Images waiting to be
acquired, or buffers being actively used by the source rendering to the
Surface.

Bug: 28695173
Change-Id: I427a8ba4ad73a267083f843dbf228bfc53a730d9
2016-07-21 17:04:19 -07:00
Wei Jia
44d76c7a72 Merge \"MediaDataSource: add DrmInitialization for IDataSource.\" into nyc-dev
am: 9604b3803c

Change-Id: Ibbb2272be91fb6c79795566cb9928bfb8adde002
2016-07-14 01:14:42 +00:00
Wei Jia
509cbb6385 MediaDataSource: add DrmInitialization for IDataSource.
Bug: 29342399
Bug: 28901867
Change-Id: Ib2049566582aa08783ff588dd25afef4e1c0b5e2
(cherry picked from commit a03dc2b5eb94a906eeeda5bf0afbcfb60588abb4)
2016-07-13 23:24:20 +00:00
Wei Jia
47efffff85 Merge \"MediaDataSource: add DrmInitialization for IDataSource.\" into nyc-mr1-dev
am: e7982e05f6

Change-Id: I7376c0f985f1a625190481e134b24501e26ab7d2
2016-07-13 02:09:07 +00:00
Wei Jia
a03dc2b5eb MediaDataSource: add DrmInitialization for IDataSource.
Bug: 29342399
Bug: 28901867
Change-Id: Ib2049566582aa08783ff588dd25afef4e1c0b5e2
2016-07-13 00:11:36 +00:00
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