10085 Commits

Author SHA1 Message Date
Chih-Hung Hsieh
c6baf563ba Fix google-explicit-constructor warnings.
Bug: 28341362
Change-Id: Ibdd6a210bb7ff228e3624cc319169f77aca3b51e
2016-04-27 11:38:12 -07:00
Tobias Thierer
4bd017d6a5 frameworks/base: Avoid Long object allocations in Long.valueOf()
Replace usages where the Long is immediately unboxed or thrown
away with Long.parseLong().
In TaskRecord.java, I also fixed up similar uses of
{Boolean,Integer}.valueOf()

Tested: built frameworks/base successfully.

Bug: 28289401
Change-Id: I1fad536853a68c7b0707cbf02989aca155064843
2016-04-21 16:23:56 +01:00
Andreas Gampe
17b069c0f4 Merge "Frameworks/base: Fix old code in MediaPlayer" 2016-04-16 00:40:01 +00:00
Christopher Wiley
6ac565687b libfilterfw_jni needs libmedia include paths
This library includes libmedia headers, and needs its full include path.

Bug: 27804373
Test: This code compiles with a slightly modified libmedia include
      path.

Change-Id: Ic9253c0f0e7236435f36f2baf47411ca7db187cd
2016-04-14 10:21:03 -07: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
Glenn Kasten
faf2c42ac9 Merge "Correct MediaAudioTrackTest testPlaybackHeadPositionAfterStop" 2016-03-28 14:42:46 +00:00
Marco Nelissen
2c37b515ee Merge "Remove the field of MediaDrm from inner class CryptoSession." 2016-03-17 15:43:32 +00:00
Marco Nelissen
258baa35c0 Merge "Do not scan a file which cannot be read" 2016-03-17 15:42:02 +00:00
Brian Carlstrom
73d28418a4 Remove unneeded dependecy on core-tests to fix build
Bug: 27555885

(cherry picked from commit 2687673025f9b5a86f917135d2a8288d4f31818b)

Change-Id: I6c0aee5c1823b6c498d9306e4a7c749b093e6834
2016-03-08 17:57:16 -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
Zhijun He
38e8a7f89f Merge "ImageReader: override the flexible YUV compatible formats"
am: 90804668a8

* commit '90804668a8a3fcbc661a6fba32737d1468194941':
  ImageReader: override the flexible YUV compatible formats
2016-02-24 01:56:43 +00:00
Zhijun He
90804668a8 Merge "ImageReader: override the flexible YUV compatible formats" 2016-02-24 01:46:12 +00:00
Neil Fuller
1f87f1e971 Merge changes from topic \'java_util_function_tests\'
am: 6b50207596

* commit '6b5020759651d1ed4d9f25ce3ab1e7c360b02fe7':
  Add flags needed to switch Jack to 1.8 for CTS targets
  Add flags needed to switch Jack to 1.8 for CTS targets
2016-02-19 10:34:14 +00:00
Neil Fuller
dce343dc41 Add flags needed to switch Jack to 1.8 for CTS targets
When linking against .jack files that contain 1.8 language
features Jack (currently) requires -D jack.java.source.version=1.8.

"core-tests" includes 1.8 language features.

Bug: 27113322
Bug: 26953739
(cherry-picked from commit a835180b74af2cad853db08e8d41a7b04773759b)

Change-Id: I2be4db6788b14558f74534c24bb007f7fb8b6b67
2016-02-18 14:16:59 +00:00
Zhijun He
3a171a7642 ImageReader: override the flexible YUV compatible formats
For gralloc HAL v0.1 devices, if the producer buffer format is NV21 or YV12,
the returned flexFormat will be NV21 or YV12, which causes CTS failure
for ImageReader decoder test. This change overrides the NV21 or YV12 image
formats to HAL_PIXEL_FORMAT_YCbCr_420_888 for such case. With this, the
ImageReader will work for the devices with older gralloc HAL implementations
for HAL_PIXEL_FORMAT_YCbCr_420_888 compatible formats.

Bug: 27136665
Change-Id: Ib4722f1f8dc20ad6561088755e4ab9d2e68f1b47
2016-02-17 18:27:55 -08:00
Bill Yi
2528fcdfbd Merge commit '26ada7e78993241d702a908eae93d174cbb3c8b3' into HEAD
Change-Id: Ifc45930160cf01ee78ecfbfdc48697055f82e0a7
2016-02-17 11:38:55 -08:00
Bartosz Bialek
6124cddc62 Do not scan a file which cannot be read
When the media scanner is invoked to scan a file which it cannot access
(e.g. one in the app-private directories) the related database entry
will be created anyway, which doesn't make sense. This results in having
broken entries showed up in e.g. Album app.

This fix is to prevent scanning files which are inaccessible.

Change-Id: I5b4909bf709c82d66e891f3e7f6890febc90c6eb
2016-02-17 15:31:39 +01:00
Dimitry Ivanov
5a06e3747d Add missing liblog dependency
Bug: http://b/27171986
Change-Id: I40b93ac0d4bfacfc38c08b5dbc5d2b3358a976cb
2016-02-12 16:44:33 -08:00
Neil Fuller
f19a33a070 Merge "Add thread safety documentation"
am: b3ea05a56e

* commit 'b3ea05a56ea980541d328ab7534a2da230d62c06':
  Add thread safety documentation
2016-01-15 16:36:34 +00:00
Neil Fuller
2c9d40a06e 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
(cherry-picked from commit bf0dc0fba790cf95f76870c37469703f8f20a57c)

Change-Id: I328b96328e89950b90d537bf0a6a704242de4993
2016-01-15 16:26:26 +00:00
Justin Harrison
5cb336586e Merge "Fix race condition when setting default ringtones" into mnc-dr1.5-dev am: e41a6c8b19
am: 2363da89a4

* commit '2363da89a431d8809c49e4bb9568f63887e6e33e':
  Fix race condition when setting default ringtones
2016-01-14 06:48:37 +00:00
Marco Nelissen
7d9fab680e 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-12 17:12:36 +00:00
Li Chen
028e91c344 Remove the field of MediaDrm from inner class CryptoSession.
As CryptoSession is an inner (non-static) class of MediaDrm,
it's not necessary to pass in a reference of MediaDrm while
creating a CryptoSession instance.

Change-Id: Ic3cc03f885d14bc8d93287c918e778550cc21b58
2015-12-30 13:34:49 +08: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
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
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
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
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
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
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
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
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
Glenn Kasten
613c63c742 Merge "BluetoothMidiDevice: change write type to support JamStik"
am: 6079b990f1

* commit '6079b990f1461011a9dedb47cc65db1ce062e199':
  BluetoothMidiDevice: change write type to support JamStik
2015-11-02 23:06:04 +00:00
Glenn Kasten
bd32753700 Merge "BLE-MIDI: change binding for BluetoothMidiService"
am: 5831944a6e

* commit '5831944a6e99eff746e70d6ee9532ec3e3f32918':
  BLE-MIDI: change binding for BluetoothMidiService
2015-11-02 23:04:42 +00:00
Glenn Kasten
d8a8500429 Merge "MidiBluetoothService: add new device to HashMap"
am: 9b07ba4bc3

* commit '9b07ba4bc33319d6db8de173a24eb13b2d7f0b50':
  MidiBluetoothService: add new device to HashMap
2015-11-02 23:03:18 +00:00
Glenn Kasten
58f41c3b76 Merge "MidiManager: fix double BTLE callback"
am: bbf34d0bd1

* commit 'bbf34d0bd1bc4f85c9af614291925f5da1fa0459':
  MidiManager: fix double BTLE callback
2015-11-02 23:01:49 +00:00
Glenn Kasten
350dc16475 Merge "MidiService: update listener with current status when registered"
am: d4e9b9e4ac

* commit 'd4e9b9e4ac4196d37b0a5e59867f5a51018f4087':
  MidiService: update listener with current status when registered
2015-11-02 23:00:15 +00:00
Phil Burk
d11e59ec6b BluetoothMidiDevice: change write type to support JamStik
Temporarily use a Request instead of a Command so that the JamStik
will be properly enabled.

Bug: 24207964
Change-Id: I3d11732958c46e6039405b5969d5af0db8032fb9
Signed-off-by: Phil Burk <philburk@google.com>
(cherry picked from commit 95129f50c68c734c5ebdf32ff6b8b9c63cc1ada7)
2015-11-02 13:31:29 -08:00
Phil Burk
ff23e1b4cb BLE-MIDI: change binding for BluetoothMidiService
Add a remote call addBluetoothDevice() using AIDL.
This was needed because onBind() is only called once.

Bug: 23219556
Bug: 23760886
Change-Id: Id7554ca55d596352d11dbd6ae3e403138a29c864
Signed-off-by: Phil Burk <philburk@google.com>
(cherry picked from commit 7cd06c0b9e087a555d2c5dd4cab5b7eac8497526)
2015-11-02 13:31:29 -08:00
Phil Burk
2e48f1b96e MidiBluetoothService: add new device to HashMap
The HashMap is being used but devices never added to the map.

Bug: 23429459
Change-Id: I1da5305a56f5bd48e1c5d9345e721ea8dd2eed4e
Signed-off-by: Phil Burk <philburk@google.com>
(cherry picked from commit e5f722e55c5708c2b48b8c9688c135e451225032)
2015-11-02 13:31:29 -08:00