11557 Commits

Author SHA1 Message Date
Sungsoo Lim
48d25dc7bd Merge "MediaBrowser: Introduce the search API" 2016-12-15 06:40:03 +00:00
George Burgess IV
56489bd5d0 Merge "Fix a memory leak." am: 1715678a89 am: 8f9c005fa9 am: 85785b557a
am: 9dfed40bd8

Change-Id: I35b03837734c4bab706faf99e8f9d3596e7ead92
2016-12-15 00:31:03 +00:00
George Burgess IV
85785b557a Merge "Fix a memory leak." am: 1715678a89
am: 8f9c005fa9

Change-Id: I29afa8d1394feb57574ed527cda102405571fd65
2016-12-14 23:41:26 +00:00
Eino-Ville Talvala
52d600769c Merge "Camera: Updates in preparation for HIDL" 2016-12-14 23:08:14 +00:00
Marco Nelissen
d194a782ba Merge "Revert "Remove AmrInputStream"" am: e2d8581529 am: 01cb199bed am: 8b1eed4ee8
am: 10cb330d3e

Change-Id: I5c97e47ff9a5f193645660c195ddd707b86ad025
2016-12-14 17:19:46 +00:00
Marco Nelissen
8b1eed4ee8 Merge "Revert "Remove AmrInputStream"" am: e2d8581529
am: 01cb199bed

Change-Id: Icafcabcc2b99dac4d897e0d68725c53e84fdd5c5
2016-12-14 17:05:59 +00:00
Marco Nelissen
a4efbf863b Revert "Remove AmrInputStream"
This reverts commit 0c3518cc7724df29b790d9d81af9a105e7958cf7.

Change-Id: I250d86d2d6ce462cb5f29bc6c312d88a49ac24a4
2016-12-14 16:44:12 +00:00
Marco Nelissen
0c57bd90b6 Merge "Remove AmrInputStream" am: 70b262b0f2 am: e57b37e423 am: b10837952a
am: 688fa0e9f0

Change-Id: I95947386bda60d69b5fb76dc00b2e7fb82d55878
2016-12-13 23:42:21 +00:00
George Burgess IV
5572d1607b Fix a memory leak.
This was caught by clang's static analyzer. Warning:
frameworks/base/media/mca/filterfw/native/core/shader_program.cpp:1031:3:
warning: Potential leak of memory pointed to by 'attrib.owned_data'
    return StoreAttribute(attrib);

Bug: None.
Test: The static analyzer no longer complains.
Change-Id: Ibef0368dfa48ba57e38019a5a3e33d5bacd847a2
2016-12-13 15:32:00 -08:00
Marco Nelissen
b10837952a Merge "Remove AmrInputStream" am: 70b262b0f2
am: e57b37e423

Change-Id: Ia95832144e831b91ba0f163db1da8ef8e7033446
2016-12-13 23:28:55 +00:00
Marco Nelissen
0c3518cc77 Remove AmrInputStream
Bug: 32114618
Change-Id: I55328e6f003377f4d3c2ba2266844047b1422f49
2016-12-13 13:31:10 -08:00
Eino-Ville Talvala
283ae234f9 Camera: Updates in preparation for HIDL
- For all camera2 paths, and anything shared between the legacy API and
  camera2, switch to using String for camera IDs.
- Remove assumption that camera device IDs must be a dense set of small
  integers, and rewrite the camera ID query methods
- Change operation of ICameraService.addListener: it now returns the list of
  available devices directly, instead of invoking callbacks. This is
  needed to ensure an up-to-date list of cameras is immediately available
  on connection to the camera service.
- Add new CameraStatus object to use as the addListener return value
- Update tests to work with new interface

Test: cts-tradefed run cts -m Camera --skip-connectivity-check -d -o --abi armeabi-v7a --disable-reboot
Bug: 32991422
Change-Id: I6ff4a5dd014c6aefe0750850eeece6f3267a3e5b
2016-12-13 12:12:21 -08:00
Jerry Zhang
d9291d55f6 Merge "Modify UsbDeviceManager stack to allow MtpServer to use FunctionFS drivers." am: 1975240f17 am: 830874dbe7 am: 88672d7d29
am: 11dc0eccfb

Change-Id: Ibafebe4877052595cb34626bde9ac6fba1983fb0
2016-12-13 01:02:55 +00:00
Jerry Zhang
88672d7d29 Merge "Modify UsbDeviceManager stack to allow MtpServer to use FunctionFS drivers." am: 1975240f17
am: 830874dbe7

Change-Id: I930f006ffd7a429379638aa4f8268ed443a3696b
2016-12-13 00:37:12 +00: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
Sungsoo
8fb6addcbe MediaBrowser: Introduce the search API
Bug: 28210241
Test: passed cts test (MediaBrowserServiceTest and MediaBrowserTest)
Change-Id: I73c58f5385637c626da1503d27e518b4f0c9ea80
2016-12-12 11:27:33 +09:00
Sungsoo Lim
52dd278eb3 Merge "ExifInterface: fix NegativeArraySizeException" am: c57b472d67
am: 582e612fdc

Change-Id: I671ef98f05431e7c4baa2a7b84f6cb04a82c5d9d
2016-12-05 04:47:33 +00:00
Sungsoo Lim
582e612fdc Merge "ExifInterface: fix NegativeArraySizeException"
am: c57b472d67

Change-Id: Ifbe9af9b62837923e6e56159759da6c59795b3aa
2016-12-05 04:41:30 +00:00
TreeHugger Robot
9593f04fb2 Merge "ExifInterface: fix NegativeArraySizeException" 2016-12-05 02:22:46 +00:00
NIEJuhu
dbe99b56ec ExifInterface: fix NegativeArraySizeException
The IFD entry has a 4-byte field COUNT. It is read as int type
and is used as array size by ExifInterface. If a crafted JPEG
file contains a negative value, a NegativeArraySizeException
occurs.

Test: passed ExifInterface CTS
Change-Id: Ief29936400f04636928df09e7f357cbf25345383
Signed-off-by: NIEJuhu <niejuhu@xiaomi.com>
2016-12-05 09:18:58 +09:00
Jean-Michel Trivi
d29d66c787 Merge "Stream types are for volume control" 2016-12-02 17:33:54 +00:00
NIEJuhu
8708c80cde ExifInterface: fix NegativeArraySizeException
The IFD entry has a 4-byte field COUNT. It is read as int type
and is used as array size by ExifInterface. If a crafted JPEG
file contains a negative value, a NegativeArraySizeException
occurs.

Change-Id: Ief29936400f04636928df09e7f357cbf25345383
Signed-off-by: NIEJuhu <niejuhu@xiaomi.com>
2016-12-02 06:42:58 +00:00
Wei Jia
400752a790 Merge "MediaPlayer: enable same seek modes as in MediaMetadataRetriever." 2016-12-01 22:08:11 +00:00
Wei Jia
ebc2b694d1 MediaPlayer: enable same seek modes as in MediaMetadataRetriever.
Test: manually check result of mediaplayer.seekTo
Bug: 32557491
Change-Id: Ib507fbfb86a24fcf9b42758e89e595a4a58d33b5
2016-12-01 12:32:34 -08:00
Jean-Michel Trivi
2f7511fd06 Stream types are for volume control
Deprecate methods where stream types are not used for
  volume control operations.
Add a warning in the logs about the use of stream
  types to encourage migration to audio attributes.
Since STREAM_ACCESSIBILITY is added in O for the
  volume of a11y audio, throw an exception when
  trying to use it for playback.

Test: make offline-sdk-docs
Bug: 30955183

Change-Id: I7fcf79f1de68f217a9b19561aa1325ade169dfcf
2016-11-30 09:54:23 -08:00
Marco Nelissen
9985ed8b15 Merge "No need to initialize the file sniffers anymore" 2016-11-28 22:28:53 +00:00
Jean-Michel Trivi
1c94fdc469 Merge changes from topic 'a11yModal'
* changes:
  Javadoc and AudioManager update for A11Y stream
  Conditional behavior for a11y stream volume
2016-11-28 22:24:40 +00:00
Marco Nelissen
7e5e1b0d72 No need to initialize the file sniffers anymore
Bug: 33166870

Change-Id: I9f944fcb7d63ca4eb31aec5e7e97e3e0e499cc39
2016-11-28 19:05:32 +00:00
Jean-Michel Trivi
8e0bc783e9 Javadoc and AudioManager update for A11Y stream
AudioManager:
  - add missing references to STREAM_ACCESSIBILITY
  - add STREAM_ACCESSIBILITY in getDevicesForStream() method
  (this method is only ever called for STREAM_MUSIC)

Test: make offline-sdk-docs
Bug: 30448020
Change-Id: I449082ff01e9822e7e7dca69762c197468237d67
2016-11-25 10:22:23 -08:00
Jean-Michel Trivi
ac48767f91 Conditional behavior for a11y stream volume
VolumePolicy: define two a11y modes: 1/ legacy where
  a11y volume aliases to media volume, 2/ a11y where
  the a11y volume is independent from any other stream
  type volume.
Refactor accessibility service listening to accomodate
  communicating to the volume controller when the
  a11y service is running.
Make accessibility stream alias conditional on a11y
  service running. Reflect the behavior in the
  volume controller.

Test: enable Talkback and verify logs in Vol controller
Bug 30448020

Change-Id: I80535ba259a22b6d93e62a7b3ca462a19d4c84b7
2016-11-23 16:31:38 -08:00
George Burgess IV
a1963e422b Merge "Fix static analyzer warnings." am: 9c69c41b95 am: 4cfb0f020f am: 6ab25ba5f1
am: cf1a558aed

Change-Id: I4e2608df649dfd3384aadd1f69d88ffc69bf7ea9
2016-11-23 03:05:46 +00:00
George Burgess IV
6ab25ba5f1 Merge "Fix static analyzer warnings." am: 9c69c41b95
am: 4cfb0f020f

Change-Id: I127bbf30a44342e2464a29c7b1793861f3c44931
2016-11-23 02:56:11 +00:00
George Burgess IV
4cfb0f020f Merge "Fix static analyzer warnings."
am: 9c69c41b95

Change-Id: I62b951aa16a714343f155fa3af86f58933212ebb
2016-11-23 02:52:13 +00:00
Treehugger Robot
9c69c41b95 Merge "Fix static analyzer warnings." 2016-11-23 02:45:54 +00:00
Jean-Michel Trivi
6d5723fe4e Merge "Define stream type for accessibility volume control" 2016-11-22 16:28:48 +00:00
Jean-Michel Trivi
3f0945a608 Define stream type for accessibility volume control
New stream type for accessibility volume.
Add related appOps.

Test: see added CTS tests in AudioManagerTest & Stub
Bug 30448020

Change-Id: I34f96713b22fedf75322b8ffe2b96a7c566f5009
2016-11-21 15:15:45 -08:00
Jeff Tinker
66f6547ba9 Merge "Removing widevine classic" 2016-11-21 17:53:18 +00:00
Wei Jia
a16946abfd Merge "mediaplayer: support same seek mode as MediaMetadataRetriever." 2016-11-18 23:42:23 +00:00
Wei Jia
008fb02824 mediaplayer: support same seek mode as MediaMetadataRetriever.
Test: compiles
Bug: 32557491

Change-Id: Idb4d50505d7708a1402a26f652d0a6966e26bb6b
2016-11-18 11:27:14 -08:00
Hyundo Moon
af18c40b70 Merge "Fix wrong JavaDoc parameter names of ExifInterface.getJpegAttributes()" 2016-11-17 04:49:12 +00:00
Hyundo Moon
89779299f1 Fix wrong JavaDoc parameter names of ExifInterface.getJpegAttributes()
Test: By comparing the parameter names manually.
Change-Id: I3f67e43174754a73d498be6bf2882481cd80a648
2016-11-17 11:44:12 +09:00
Jeff Tinker
d2e9a52b1d Removing widevine classic
bug:30505334
Change-Id: I21ae4808c04b15a5b298c604494b17de436fb250
2016-11-16 02:12:08 +00:00
Jean-Michel Trivi
8e48c6939b Refactor SoundPool for appOps handling through PlayerBase
Modified the signature of the abstract volume methods so
  it is clear at the subclass level whether the volume
  command is for a mute or a volume control.
  Changed the implementations in the subclasses
  accordingly.
Removed appOps handling inside SoundPool and made it
  inherit from PlayerBase.
Moved handling of the camera sound restriction from
  SoundPool to PlayerBase.
Added support in SoundPool native implementation for
  muting, as each player has its own volume.

Test: play a long file with SoundPool and enter DnD mode

Bug: 30955183
Bug: 28249605

Change-Id: I0fcd7480f9a455c06aa4f7092486f5c65bc9d7db
2016-11-14 09:36:11 -08:00
Marco Nelissen
fd91fcc970 Merge "Make AmrInputStream use MediaCodec" am: 866658261f
am: 618c1a9ae6

Change-Id: Ic6723d4e2ce7ab401908ca955a785463612509bb
2016-11-11 20:16:00 +00: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
Jeff Sharkey
d0ac9d3bac Merge "Detect non-oneway calls leaving system_server." 2016-11-09 16:51:41 +00:00
Marco Nelissen
2a6aae0857 Drm APIs are in libmediadrm instead of libmedia
Test: build/boot
Change-Id: I4a6929d2d524d5f2f7ffa06f68a3c1041804e125
2016-11-07 16:37:06 -08:00
Jeff Sharkey
0a17db1cc5 Detect non-oneway calls leaving system_server.
To protect system stability, any Binder calls leaving the
system_server must carefully be performed using FLAG_ONEWAY (or
the 'oneway' verb in AIDL) which prevents the call from blocking
indefinitely on the remote process.

In this CL, the system_server uses the new Binder.setWarnOnBlocking()
method to enable detection by default for all remote Binder
interfaces.  It can also use Binder.allowBlocking() to allow
blocking calls on certain remote interfaces that have been
determined to be safe.

This CL adds the 'oneway' verb to several interfaces and methods
where it should have been added, and marks a handful of system
ContentProviders as being safe to call into.  Also, we assume that
any services obtained from ServiceManager are part of the core
OS, and are okay to make blocking calls to.

Test: builds, boots, runs with minimal logs triggered
Bug: 32715088
Change-Id: Ide476e120cb40436a94b7faf7615c943d691f4c0
2016-11-07 17:03:37 -07:00
Marco Nelissen
e327563c6c Merge "Use libaudioclient" am: 0a05c49248
am: 1d10b88f40

Change-Id: I55ad06914aae308f7ffa46c27b9bab3db46cdc1c
2016-11-07 17:31:52 +00:00