601 Commits

Author SHA1 Message Date
Colin Cross
7acd69be86 MediaHTTPConnection: fix JNI signature
mNativeContext was changed to a long, fix the GetFieldID signature

Change-Id: Ib19605d2c534a2aea7d75ab105349710905d716f
2014-03-20 11:23:29 -07:00
Colin Cross
5e8ff02ec9 MediaHTTPConnection: use jlong to store native pointer
Change-Id: Ic4f391a8e658498e63c26ea2af4c7413ed387360
2014-03-19 17:28:42 -07:00
John Spurlock
07cf4da1d0 Merge "Add stream-level suppression to vibrate/audio services." 2014-03-19 21:58:19 +00:00
Glenn Kasten
29427a224e am a0e300ef: am 458edc8d: am a3dc076d: am bfc44092: Merge "mediaeditor shouldn\'t depend on audioflinger."
* commit 'a0e300efae92d8155151e345034620054cff8955':
  mediaeditor shouldn't depend on audioflinger.
2014-03-19 21:22:09 +00:00
Glenn Kasten
458edc8de3 am a3dc076d: am bfc44092: Merge "mediaeditor shouldn\'t depend on audioflinger."
* commit 'a3dc076d2dda77d8891fcd83f6f4056d15bbf2fc':
  mediaeditor shouldn't depend on audioflinger.
2014-03-19 21:10:41 +00:00
John Spurlock
1af30c7ac4 Add stream-level suppression to vibrate/audio services.
- Add new audio restriction layer to app-ops.  Restrictions add
additional constraints to audio operations at a stream-level.
Restrictions do not affect the persistable state, and are purely
additive: that is, they can only impose additional contstraints, not
enable something that has already been disabled.  Restrictions
also support a whitelisted set of exempt package names.

- Add new audio stream-level checks to app-ops.

- Implement a provisional OP_PLAY_AUDIO suppression to three
java entry points MediaPlayer, AudioTrack, & SoundPool.

- Enhance vibrator api to take stream information as an optional
hint - the constants correspond to AudioManager stream types.
OP_VIBRATE now supports the stream-level restriction check.

- Simplify Vibrator subclasses by adding default implementations
for two .vibrate calls.

- Migrate NoMan's zen-mode control to use the new app-ops
stream-level restriction mechanism.

Change-Id: Ifae8952647202f728cf1c73e881452660c704678
2014-03-19 15:32:51 -04:00
Narayan Kamath
587a25b6cd mediaeditor shouldn't depend on audioflinger.
Change-Id: I7e1b999b03a3ee5eff2e10a460f64abeba16ba90
2014-03-19 17:49:47 +00:00
Dan Stoza
8a358e44cc Merge "Remove deprecated BufferQueue constructor" 2014-03-17 18:47:52 +00:00
Mike Lockwood
92b53bc2dd MTP: Add support for some audio specific object properties
This stops Windows 7 from putting up the
"Your device might not be able to play or view this file" dialog
when copying MP3 files to the device.

Bug: 3195286
Change-Id: Ic5b3fb75309893caae1a4f4b56068a543847f1f7
2014-03-13 15:15:26 -07:00
Dan Stoza
5b3c7c1e57 Remove deprecated BufferQueue constructor
Bug: 13415624
Change-Id: Ic661d515a94fd5fad39f2d07f0cdf25337fae67c
2014-03-12 16:44:45 -07:00
Mike Lockwood
5b568aa04a Merge "MTP: Add support for battery level device property" 2014-03-12 17:58:05 +00:00
Mike Lockwood
56c85244b9 MTP: Add support for battery level device property
Bug: 7342482

Change-Id: I810e55fe9695e2206816f57334ad14f65e9c641d
2014-03-12 08:46:47 -07:00
Marco Nelissen
8e70165017 am 34425196: am ac875878: am 9823a170: Merge "Make MtpDatabase use libexif instead of libjhead" into klp-dev
* commit '344251969929dcb37a33a3e3910121458f7dc38f':
  Make MtpDatabase use libexif instead of libjhead
2014-03-07 21:46:38 +00:00
Marco Nelissen
3442519699 am ac875878: am 9823a170: Merge "Make MtpDatabase use libexif instead of libjhead" into klp-dev
* commit 'ac87587875f1dfade5e06a82ccc009d0f0170569':
  Make MtpDatabase use libexif instead of libjhead
2014-03-07 21:18:52 +00:00
Narayan Kamath
e78a747d35 am f7a6fe95: am 0425a51b: am 51ec4ec5: am 5de03b18: Merge "Don\'t assume that size_t is 32-bit"
* commit 'f7a6fe95b0b439d3c6288b0b9da152b4c70c2265':
  Don't assume that size_t is 32-bit
2014-03-07 20:22:15 +00:00
Narayan Kamath
6ae7cd063b am f2c11c14: am 214c3d9b: am 6ac6263d: am 28ccb4f7: Merge "Don\'t use size_t for variables that store uint32_t value"
* commit 'f2c11c142975f1571a0e8606a3b274afcb987b83':
  Don't use size_t for variables that store uint32_t value
2014-03-07 20:22:13 +00:00
Marco Nelissen
aefa427c27 Make MtpDatabase use libexif instead of libjhead
b/12203995

Change-Id: I0e0e6209be7a9d3e493abdcee8619cae6d4b9501
2014-03-07 10:30:23 -08:00
Narayan Kamath
0425a51b07 am 51ec4ec5: am 5de03b18: Merge "Don\'t assume that size_t is 32-bit"
* commit '51ec4ec51f88d854b182547405e37f3ae74c35bd':
  Don't assume that size_t is 32-bit
2014-03-07 16:11:38 +00:00
Narayan Kamath
214c3d9b06 am 6ac6263d: am 28ccb4f7: Merge "Don\'t use size_t for variables that store uint32_t value"
* commit '6ac6263dcc55a4a93647cc1307c901a01c06d89c':
  Don't use size_t for variables that store uint32_t value
2014-03-07 16:11:35 +00:00
Narayan Kamath
5de03b18ea Merge "Don't assume that size_t is 32-bit" 2014-03-07 16:04:50 +00:00
Marco Nelissen
faab8b2313 Fix build
Bad automerge

Change-Id: I000a9d3ac2915b3e39d2d34bd52062ac47e9f0fe
2014-03-06 22:19:02 -08:00
Marco Nelissen
da7ad468d9 am 4bf85e84: am daefb17c: am e1af0bd8: am 4f36104f: am e29c96e7: Merge "libexif is now libjhead" into klp-dev
* commit '4bf85e84e95cd39f5bded8abc8d1e0bf9c28e3ce':
  libexif is now libjhead
2014-03-07 03:10:01 +00:00
Marco Nelissen
daefb17c25 am e1af0bd8: am 4f36104f: am e29c96e7: Merge "libexif is now libjhead" into klp-dev
* commit 'e1af0bd8588ca2de7084853017928729a793b769':
  libexif is now libjhead
2014-03-07 00:59:03 +00:00
Marco Nelissen
e1af0bd858 am 4f36104f: am e29c96e7: Merge "libexif is now libjhead" into klp-dev
* commit '4f36104f06755dc2c95b3d7c8bac5312d7572199':
  libexif is now libjhead
2014-03-07 00:47:02 +00:00
Marco Nelissen
c0786cc258 libexif is now libjhead
b/12203995
Change-Id: I6b749e251a2e03738550ce911e59527f80d26212
2014-03-06 16:00:35 -08:00
Ashok Bhat
e92416dfeb Don't assume that size_t is 32-bit
Crypto data was being copied to java jint array in chunks of
size_t. This will not work on LP64 as size_t will be 64-bit.
This patch changes copy to use int32_t chunks instead of size_t.

Change-Id: I75d910a1182ad2f58f432cd172127f048b4c393b
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
2014-03-06 12:36:47 +00:00
Ashok Bhat
58fad0bf14 Don't use size_t for variables that store uint32_t value
The local variables width, height, displayWidth and
displayHeight are set to the corresponding members
of VideoFrame class. As the members of VideoFrame are
uint32_t, the local variables have been changed to
uint32_t.

As these local variables are passed to a java method,
the change of size_t to uint32_t ensures that the size
of the actual parameter (i.e uint32_t) is now same as
the size of the formal parameter (i.e. jint) for all
platforms.

Change-Id: Icd14de0142bfd4e6ba52a3e6aff3d80b323a0de4
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
2014-03-06 11:33:20 +00:00
Chong Zhang
128b012cc8 fix MediaCodec release deadlock and resource leak
Bug: 12910147
Change-Id: I5f2c02b6ad5bfcd88797c6aa79dcaa23d030eacf
2014-03-03 12:29:49 -08:00
Derek Sollenberger
eece0dda56 Fix includes so that they no longer rely on the global Skia includes directories.
bug:13225538
Change-Id: Ia5d816dc665f81c7985f21036af4fd0a63c560cf
2014-02-27 14:31:29 -05:00
Andreas Huber
9ae000ca8c Revert "Split AndroidRuntime into AndroidRuntimeBase base-class and the rest."
This reverts commit 7825334929b098b36e1144872200e75ba6d24b13.

Change-Id: I1702eb3ff9d7192d64039c8bf4bc3fc5d8e458c4
2014-02-13 17:22:33 +00:00
Andreas Huber
7825334929 Split AndroidRuntime into AndroidRuntimeBase base-class and the rest.
AndroidRuntimeBase (exported by libandroid_runtime_base.so) is all you need
to link against to gain the ability to do AndroidRuntimeBase::getJNIEnv()
thus minimizing build dependencies.

Change-Id: Ia7f0c94c8c02b974c068e0db34774827f96aa95b
2014-02-12 15:00:05 -08:00
Narayan Kamath
b1ed19a2ed am 43c9516a: am 860bba68: am 7b7726b7: Merge "Fix in MediaMuxer\'s JNI code"
* commit '43c9516a29563131e04ee797562130e2c4f9d54e':
  Fix in MediaMuxer's JNI code
2014-02-11 16:40:35 +00:00
Ashok Bhat
d2507a2f3c Fix in MediaMuxer's JNI code
android_media_MediaMuxer_native_setup should return jlong. It was
incorrectly returning jint.

Change-Id: I31a475af0818f4d5dcbb39380b42612188cf3853
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
2014-02-07 18:10:22 +00:00
Andreas Huber
b341a24b2a Merge "Remove no longer needed http proxy handling code, it's obsolete now" 2014-02-06 17:10:31 +00:00
Robert Shih
7da27478ea Merge "android_media_MediaMuxer_setLocation: amended signature." 2014-02-05 20:05:17 +00:00
Andreas Huber
f8a0c47e90 Remove no longer needed http proxy handling code, it's obsolete now
since we started to use java's HTTPConnection instead of the native
implementation.

Change-Id: I32b08480593a859e0368dbbcf8da8f25c9e08ca9
2014-02-05 11:53:40 -08:00
Robert Shih
3cb78498d3 android_media_MediaMuxer_setLocation: amended signature.
Change parameter `nativeObject` from type `jint` to `jlong` to match its JNI
signature.

Bug: 12890910
Change-Id: I7feb7fa5c3eccc07f2d1bc733b7d4b3a3b52e292
2014-02-05 10:53:55 -08:00
Andreas Huber
d2506a5063 FINAL ATTEMPT: HTTP services are now provided from JAVA and made available to media code
Change-Id: I7f6cdcfd2a28846d36d89dd5180ef20a22b03af8
2014-02-04 14:45:28 -08:00
Zhijun He
10586ad2a6 am 4f840dd1: am 5901ddeb: am 0a1b64fe: Merge "Release locked buffer when it fails to acquire graphics buffer"
* commit '4f840dd16db41a2d4442667193d57260f84af04a':
  Release locked buffer when it fails to acquire graphics buffer
2014-01-31 15:12:38 +00:00
Zhijun He
0a1b64fe79 Merge "Release locked buffer when it fails to acquire graphics buffer" 2014-01-30 23:01:21 +00:00
Ashok Bhat
a0398430fc 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.

Change-Id: I940433f601c6db998c1a8ffff338f5361200d5ed
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>
2014-01-28 17:40:38 +00:00
Ashok Bhat
36bef0bf30 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: Id5793fa0ebc17ee8b1eecf4b3f327977fdccff71
2014-01-28 10:02:43 +00:00
lina.x.pi
334778981d Release locked buffer when it fails to acquire graphics buffer
The JNI buffer in ImageReader_imageSetup is not released when
it fails to acquire graphics buffer. After all JNI buffers are
exhausted, ACQUIRE_MAX_IMAGES will be returned and leads to
error. The JNI buffer should be released when it fails to acquire
graphics buffer.

Change-Id: I3319a58ac44e36c8593b404672a685c4b589a735
2014-01-28 06:08:52 +00:00
Andreas Huber
aba671392d API that allows usage of MediaCodec APIs without polling.
Change-Id: Iebccdd3aec74a2cfa9ad0bf16c0c6006a3b72999
related-to-bug: 11990118
2014-01-27 10:52:18 -08:00
Narayan Kamath
7023df08f1 Revert "AArch64: Make graphics classes 64-bit compatible"
This reverts commit 18b4cbeedef21c1fa666a110a157bab66edff976.

Change-Id: I0c52983a3ab1ace3ff743de546a43eca28e5cb0e
2014-01-27 14:22:45 +00:00
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
0937eed32f Check that the exif bits are actually there
b/12663599

Change-Id: If2af0ab20f29ab3264a8c6c8c4abf0ebeff6616c
2014-01-22 15:10:57 -08:00
Narayan Kamath
6bb5cb24b4 Resolved conflicts for merge of 28c6ec02 to master
Change-Id: Idf1cabf2694dfa13d928df944d346f5e051b6948
2014-01-16 15:49:59 +00: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
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