10160 Commits

Author SHA1 Message Date
Andy Hung
0ad99c0597 Add AudioRecord timestamps
API change

Bug: 13569372
Bug: 22886739
Change-Id: Ic250fd0c39901f4e99c58281e371f27c241b6bed
2016-01-28 17:19:11 -08:00
Marco Nelissen
68528911b9 Fix race condition when setting default ringtones
If the device was powered off during first boot, after media scanner
inserted some entries but before the default ringtone settings were
set (or committed to disk), the default settings would not be set
on subsequent boots.

Bug: 18625739
Bug: 22349910
Bug: 25633323
Change-Id: I8ff5d3c4f842297d0675e1f5cbe17c0709a14158
2016-01-14 00:59:38 -08:00
Daichi Hirono
cc1251b9b2 Merge "Change offset and size arguments of MtpDevice#getPartialObject to Java long." 2016-01-14 02:28:45 +00:00
Daichi Hirono
2dd48256e9 Change offset and size arguments of MtpDevice#getPartialObject to Java
long.

To represents full range of 32-bit unsigned integer, we should use
jlong instead of jint.

BUG=26284424

Change-Id: Id3fa9e3daa778c204ab8e38f821d454c709c317a
2016-01-14 09:42:59 +09:00
Dongwon Kang
ab064b3b36 Merge "Add a way for SystemUI to receive media resource (e.g. A/V codec) usage" 2016-01-13 18:21:00 +00:00
Ronghua Wu
23f9efcee3 Merge "Revert "media: Add MIMETYPE_VIDEO_DOLBY_AVC and MIMETYPE_VIDEO_DOLBY_HEVC."" 2016-01-13 00:40:38 +00:00
Jean-Michel Trivi
de41d3cd5a Merge changes from topic 'recordingcallback'
* changes:
  Audio recording notification API
  AudioManager event dispatcher: make more generic
2016-01-13 00:20:56 +00:00
Jean-Michel Trivi
d3c71f075b Audio recording notification API
AudioService can register a recording callback with AudioSystem.
Callbacks are handled in a new class, RecordingActivityMonitor.
This class notifies registered AudioManager instances
  of updates, only if this AudioManager has client callbacks.
Each AudioManager dispatches updates to its registered
  callbacks.

Bug 22876530

Change-Id: I95c6e5ec0631e53af53a490bcecca96089490089
2016-01-12 16:10:42 -08:00
Dongwon Kang
2034a4c4c5 Add a way for SystemUI to receive media resource (e.g. A/V codec) usage
Bug: 26175834
Change-Id: If506a533c5c7b567e770217a9430bf68b539677a
2016-01-12 10:54:34 -08:00
Jeff Tinker
c8c0de38d1 Merge "Support AES-CBC sample encryption in MediaDrm" 2016-01-12 17:42:16 +00:00
Daichi Hirono
2a9a43369b Reland "Add event parameters to MtpEvent."
The CL was previously reviewed at ag/842930.

> We can obtain detailed information of MtpEvent from devices. e.g. object
> handle of changed object.  The CL adds the detailed information as
> properties of MtpEvent class.
>
> BUG=26480986

Change-Id: I93afad9caf118d74cd0923d70242133c4fb2a648
2016-01-12 12:14:30 +09:00
Jeff Tinker
d4ea5d3eb6 Support AES-CBC sample encryption in MediaDrm
bug:23719082
Change-Id: I06eb39bd8ad9b55ea0da4011258cac62a8c21ae1
2016-01-11 17:11:51 -08:00
Andy Hung
867b339660 Merge "Add setMasterMono and getMasterMono" 2016-01-08 23:17:56 +00:00
Andy Hung
f04b84d4c6 Add setMasterMono and getMasterMono
Bug: 15283594
Bug: 22700363
Change-Id: I5d0552938ec2a54be4450512974d92ff8c77b1e9
2016-01-08 14:02:47 -08:00
Ronghua Wu
5755817422 Revert "media: Add MIMETYPE_VIDEO_DOLBY_AVC and MIMETYPE_VIDEO_DOLBY_HEVC."
This reverts commit 58a30f1cf68e0f0bc9e6f270b0f0703fcd74c6c0.

Change-Id: I067892ea5a70f366ef20c45781616715705f4ec4
2016-01-08 09:45:17 -08:00
Daichi Hirono
1d4779c29a Add operationsSupported to device info.
Because not all MTP devices support getPartialObject, we need to check
supported operation of MTP devices. The CL adds operationsSupported
field to MtpDeviceInfo class.

BUG=26147375

Change-Id: Iaad968fb4497a5ad11bf6489097abea99c3cbac7
2016-01-08 16:58:24 +09:00
Daichi Hirono
c0a77fa95d Merge "Move MTP event code to MtpConstants class." 2016-01-08 02:09:40 +00:00
Daichi Hirono
cf62fdc0c9 Move MTP event code to MtpConstants class.
BUG=25128276

Change-Id: I49530c50d7889e1b04931b8ec61f5f92a1c7e68f
2016-01-08 11:06:02 +09:00
Glenn Kasten
25d3c7c49b Revert "Short-term fix for unregistered JNI method"
This reverts commit 7922be86e29002dc3714824b2b669a9760de0528.
2016-01-07 16:02:49 -08:00
Jean-Michel Trivi
3b61d2dfe3 AudioManager event dispatcher: make more generic
Async event dispatcher in AudioManager is hardwired for audio focus.
Make more generic so it can be used for other callbacks.

Bug 22876530

Change-Id: I9315230af10c69f65d6845bd944fce13e48c1e91
2016-01-07 14:23:13 -08:00
Glenn Kasten
7922be86e2 Short-term fix for unregistered JNI method
Bug: 26445503
Change-Id: Id40d4f026572538e3481d8e4c7142fd5489670a3
2016-01-07 10:55:26 -08:00
Glenn Kasten
d713c9d65a Merge "Use FCC_2 and FCC_8 to highlight channel count assumptions" 2016-01-07 15:54:45 +00:00
Andreas Gampe
9c180dd387 Media: Fix MtpDevice call
The signature was changed last minute. Update the media side.

Bug: 26284424
Change-Id: Ia8fb665221f60d3eadd2c32831a12aa21c6c5e9c
2016-01-06 21:15:09 -08:00
Daichi Hirono
3ad1a8ee94 Add missing style change to android_mtp_MtpDevice.cpp.
BUG=26284424

Change-Id: I0e288712a8fccfb3dd21fa927388bacf5ce155d0
2016-01-07 13:06:11 +09:00
Daichi Hirono
52da3ad906 Add getPartialObject to Java MtpDevice class.
BUG=26284424

Change-Id: Id05dc6297a1682999eee4e72972fb883fa49a5d1
2016-01-07 12:41:17 +09:00
Jeff Sharkey
60cfad80bd Discourage use of "_data" column.
Moving forward, all client file access really needs to be going
through explicit APIs like openFileDescriptor(), since that allows
the provider to better protect its underlying files.

This change also changes several classes to use the AutoClosable
pattern, which enables try-with-resources usage.  Older release()
methods are deprecated in favor of close().

Uniformly apply CloseGuard across several classes, using
AtomicBoolean to avoid double-freeing, and fix several resource
leaks and bugs related to MediaScanner allocation.  Switch
MediaScanner and friends to use public API instead of raw AIDL calls.

Bug: 22958127
Change-Id: Id722379f72c9e4b80d8b72550d7ce90e5e2bc786
2016-01-06 10:19:35 -07:00
Glenn Kasten
bd2c3d65d6 Use FCC_2 and FCC_8 to highlight channel count assumptions
Bug: 21656069
Change-Id: I20a74575eddf6e28f1777d04eeab396f28bcc0cc
2016-01-05 11:44:12 -08:00
Jae Seo
082e873999 Add a class Javadoc for MediaBrowser.MediaItem
Also fixed a typo in MediaBrowserService.

Bug: 26181781, Bug: 26182458
Change-Id: I1f672f8111a70ad9c16e9969d0fad0e504fefb8a
2015-12-19 14:38:48 +09:00
Wonsik Kim
c2d26a0835 Merge "TIF: add signal detection feature for HW inputs" 2015-12-17 07:05:51 +00:00
Wonsik Kim
102d0b7b69 TIF: add signal detection feature for HW inputs
Bug: 23820259
Change-Id: If7f03b49f7510ec405dfc4fb2b6f709b8c8b820d
2015-12-17 15:18:39 +09:00
Ronghua Wu
31788966a8 Merge "media: Add MIMETYPE_VIDEO_DOLBY_AVC and MIMETYPE_VIDEO_DOLBY_HEVC." 2015-12-11 17:47:43 +00:00
Ronghua Wu
58a30f1cf6 media: Add MIMETYPE_VIDEO_DOLBY_AVC and MIMETYPE_VIDEO_DOLBY_HEVC.
Bug: 25684127
Change-Id: I535b1971e0fe6b19e5182b09ca04b69b337a8474
2015-12-10 12:36:14 -08:00
Insun Kang
880677bdda Merge "MediaRouter: Add getDeviceType() to RouteInfo" 2015-12-10 02:57:29 +00:00
Eino-Ville Talvala
2e8ae98c2f Merge "Replace hard-coded errno values with OsConstants" am: cb299b858f
am: 6fa9cc1bd3

* commit '6fa9cc1bd3cdb0489452396f708d57e22f742bf7':
  Replace hard-coded errno values with OsConstants
2015-12-09 23:17:31 +00:00
Eino-Ville Talvala
6fa9cc1bd3 Merge "Replace hard-coded errno values with OsConstants"
am: cb299b858f

* commit 'cb299b858f4f073e2abd4ad45aa944dc0dfd0aa2':
  Replace hard-coded errno values with OsConstants
2015-12-09 21:25:15 +00:00
Eino-Ville Talvala
cb299b858f Merge "Replace hard-coded errno values with OsConstants" 2015-12-09 21:14:21 +00:00
Yin-Chia Yeh
44581ff4db Camera: add RAW_PRIVATE format
Also add necessary plumbing for RAW_PRIVATE to work for ImageReader.

Bug: 25596619
Change-Id: Ic90f3f44264ac46fae1fafbc27ac64b5319f0970
2015-12-09 11:20:32 -08:00
Jeff Tinker
67b39bfa08 Merge "Remove unused MediaDrm.unprovisionDevice" 2015-12-09 17:07:35 +00:00
Jeff Tinker
dade24c12a Remove unused MediaDrm.unprovisionDevice
bug:25726218
Change-Id: Ibbd51aaa1ee4c21c9ec8b162fc6e378ab7ba6e7b
2015-12-09 09:02:31 -08:00
Insun Kang
9dd66417ea MediaRouter: Add getDeviceType() to RouteInfo
Bug: 24777080
Change-Id: I5d7b44ec84371fbb9560578ece439e1a00dcdd50
2015-12-09 14:04:09 +09:00
Zhijun He
dc6bb24a3c media: improve ImageReader/Writer native memory management
* Hook up the native allocation registration with ImageWriter, such that GC
can get some hint when clean up the large memory object.
* Close all pending images when closing ImageReader. This could avoid native
mem leaks for some bad app practice. For example, some apps may hold images
in background service when activity is paused/destroyed, which could cause
huge native memory leaks even ImageReader is closed.
* make Image close thread safe: it is possible the clients close the image
in listener thread and the client main thread.
* Some minor code refactor to reduce the code duplication.

Bug: 25088440
Change-Id: I37d22b52aeb8d2521bf9c702b0f54c05905473e0
2015-12-07 14:38:37 -08:00
Lazar Trsic
8ea56f6851 Replace hard-coded errno values with OsConstants
Errno values have been hard-coded inside java code. On the native side
however, bionic's errno.h is used (through utils/Errors.h). Some of
the numbers are architecture dependent (EOPNOTSUPP, ETIMEDOUT...).

This causes Camera app to crash on MIPS devices. There is a check for
expected errors, in CameraBinderDecorator.throwOnError, but the error
(EOPNOTSUPP) is not recognized and an exception is thrown.

Change-Id: I8bcac8f1ced50c76614f566a6e624967a18a25e1
2015-12-04 12:41:37 +01:00
Neil Fuller
1d4775fbb2 Merge "Add thread safety documentation" 2015-12-04 11:09:53 +00:00
Andy Hung
b0545b6b1e DO NOT MERGE SoundPool: add lock for findSample access from SoundPoolThread am: 0a887bcd5c am: 7c798c13a7 am: 94cefd6adb am: a30685ef8d
am: ae4b789619

* commit 'ae4b7896195727dfd8d00b90f25074206bf21775':
  DO NOT MERGE SoundPool: add lock for findSample access from SoundPoolThread
2015-12-03 19:55:32 +00:00
Andy Hung
a30685ef8d DO NOT MERGE SoundPool: add lock for findSample access from SoundPoolThread am: 0a887bcd5c am: 7c798c13a7
am: 94cefd6adb

* commit '94cefd6adb7cf464e4765faaba001071b543517b':
  DO NOT MERGE SoundPool: add lock for findSample access from SoundPoolThread
2015-12-03 19:42:45 +00:00
Andy Hung
94cefd6adb DO NOT MERGE SoundPool: add lock for findSample access from SoundPoolThread am: 0a887bcd5c
am: 7c798c13a7

* commit '7c798c13a7c36f3c8877f410ecf5552e1b385805':
  DO NOT MERGE SoundPool: add lock for findSample access from SoundPoolThread
2015-12-03 19:34:01 +00:00
Andy Hung
7c798c13a7 DO NOT MERGE SoundPool: add lock for findSample access from SoundPoolThread
am: 0a887bcd5c

* commit '0a887bcd5c5a8056735d221ad71afcff1f6eb1a6':
  DO NOT MERGE SoundPool: add lock for findSample access from SoundPoolThread
2015-12-03 19:24:02 +00:00
Andy Hung
0a887bcd5c DO NOT MERGE SoundPool: add lock for findSample access from SoundPoolThread
Sample decoding still occurs in SoundPoolThread
without holding the SoundPool lock.

Bug: 25781119
Change-Id: I11fde005aa9cf5438e0390a0d2dfe0ec1dd282e8
(cherry picked from commit 0275a982abecee683f16c827d405eafe51fb67ae)
2015-12-02 23:28:28 +00:00
Chris Elliott
a6ed5dcd04 DO NOT MERGE Revert "MediaPlayer: Disable acquiring wakelocks based on property." am: 8e79dae3f6
am: 087d30c142

* commit '087d30c14243f38c28793877b8e5ad12d3a2b269':
  DO NOT MERGE Revert "MediaPlayer: Disable acquiring wakelocks based on property."
2015-12-02 22:46:11 +00:00
Chris Elliott
8e79dae3f6 DO NOT MERGE Revert "MediaPlayer: Disable acquiring wakelocks based on property."
This reverts commit f60491183def4c46b4026afb4648544e7289ea5f.
2015-12-02 13:16:46 -08:00