7499 Commits

Author SHA1 Message Date
Ashok Bhat
18b4cbeede AArch64: Make graphics classes 64-bit compatible
This a merger of two commits submitted to AOSP by
the following authors:

ashok.bhat@arm.com, david.butcher@arm.coma
craig.barber@arm.com, kevin.petit@arm.com and
marcus.oakland@arm.com

Due to the very large number of internal conflicts, I
have chosen to cherry-pick this change instead
of letting it merge through AOSP because the merge
conflict resolution would be very hard to review.

Commit messages below:

================================================
AArch64: Make graphics classes 64-bit compatible

Changes in this patch include

[x] Long is used to store native pointers as they can
    be 64-bit.

[x] Some minor changes have been done to conform with
    standard JNI practice (e.g. use of jint instead of int
    in JNI function prototypes)

[x] AssetAtlasManager is not completely 64-bit compatible
    yet. Specifically mAtlasMap member has to be converted
    to hold native pointer using long. Added a TODO to
    AssetAtlasManager.java to indicate the change required.

Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
Signed-off-by: Craig Barber <craig.barber@arm.com>
Signed-off-by: Kévin PETIT <kevin.petit@arm.com>
Signed-off-by: Marcus Oakland <marcus.oakland@arm.com>

==================================================================

AArch64: Use long for pointers in graphics/Camera

For storing pointers, long is used in
android/graphics/Camera class, as native
pointers can be 64-bit.

In addition, some minor changes have been done
to conform with standard JNI practice (e.g. use of
jint instead of int in JNI function prototypes)

Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
Signed-off-by: Marcus Oakland <marcus.oakland@arm.com>

===================================================================

Change-Id: Ib3eab85ed97ea3e3c227617c20f8d213f17d4ba0
2014-01-27 13:28:16 +00:00
Marco Nelissen
a0914864f4 Merge "Check that the exif bits are actually there" 2014-01-22 23:12:32 +00:00
Marco Nelissen
0937eed32f Check that the exif bits are actually there
b/12663599

Change-Id: If2af0ab20f29ab3264a8c6c8c4abf0ebeff6616c
2014-01-22 15:10:57 -08:00
Andy Hung
bdf8db0828 Merge "Add "throws IOException" to MediaCodec factory methods" 2014-01-21 23:03:33 +00:00
Andy Hung
83511d2f49 Add "throws IOException" to MediaCodec factory methods
android.media.MediaCodec
(createByCodecName|createDecoderByType|createEncoderByType)
now explicitly throws IOException.

Requires changes to existing code for declaration compatibility.

Bug: 11364276
Change-Id: I105ecb7c4bd49bf803111253cd23bab161c988f9
Signed-off-by: Andy Hung <hunga@google.com>
2014-01-16 12:35:15 -08:00
Narayan Kamath
6bb5cb24b4 Resolved conflicts for merge of 28c6ec02 to master
Change-Id: Idf1cabf2694dfa13d928df944d346f5e051b6948
2014-01-16 15:49:59 +00:00
Narayan Kamath
24d63a8382 am bc0468e6: am 6f17adba: Merge "AArch64: Use long for pointers in media classes"
* commit 'bc0468e67626937300e9afd182656469463d96a1':
  AArch64: Use long for pointers in media classes
2014-01-16 07:34:43 -08:00
Leon Scroggins III
f761fa7767 Merge "Remove calls to deprecated SkBitmap::setIsOpaque()" 2014-01-15 18:34:19 +00:00
Glenn Kasten
0c5b62744b Merge "Unhide android.media.AudioTrack.setVolume(float)" 2014-01-15 17:58:53 +00:00
Leon Scroggins III
8790be6de3 Remove calls to deprecated SkBitmap::setIsOpaque()
setIsOpaque() has been removed from ToT Skia.

Update setters for mIsPremultiplied and hasAlpha to take the
other into consideration.

Change-Id: I1b36b0b0ce7126031eb7b769b563c17dcd4b306a
2014-01-15 11:37:04 -05:00
Ashok Bhat
075e9a19ce AArch64: Use long for pointers in media classes
For storing pointers, long is used in media classes,
as native pointers can be 64-bit.

In addition, some minor changes have been done
to conform with standard JNI practice (e.g. use
of jint instead of int in JNI function prototypes)

Change-Id: Idc4ca0124d03df7f9cef412488abafd020e5e774
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
Signed-off-by: Marcus Oakland <marcus.oakland@arm.com>
Signed-off-by: Kévin PETIT <kevin.petit@arm.com>
2014-01-15 13:09:27 +00:00
Glenn Kasten
4896cb59a4 Merge "Use AUDIO_SESSION_ALLOCATE instead of hard-coded 0" 2014-01-15 01:27:59 +00:00
Glenn Kasten
3e21cc8140 Unhide android.media.AudioTrack.setVolume(float)
Bug: 12534920
Change-Id: I7d7437f87f7002c42452011e347e89ddaa0bf6a5
2014-01-14 13:55:36 -08:00
Marco Nelissen
633f8c227b am 28f032e6: am e2c046fe: am 13249411: am a9045d24: am 337aa376: Merge "Add NULL check in updateProxyConfig"
* commit '28f032e6a66d74d570b36672939000707455acb1':
  Add NULL check in updateProxyConfig
2014-01-14 16:25:18 +00:00
Marco Nelissen
13249411b1 am a9045d24: am 337aa376: Merge "Add NULL check in updateProxyConfig"
* commit 'a9045d24a73faa6aa1e8ad204a1e14a53711a824':
  Add NULL check in updateProxyConfig
2014-01-14 08:15:13 -08:00
Marco Nelissen
337aa376c0 Merge "Add NULL check in updateProxyConfig" 2014-01-14 16:08:18 +00:00
Glenn Kasten
f634bc0ff5 Merge "Prepare for additional formats beyond 8-bit and 16-bit PCM" 2014-01-13 19:25:58 +00:00
Marco Nelissen
92351c5886 libjhead_jni is still needed
protip: do not remove things from makefiles just because it builds without them
b/12528751

Change-Id: I3ef8dcdf638e8b59d309922bb972c893fc75a712
2014-01-13 10:19:17 -08:00
Zhihai Xu
93899a5972 Merge "setAvrcpAbsoluteVolume is passed wrong unit parameter from AudioManager" 2014-01-11 01:11:45 +00:00
Jason Sams
08af2ca38a am bb0a4f20: am 1ae17633: am 411350dd: am 739ae9b3: am 868173a5: Merge "Fix a JNI local reference leak in MediaDrm"
* commit 'bb0a4f20502c27a920b7d874c9a17c178afee5f9':
  Fix a JNI local reference leak in MediaDrm
2014-01-11 01:00:57 +00:00
Jason Sams
411350dd23 am 739ae9b3: am 868173a5: Merge "Fix a JNI local reference leak in MediaDrm"
* commit '739ae9b3b77458b4c77f799cba56dc68d65ab424':
  Fix a JNI local reference leak in MediaDrm
2014-01-10 16:50:54 -08:00
Zhihai Xu
2f4a2b139b setAvrcpAbsoluteVolume is passed wrong unit parameter from AudioManager
setAvrcpAbsoluteVolume is passed wrong unit parameter from AudioManager.
It cause maximize volume in Bluetooth speaker/device.
The volume expected by Bluetooth Avrcp should be from 0 to 15.
But the current volume parameter passed to Bluetooth Avrcp is from 0 to 150.
It is scaled by 10 times than the correct volume.
index = rescaleIndex(index * 10, streamType, streamTypeAlias);
Should divide the volume by 10 before pass to Bluetooth Avrcp.

bug:12495379
Change-Id: I0432f83ca4a0c134244d96b2eea14d7168e9a9ff
2014-01-10 16:44:39 -08:00
Jason Sams
868173a53f Merge "Fix a JNI local reference leak in MediaDrm" 2014-01-11 00:42:20 +00:00
Glenn Kasten
fe834d30f4 Prepare for additional formats beyond 8-bit and 16-bit PCM
This CL does the same thing for AudioTrack,
that an earlier CL did for AudioRecord:
  > Change-Id: Ic3525f049e939bdf125d9f87ed39abd2690dcf9f

Pull out the common parts of that earlier CL and move them to new header
file android_media_AudioFormat.h.

Use the new function audioFormatToNative() to convert from Java
ENCODING_PCM_* to native AUDIO_FORMAT_*.

Use audio_bytes_per_sample() instead of hard-coding the size of various formats.

Use size_t for memory sizes.

Change-Id: I7992dd6a2c9500126a6d7ae5fc1ed9f3312962d6
2014-01-10 10:50:22 -08:00
Marco Nelissen
3cd393c505 Make MtpDatabase use libexif instead of libjhead
b/12203995

Change-Id: I0e0e6209be7a9d3e493abdcee8619cae6d4b9501
2014-01-10 10:39:27 -08:00
Narayan Kamath
c975437ef3 am 1e3395c7: am 105b545e: am 0dce19ca: am 79ceb53a: am c58abeea: Merge "AArch64: Use long for pointers in MTP classes"
* commit '1e3395c7378a7dd293a2e8a8ac8fbf239adbad0c':
  AArch64: Use long for pointers in MTP classes
2014-01-07 13:10:19 +00:00
Narayan Kamath
819f2e1234 am 510616d2: am bec733af: am 23ebc24e: am 08467c57: am 9bc6acf2: Merge "AArch64: Use long for pointers in VideoEditor classes"
* commit '510616d215372e59e5e8c39b8de1125fc5b54c60':
  AArch64: Use long for pointers in VideoEditor classes
2014-01-07 13:10:14 +00:00
Narayan Kamath
e434ddd042 am 113e83e6: am 58cb0f0c: am bfbe585e: am c0c92f20: am 357ea905: Merge "AArch64: Use long for pointers in audio effect classes"
* commit '113e83e6f538ea217c167c6d8e11b28042ff2c53':
  AArch64: Use long for pointers in audio effect classes
2014-01-07 13:10:03 +00:00
Narayan Kamath
ac8bd534dd am 99aec6b5: am 40b0aaa9: am 568cde55: am 80cff944: am 74675f29: Merge "AArch64: Use long for pointers in AmrInputStream"
* commit '99aec6b5d1cb73a3f5b57badc53e6f56b2a53c4d':
  AArch64: Use long for pointers in AmrInputStream
2014-01-07 13:09:57 +00:00
Narayan Kamath
0dce19caf8 am 79ceb53a: am c58abeea: Merge "AArch64: Use long for pointers in MTP classes"
* commit '79ceb53ae5b867a954476e3f6499f89664fbc669':
  AArch64: Use long for pointers in MTP classes
2014-01-07 05:01:13 -08:00
Narayan Kamath
23ebc24eee am 08467c57: am 9bc6acf2: Merge "AArch64: Use long for pointers in VideoEditor classes"
* commit '08467c5727c04c1fef40ff1e361628944275ef28':
  AArch64: Use long for pointers in VideoEditor classes
2014-01-07 05:01:08 -08:00
Narayan Kamath
bfbe585ed4 am c0c92f20: am 357ea905: Merge "AArch64: Use long for pointers in audio effect classes"
* commit 'c0c92f206eddb6fb319bd11929c1703daf17248f':
  AArch64: Use long for pointers in audio effect classes
2014-01-07 05:00:58 -08:00
Narayan Kamath
568cde557a am 80cff944: am 74675f29: Merge "AArch64: Use long for pointers in AmrInputStream"
* commit '80cff94478a39914012df816179ea57c53040903':
  AArch64: Use long for pointers in AmrInputStream
2014-01-07 05:00:53 -08:00
Ashok Bhat
e2e59326f1 AArch64: Use long for pointers in MTP classes
For storing pointers, long is used in MTP classes,
as native pointers can be 64-bit.

In addition, some minor changes have been done
to conform with standard JNI practice (e.g. use
of jint instead of int in JNI function prototypes)

Change-Id: I67805547251722e7b77611d47d0bb632a64d3e6d
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
Signed-off-by: Marcus Oakland <marcus.oakland@arm.com>
Signed-off-by: Kévin PETIT <kevin.petit@arm.com>
2014-01-07 12:52:57 +00:00
Ashok Bhat
44ba5c1b4e AArch64: Use long for pointers in VideoEditor classes
For storing pointers, long is used in VideoEditor
classes, as native pointers can be 64-bit.

In addition, some minor changes have been done
to conform with standard JNI practice (e.g. use
of jint instead of int in JNI function prototypes)

Change-Id: Ifff3a28f2ab6774ee89d31770ad63451c8726431
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
Signed-off-by: Marcus Oakland <marcus.oakland@arm.com>
Signed-off-by: Kévin PETIT <kevin.petit@arm.com>
2014-01-07 12:49:41 +00:00
Ashok Bhat
ea7861c918 AArch64: Use long for pointers in audio effect classes
For storing pointers, long is used in AudioEffect
and Visualizer classes, as native pointers can be 64-bit.

In addition, some minor changes have been done
to conform with standard JNI practice (e.g. use
of jint instead of int in JNI function prototypes)

Change-Id: Ief49bbe5baef663e268c7f6d70ac33a4df45621c
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
Signed-off-by: Marcus Oakland <marcus.oakland@arm.com>
Signed-off-by: Kévin PETIT <kevin.petit@arm.com>
2014-01-07 12:47:51 +00:00
Ashok Bhat
b348c3fd87 AArch64: Use long for pointers in AmrInputStream
For storing pointers, long is used in AmrInputStream
class, as native pointers can be 64-bit.

Change-Id: I78fff3eb54fc7101746b0d693cbc4e923c2bad08
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
Signed-off-by: Marcus Oakland <marcus.oakland@arm.com>
Signed-off-by: Kévin PETIT <kevin.petit@arm.com>
2014-01-07 12:44:38 +00:00
Jean-Michel Trivi
a144b121b2 Merge "Fix RemoteController synchronization mode" 2014-01-06 22:46:43 +00:00
Chong Zhang
83cc994ba4 MediaRecorder: add getSurface() api and SURFACE video source
Bug: 12305192
Change-Id: If833c5ac8a738ffa284307e0435b5cbd1b7379b1
2014-01-06 10:42:51 -08:00
Jean-Michel Trivi
b3ae913115 Fix RemoteController synchronization mode
Fix erroneous argument check in RemoteController syncrhonization
  mode setter..

Bug 12189375

Change-Id: Ib446a21f36c6e0e97752336b22aff0feb651f215
2014-01-02 23:13:48 +00:00
Zhijun He
934349e8ad ExifInterface: fix class load failure
libexif_jni was renamed as libjhead_jni

Change-Id: I0ceff1ad288c7ce2255826d5d5ba9ca1f121a556
2013-12-20 13:28:00 -08:00
Marco Nelissen
e754e7880a Merge "libexif is now libjhead" 2013-12-19 23:36:10 +00:00
Marco Nelissen
7f6abf84ab libexif is now libjhead
Change-Id: I6b749e251a2e03738550ce911e59527f80d26212
2013-12-19 14:21:19 -08:00
Narayan Kamath
8907644bb6 am ad1ff472: am 7bbc79fd: am 91f6aaaf: am 2d2d5943: am f3172c62: Merge "MediaDrm#mNativeContext is a long, not int."
* commit 'ad1ff47213e1b3a34a2b9e5a189742e9a15ed486':
  MediaDrm#mNativeContext is a long, not int.
2013-12-19 13:14:17 +00:00
Narayan Kamath
91f6aaaf2c am 2d2d5943: am f3172c62: Merge "MediaDrm#mNativeContext is a long, not int."
* commit '2d2d594308693af79bf5c44f0dcc30f29d2dc31a':
  MediaDrm#mNativeContext is a long, not int.
2013-12-19 05:01:34 -08:00
Narayan Kamath
f3172c623e Merge "MediaDrm#mNativeContext is a long, not int." 2013-12-19 12:35:24 +00:00
Patrik2 Carlsson
265551a164 Fix a JNI local reference leak in MediaDrm
A reference leak was found in the subtitle usecase that also
applies to android_media_MediaDrm.cpp
(Code taken from the similar fix in android_media_MediaPlayer.cpp)

Change-Id: Icc4b25e4adc9a600ff4ac99a7a8478bb55a6e348
2013-12-19 10:59:42 +09:00
Oscar Rydhé
e795ec73eb Add NULL check in updateProxyConfig
If the exclusionList was null in updateProxyConfig the VM would
crash when converting it to a UTF8 string. Avoid this by adding a
null check.

Change-Id: I0d8106fd54385bd9ae9c652a6c67d459a119cf2b
2013-12-19 09:38:59 +09:00
Narayan Kamath
94ee2f502e am 52ba48a8: am f08b83be: am 4dd5c377: am be8fbb8f: Merge "Remove unused field from MediaMuxer"
* commit '52ba48a85049a2a782c3e4c23d64577253f888eb':
  Remove unused field from MediaMuxer
2013-12-18 18:25:33 +00:00
Narayan Kamath
4dd5c37711 am be8fbb8f: Merge "Remove unused field from MediaMuxer"
* commit 'be8fbb8fb63fddac2310dfbafa2594ed165b16b1':
  Remove unused field from MediaMuxer
2013-12-18 10:14:45 -08:00