10133 Commits

Author SHA1 Message Date
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
Andy Hung
a9292a24c0 Merge "SoundPool: add lock for findSample access from SoundPoolThread" 2015-12-02 18:27:08 +00:00
Sungsoo Lim
0d3d1f825f Fixed typos: when when
Change-Id: I80c0b8817dcbed45071e42d9ffa88bae52a93a81
2015-12-02 14:50:36 +09:00
Chris Elliott
d76acc8093 Merge "MediaPlayer: Disable acquiring wakelocks based on property." into cw-e-dev am: 50276adde2 am: c54aa0c3f7 am: 767e2b39db
am: 1709832d47

* commit '1709832d474a7be85d46e55fab5773e399cd7086':
  MediaPlayer: Disable acquiring wakelocks based on property.
2015-12-01 23:47:45 +00:00
Chris Elliott
1709832d47 Merge "MediaPlayer: Disable acquiring wakelocks based on property." into cw-e-dev am: 50276adde2 am: c54aa0c3f7
am: 767e2b39db

* commit '767e2b39db78e41241998b7b3941a15d68c6b4f2':
  MediaPlayer: Disable acquiring wakelocks based on property.
2015-12-01 23:37:28 +00:00
Andy Hung
0275a982ab SoundPool: add lock for findSample access from SoundPoolThread
Sample decoding still occurs in SoundPoolThread
without holding the SoundPool lock.

Bug: 25781119
Change-Id: I11fde005aa9cf5438e0390a0d2dfe0ec1dd282e8
2015-12-01 14:40:26 -08:00
Neil Fuller
bf0dc0fba7 Add thread safety documentation
An upcoming change will remove "synchronized" from the API docs. This change
documents those cases where the guarantees can be determined from code
inspection.

Bug: 25767152
Change-Id: I75083ce01513ed315222304fe3f34190d40748cb
2015-11-26 13:33:48 +00:00
Jean-Michel Trivi
d4de20df2a AudioService: remove dead code
Remove dead code related to media button event receiver and
  remote control display, now handled by MediaSession*

Change-Id: I4bd621240ddddf4df079df8d551c72b232c3301d
2015-11-23 23:16:04 +00:00
Sridhar Vashist
f60491183d MediaPlayer: Disable acquiring wakelocks based on property.
Ignore setWakeMode based on system property.
Wakelocks essential for playback will be held by audioflinger.

Change-Id: I413cd873bf21e1e999dbf89a27802fbe1b6022c7
Signed-off-by: Sridhar Vashist <svashist@motorola.com>
2015-11-23 14:09:25 -08:00
Jae Seo
c94c051822 TIF: Use System.nanoTime() to measure execution durations in sessions
When the wall clock is adjusted to the broadcast time, the duration
measurement in ITvInputSessionWrapper may go wrong. To avoid this, use
System.nanoTime() that doesn't depend on the wall clock.

Bug: 25370822
Change-Id: I2ddb968b5e146500429b82979fe48262bf335993
2015-11-20 17:00:26 -08:00
Eino-Ville Talvala
346bc968f9 Merge "Don\'t use timestamps with all zero" am: 9574e58027 am: be1a3f8b66
am: 7ca29b3ea2

* commit '7ca29b3ea287883c1c55c62a0e654a87cc81b75d':
  Don't use timestamps with all zero
2015-11-17 23:21:29 +00:00
Dianne Hackborn
8958c1effb Merge "Initial stab at background check." 2015-11-17 19:13:32 +00:00
Eino-Ville Talvala
be1a3f8b66 Merge "Don\'t use timestamps with all zero"
am: 9574e58027

* commit '9574e58027f8edeb539ecedf2988c1a302887807':
  Don't use timestamps with all zero
2015-11-17 02:00:53 +00:00
Dianne Hackborn
bef28feba5 Initial stab at background check.
Actually, this implementation is more what we want for ephemeral
apps.  I am realizing the two are not really the same thing. :(

For this implementation, we now keep track of how long a uid has
been in the background, and after a certain amount of time
(currently 1 minute) we mark it as "idle".  Any packages associated
with that uid are then no longer allowed to run in the background.
This means, until the app next goes in the foreground:

- No manifest broadcast receivers in the app will execute.
- No services can be started (binding services is still okay,
  as this is outside dependencies on the app that should still
  be represented).
- All alarms for the app are cancelled and no more can be set.
- All jobs for the app are cancelled and no more can be scheduled.
- All syncs for the app are cancelled and no more can be requested.

Change-Id: If53714ca4beed35faf2e89f916ce9eaaabd9290d
2015-11-16 17:58:32 -08:00
Sungsoo Lim
70ffbdca62 Make TvContentRating.contains() public
Apply the feedback from API council.

Bug: 25726616
Change-Id: I9858a61eea50ff95221d453117fe3d991f88a33f
2015-11-17 10:34:04 +09:00
Sungsoo Lim
2189f58ec5 MediaBrowser: Handle null results properly in onLoadChildren
Bug: 19127753
Change-Id: I7ddad87e5ec6338a74c340485fed583107709acf
2015-11-16 14:46:29 +09:00
Michal Piechowski
43b0a458ab Don't use timestamps with all zero
Although all zero (0000:00:00) is valid time, in most cases it means
that value is not present. According to http://www.exiv2.org/Exif2-2.PDF
in such case those values should be omitted, however
some cameras set them to 0 anyway. With this commit such timestamps
will be treated as they were empty.

Change-Id: I9c762b1fa04ea6bf9c0fba9e2459a20430c71c90
2015-11-13 10:05:06 +09:00
Ian Pedowitz
c9711721f3 Merge "Revert "Fix race condition when setting default ringtones"" into mnc-dr-dev am: 88d4cc1001 am: 4f22c781b6 am: 44df02fc17
am: 4ab979e6cc

* commit '4ab979e6cc0c63b97b79441b478e30c8febdc3ee':
  Revert "Fix race condition when setting default ringtones"
2015-11-11 22:13:11 +00:00
Ian Pedowitz
4ab979e6cc Merge "Revert "Fix race condition when setting default ringtones"" into mnc-dr-dev am: 88d4cc1001 am: 4f22c781b6
am: 44df02fc17

* commit '44df02fc17bb0f3f1c445166c6cbd7f4d92b4eb6':
  Revert "Fix race condition when setting default ringtones"
2015-11-11 22:04:28 +00:00
Ian Pedowitz
4f22c781b6 Merge "Revert "Fix race condition when setting default ringtones"" into mnc-dr-dev
am: 88d4cc1001

* commit '88d4cc100175a54be3b7d560a91c38197f59f4bf':
  Revert "Fix race condition when setting default ringtones"
2015-11-11 21:46:06 +00:00
Ian Pedowitz
05ce0c6bb0 Revert "Fix race condition when setting default ringtones"
This reverts commit f2cb9341ff864e6d9cc6797857665b2281643a74.

Change-Id: I151972052aea47bf8c6823eb8bbf8161c5a7a4f0
2015-11-11 21:38:04 +00:00
Jeff Tinker
807ea28eef Merge "Improve MediaCodec.CryptoException log messages" 2015-11-10 21:16:44 +00:00
Jeff Tinker
3ccb34d707 Improve MediaCodec.CryptoException log messages
The message being logged is "Unknown error" even for
known error types.  This change provides more descriptive
error strings, for the case when the message isn't
explicitly provided by the DRM plugin.

Change-Id: Ic86478d7685cd33e21ecd2f875ef7dbed351e52e
related-to-bug: 25477595
2015-11-09 17:31:05 -08:00
Jeff Tinker
b801f7b891 Merge "Extend MediaCodec.CryptoInfo to support Sample AES" 2015-11-09 23:11:21 +00:00
Marco Nelissen
ff5fe15d34 Merge "Fix race condition when setting default ringtones" into mnc-dr-dev am: 83702ec3ed am: 02bf433f90 am: 8fb0121cb6
am: b67ae42ad0

* commit 'b67ae42ad07ed6a5b4927c41089076e6eafd6949':
  Fix race condition when setting default ringtones
2015-11-09 21:46:06 +00:00
Marco Nelissen
b67ae42ad0 Merge "Fix race condition when setting default ringtones" into mnc-dr-dev am: 83702ec3ed am: 02bf433f90
am: 8fb0121cb6

* commit '8fb0121cb60ddf54a22bff088670594f422edea9':
  Fix race condition when setting default ringtones
2015-11-09 21:39:41 +00:00
Marco Nelissen
02bf433f90 Merge "Fix race condition when setting default ringtones" into mnc-dr-dev
am: 83702ec3ed

* commit '83702ec3edf3bd17eff90a409cc3cf5efab48cff':
  Fix race condition when setting default ringtones
2015-11-09 21:28:32 +00:00
Marco Nelissen
f2cb9341ff 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
Change-Id: Iff07da59a9c6d53bf2950bd107ee74d02b7f48d6
2015-11-06 10:50:47 -08:00