118070 Commits

Author SHA1 Message Date
Narayan Kamath
2525acf5a9 am e4dae5f2: Merge "AArch64: Make eglGetDisplay(int) work for EGL_DEFAULT_DISPLAY"
* commit 'e4dae5f2c26f5992a31f8ce15811fc082647ddb8':
  AArch64: Make eglGetDisplay(int) work for EGL_DEFAULT_DISPLAY
2014-02-27 05:20:52 -08:00
Narayan Kamath
e4dae5f2c2 Merge "AArch64: Make eglGetDisplay(int) work for EGL_DEFAULT_DISPLAY" 2014-02-27 13:18:07 +00:00
Narayan Kamath
f61add84c2 am 2000fe58: Merge "Make getAssetInt throw unconditionally."
* commit '2000fe58332dffaad34c618fe35840992cb0f571':
  Make getAssetInt throw unconditionally.
2014-02-27 05:15:56 -08:00
Narayan Kamath
2000fe5833 Merge "Make getAssetInt throw unconditionally." 2014-02-27 13:13:08 +00:00
Ashok Bhat
64d38d9f48 AArch64: Make eglGetDisplay(int) work for EGL_DEFAULT_DISPLAY
Note that files changed in this patch have been automatically
generated by running frameworks/native/opengl/tools/glgen/gen
script

This will allow eglGetDisplay(int) to work on both 32-bit and
64-bit systems when EGL_DEFAULT_DISPLAY is passed as a parameter.

Change-Id: Idf27d6e00d623d331bb2d4d7f85fa450e0db26c9
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
2014-02-26 19:07:54 +00:00
Chris Craik
59ff85af31 am 2729857d: (-s ours) Merge "Fix AOSP build - DO NOT MERGE"
* commit '2729857df6c559b37248c96b78303b662212d14b':
  Fix AOSP build - DO NOT MERGE
2014-02-26 11:06:30 -08:00
Chris Craik
7b4cce6885 am c3bac8a0: Merge "Fix graphics corruption caused by HWUI caches"
* commit 'c3bac8a096cc5661cf91c8c0aa9b7dd0fc099c5d':
  Fix graphics corruption caused by HWUI caches
2014-02-26 11:06:27 -08:00
Chris Craik
2729857df6 Merge "Fix AOSP build - DO NOT MERGE" 2014-02-26 18:48:27 +00:00
Chris Craik
c3bac8a096 Merge "Fix graphics corruption caused by HWUI caches" 2014-02-26 18:48:00 +00:00
Chris Craik
2c42b79c6c Fix AOSP build - DO NOT MERGE
Change-Id: I42b420c2ce89ce364a2809b28b827964e6923fa1
2014-02-26 10:44:50 -08:00
Sangkyu Lee
36fad8f6fc Fix graphics corruption caused by HWUI caches
Some caches(PatchCache, TextureCache, PathCache) for HWUI
uses deferred removal for their cache entries even though
actual resource objects are immediately freed by
ResourceCache.
For this reason, the uniqueness of a resource address in
the caches is not guaranteed in specific cases.
(Because malloc() can return the same address when malloc()
and free() called very frequently.)

So it can be possible the cache have two cache entries for
two different resources but the same memory address.
(Of course one of the resources is already freed.)
It also can be possible mGarbage vector in PatchCache has
duplicated addresses and this can lead to duplicated free
blocks in the free block list and graphics corruption.
(Deferred removal was implmeneted based on an assumption of
unique resource addresses.)

So this patch makes sure resource objects are freed after
the resources are removed from the caches to guarantee
the uniqueness of a resource address and prevent graphics
corruption.

Change-Id: I040f033a4fc783d2c4bc04b113589657c36fb15b
Signed-off-by: Sangkyu Lee <sk82.lee@lge.com>
2014-02-26 10:43:26 -08:00
Narayan Kamath
2d19d202bd Make getAssetInt throw unconditionally.
All callers have been moved over to getNativeAsset, and
this method has been hidden from the public API internally.

Change-Id: I5f29b5ddb4449adadf426e49a4085c7320289a15
2014-02-25 15:48:07 +00:00
Narayan Kamath
7fe5978bf7 am 2ba70fd4: Merge "Use reinterpret_cast when an integer is cast to a pointer"
* commit '2ba70fd49bfcbb516e75c198c106764609335feb':
  Use reinterpret_cast when an integer is cast to a pointer
2014-02-25 05:11:43 -08:00
Narayan Kamath
a88abfb3a5 am 6ab07fac: Merge "Use long for pointers in opengl/EGL classes"
* commit '6ab07fac49d6b618883a2ef4cea11f0959b3abe3':
  Use long for pointers in opengl/EGL classes
2014-02-25 05:11:40 -08:00
Narayan Kamath
2ba70fd49b Merge "Use reinterpret_cast when an integer is cast to a pointer" 2014-02-25 13:05:48 +00:00
Narayan Kamath
6ab07fac49 Merge "Use long for pointers in opengl/EGL classes" 2014-02-25 13:05:44 +00:00
Ashok Bhat
84bbeb9e0c Use long for pointers in opengl/EGL classes
Note that files changed in this patch have been automatically
generated by running frameworks/native/opengl/tools/glgen/gen script

This patch updates EGL classes in frameworks/base to support
64-bit platforms. Key changes in the EGL classes include

[x] EGLObjectHandle class - EGLObjectHandle class has two public
    methods (constructor and getHandle) that assume handles are
    32-bit. They have not been changed. Instead, two new hidden
    methods (EGLObjectHandle(long) and getNativeHandle) have been
    added.

[x] EG14 class - Two public methods eglGetDisplay and
    eglCreatePbufferFromClientBuffer assume that handles are 32-bit.
    They have been changed to throw unsupported operation exception
    on non 32-bit machines. Two new methods eglGetDisplay(long)
    and eglCreatePbufferFromClientBuffer(...long buffer..) have
    been added to support 64-bit handles.

Change-Id: I9e0f064e5b33700eb0baa2e1841a21f931f7a765
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
2014-02-24 15:50:22 +00:00
Ashok Bhat
01c26ea89d Use reinterpret_cast when an integer is cast to a pointer
Note that files changed in this patch have been generated
by running frameworks/native/opengl/tools/glgen/gen script.

Change-Id: Iff3ac2e804af41b9a6ec073fd65019c6806fe821
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
2014-02-24 14:33:52 +00:00
Greg Hackmann
9e413bf4e5 am bbfc08b3: Merge changes I6d4fdada,Ia34899a4
* commit 'bbfc08b3abc0934f67659f3238eb79dcac838c17':
  open("/dev/rtc0") failure in AlarmManagerService.setTime() should be non-fatal
  Move time setting code from SystemClock to AlarmManagerService
2014-02-21 13:04:00 -08:00
Greg Hackmann
bbfc08b3ab Merge changes I6d4fdada,Ia34899a4
* changes:
  open("/dev/rtc0") failure in AlarmManagerService.setTime() should be non-fatal
  Move time setting code from SystemClock to AlarmManagerService
2014-02-21 21:01:00 +00:00
Greg Hackmann
c9244720da open("/dev/rtc0") failure in AlarmManagerService.setTime() should be non-fatal
Setting the time-of-day clock is still useful on systems where the RTC
device is not yet brought up or otherwise unavailable.  This matches the
in-kernel behavior of the Android alarm driver.

Change-Id: I6d4fdadab12e241ada7419425efd55bd13873c55
Signed-off-by: Greg Hackmann <ghackmann@google.com>
2014-02-21 09:53:25 -08:00
Greg Hackmann
38bf514668 Move time setting code from SystemClock to AlarmManagerService
On devices using /dev/rtc instead of /dev/alarm, updating the
time-of-day clock and RTC are separate syscalls.  Hence the clock and
RTC could be left in inconsistent states if two threads called
SystemClock.setCurrentTimeMillis() simultaneously.

By moving this code into AlarmManagerService, we can put a global lock
around AlarmManagerService.setTime() and prevent the race condition.

Note that access to SystemClock.setCurrentTimeMillis() is now gated by
android.permission.SET_TIME, where before it was gated by filesystem
permissions (i.e., could the process write to /dev/alarm or /dev/rtc).

Change-Id: Ia34899a4cde983656305fd2ef466dfe908ed23c8
Signed-off-by: Greg Hackmann <ghackmann@google.com>
2014-02-21 09:53:19 -08:00
Elliott Hughes
b2f07b2772 am 4a809272: Merge "Fix documentation for Parcel.readException()."
* commit '4a80927241b3168d9d5138c46c22385d6467a736':
  Fix documentation for Parcel.readException().
2014-02-21 09:25:54 -08:00
Elliott Hughes
29d60b95fa am 8d41e653: Merge "Miscellaneous small documentation fixes."
* commit '8d41e653bae240488281d430309e2d501e9524e5':
  Miscellaneous small documentation fixes.
2014-02-21 09:25:50 -08:00
Elliott Hughes
4a80927241 Merge "Fix documentation for Parcel.readException()." 2014-02-21 17:21:52 +00:00
Elliott Hughes
8d41e653ba Merge "Miscellaneous small documentation fixes." 2014-02-21 17:19:21 +00:00
Narayan Kamath
911b2ce3da am 4a642ee5: Merge "Remove unused JNITest class"
* commit '4a642ee5e65ca47ecf6cb274096162e580aac922':
  Remove unused JNITest class
2014-02-21 08:34:36 -08:00
Narayan Kamath
1925634079 am 22c66639: Merge "Fixes for 64bit in libhwui"
* commit '22c66639093a634b5688372d261d003b0478c450':
  Fixes for 64bit in libhwui
2014-02-21 08:34:30 -08:00
Narayan Kamath
4a642ee5e6 Merge "Remove unused JNITest class" 2014-02-21 15:02:31 +00:00
Ashok Bhat
42f06b0e22 Remove unused JNITest class
JNITest class is no longer actively used. This patch
removes the class (java and jni) files.

JNI interfaces and calls are extensively tested in
the art unit tests (art/tests) and in cts (see
CtsJniTestCases).

Change-Id: I62f7c72deb5d206fa3f545ae39a9cb9011110d0a
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
2014-02-21 14:34:35 +00:00
Narayan Kamath
22c6663909 Merge "Fixes for 64bit in libhwui" 2014-02-21 14:23:57 +00:00
Kévin PETIT
73fc558e44 Fixes for 64bit in libhwui
Using reinterpret_cast allows conversions between pointer types
and integers which don't have the same size. The corresponding
flags is -Wint-to-pointer-cast.

Change-Id: I8ff0c79d235fa6d07b8d9305edc185d946d5133d
Signed-off-by: Kévin PETIT <kevin.petit@arm.com>
2014-02-21 13:07:29 +00:00
Narayan Kamath
fca204a4b8 am 05cebdc2: Merge "Fix several bad function definitions."
* commit '05cebdc2abd05b0dca351306cb039245d50c67ae':
  Fix several bad function definitions.
2014-02-20 04:58:52 -08:00
Narayan Kamath
b152473f46 am 9fce8535: Merge "AArch64: Make AssetAtlasService 64-bit compatible"
* commit '9fce8535851fc696997bd3c251d00e34179d6482':
  AArch64: Make AssetAtlasService 64-bit compatible
2014-02-20 04:58:45 -08:00
Narayan Kamath
05cebdc2ab Merge "Fix several bad function definitions." 2014-02-20 12:55:27 +00:00
Narayan Kamath
9fce853585 Merge "AArch64: Make AssetAtlasService 64-bit compatible" 2014-02-20 12:55:20 +00:00
Narayan Kamath
047b938f71 Fix several bad function definitions.
We claim these functions want jlong as input (8 bytes wide)
but the definitions use pointer types or jints
(4 bytes wide for 32 bit).

bug: 12890271

(cherry picked from 017546e65280a3389b6167f5fc3b5d1c3001154a)

Change-Id: Iede02be90e6a3c9a2db1fe04dcd0db99abe37097
2014-02-20 12:52:16 +00:00
Ashok Bhat
4de3f481bc AArch64: Make AssetAtlasService 64-bit compatible
Changes in this patch include

[x] Long(64-bit) is used to store native pointers in
    AssetAtlasService and related classes 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)

Change-Id: Ib4c77c134e3ad5b21732e20cde9a54a0b16bdab1
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
2014-02-20 12:10:24 +00:00
Narayan Kamath
128599e449 am 2b3c14bf: Merge "libandroidfw: fix build error for 64-bit"
* commit '2b3c14bf75c71524a0fcbc3e9d1fdab9aa6c3473':
  libandroidfw: fix build error for 64-bit
2014-02-20 03:53:36 -08:00
Narayan Kamath
2b3c14bf75 Merge "libandroidfw: fix build error for 64-bit" 2014-02-20 11:50:59 +00:00
Patrik Bannura
443dd9313f libandroidfw: fix build error for 64-bit
Fixed casting int to pointer in logging code.
Previously ints where printed as pointers and
the %p format specifier was used for convenience
to get hex output. This change uses %x and also
gets rid of the casts.

Change-Id: Ia2539769d245f50c0f3884119f80682defe69d61
2014-02-20 10:06:23 +00:00
Craig Mautner
23ef1b5e0b am 16ea3e6a: Merge "A background started service is removed from mStartingBackground when timeout. Fix is to make sure mStartingBackground is updated to remove one."
* commit '16ea3e6a5b37dc436d1089996004bcae12f5e3b0':
  A background started service is removed from mStartingBackground when timeout. Fix is to make sure mStartingBackground is updated to remove one.
2014-02-19 08:26:15 -08:00
Narayan Kamath
96ddea413d am 7c710936: Merge "Remove java.io.tmpdir assignment in AndroidRuntime."
* commit '7c710936c5129664f8b23bf4592c12eca975d229':
  Remove java.io.tmpdir assignment in AndroidRuntime.
2014-02-19 08:26:07 -08:00
Craig Mautner
16ea3e6a5b Merge "A background started service is removed from mStartingBackground when timeout. Fix is to make sure mStartingBackground is updated to remove one." 2014-02-19 15:36:01 +00:00
Narayan Kamath
7c710936c5 Merge "Remove java.io.tmpdir assignment in AndroidRuntime." 2014-02-19 14:24:48 +00:00
Calin Juravle
7a4172d190 am f11cc165: Merge "Fixed a possible infinite loop in JsonReader#skipValue()"
* commit 'f11cc165f4d6e18d79ce013fa2f74fb43e002ac1':
  Fixed a possible infinite loop in JsonReader#skipValue()
2014-02-19 03:18:06 -08:00
Calin Juravle
f11cc165f4 Merge "Fixed a possible infinite loop in JsonReader#skipValue()" 2014-02-19 11:15:00 +00:00
Junu Kim
fcb87369b1 A background started service is removed from mStartingBackground when timeout.
Fix is to make sure mStartingBackground is updated to remove one.

Change-Id: I0e42beb550d33e6e400349b85bbb89848e18d520
2014-02-19 16:25:21 +09:00
Calin Juravle
8fbcc6b4cd Fixed a possible infinite loop in JsonReader#skipValue()
Bug: https://code.google.com/p/android/issues/detail?id=65846

Change-Id: Idaa0e75fc5612550c4b9ccb9afa5535ea5b189df
2014-02-18 19:19:15 +00:00
Jeff Sharkey
660a514e80 am 60097a9c: Merge "Structure device not freed in error case"
* commit '60097a9c5a7214cb73d0bc966adef767743f8798':
  Structure device not freed in error case
2014-02-18 09:16:31 -08:00