OSDN Git Service

android-x86/frameworks-native.git
10 years agoMerge "Ensure that app lib symlinks are correctly labeled when created."
Nick Kralevich [Tue, 13 May 2014 20:32:19 +0000 (20:32 +0000)]
Merge "Ensure that app lib symlinks are correctly labeled when created."

10 years agoEnsure that app lib symlinks are correctly labeled when created.
Stephen Smalley [Tue, 13 May 2014 16:53:07 +0000 (12:53 -0400)]
Ensure that app lib symlinks are correctly labeled when created.

At present, the app lib symlinks are created before setting
the package directory security context, and therefore default
to system_data_file.  Upon a later restorecon_recursive,
they are relabeled to the same type as the package directory,
e.g. app_data_file.  Avoid this inconsistency by setting the
package directory security context before creating the symlink
so that it inherits the same security context.

Change-Id: I1ee6ccd8a2aa63a4d2efda67f313c97932235911
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
10 years agoMerge "Use asynchronous lock/unlock API"
Greg Hackmann [Mon, 12 May 2014 18:01:59 +0000 (18:01 +0000)]
Merge "Use asynchronous lock/unlock API"

10 years agoUse asynchronous lock/unlock API
Francis Hart [Tue, 1 Apr 2014 12:30:53 +0000 (15:30 +0300)]
Use asynchronous lock/unlock API

The gralloc API now provides a way for using lock/unlock with the Android
explicit synchronisation concept. This changes updates the GraphicBuffer class
to also expose this functionality, and updates the Surface class to make use of
in line with the dequeueBuffer/queueBuffer mechanism.

This new behaviour is dependent on GRALLOC_MODULE_API_VERSION_0_3. If the local
gralloc module does not support this then the existing synchronous lock/unlock
mechanism will be used.

Change-Id: I8c3fd9592e0c5400ac9be84450f55a77cc0bbdc5

10 years agoMerge "Revert "Use asynchronous lock/unlock API""
Greg Hackmann [Fri, 9 May 2014 21:39:07 +0000 (21:39 +0000)]
Merge "Revert "Use asynchronous lock/unlock API""

10 years agoRevert "Use asynchronous lock/unlock API"
Greg Hackmann [Fri, 9 May 2014 21:36:48 +0000 (21:36 +0000)]
Revert "Use asynchronous lock/unlock API"

This reverts commit 378ef07760eda717367d9429428c42d54d54d9a7.

Change-Id: I1de5ab973b5383633e75924fe90ac3ca8216c36a

10 years agoMerge "Use asynchronous lock/unlock API"
Greg Hackmann [Fri, 9 May 2014 21:02:20 +0000 (21:02 +0000)]
Merge "Use asynchronous lock/unlock API"

10 years agoMerge "Remove unused LOCAL_LDLIBS."
Ying Wang [Wed, 7 May 2014 22:48:40 +0000 (22:48 +0000)]
Merge "Remove unused LOCAL_LDLIBS."

10 years agoRemove unused LOCAL_LDLIBS.
Ying Wang [Wed, 7 May 2014 22:26:38 +0000 (15:26 -0700)]
Remove unused LOCAL_LDLIBS.

Change-Id: I62904c410a66f256da8253764577acae18f964f8

10 years agoMerge "fix GraphicBuffer::flatten crash issue when handle is null"
Jesse Hall [Mon, 5 May 2014 22:45:49 +0000 (22:45 +0000)]
Merge "fix GraphicBuffer::flatten crash issue when handle is null"

10 years agoMerge "Add error message for hints when exceptions occur during binder transactions."
Jesse Hall [Mon, 5 May 2014 17:26:00 +0000 (17:26 +0000)]
Merge "Add error message for hints when exceptions occur during binder transactions."

10 years agoUse asynchronous lock/unlock API
Francis Hart [Tue, 1 Apr 2014 12:30:53 +0000 (15:30 +0300)]
Use asynchronous lock/unlock API

The gralloc API now provides a way for using lock/unlock with the Android
explicit synchronisation concept. This changes updates the GraphicBuffer class
to also expose this functionality, and updates the Surface class to make use of
in line with the dequeueBuffer/queueBuffer mechanism.

This new behaviour is dependent on GRALLOC_MODULE_API_VERSION_0_3. If the local
gralloc module does not support this then the existing synchronous lock/unlock
mechanism will be used.

Change-Id: I77daa1beb197b63b1c2f281b8414ac4ae4b5b03c

10 years agoMerge "Add instruction-set arguments to installd commands."
Narayan Kamath [Thu, 1 May 2014 13:57:12 +0000 (13:57 +0000)]
Merge "Add instruction-set arguments to installd commands."

10 years agoAdd instruction-set arguments to installd commands.
Narayan Kamath [Fri, 11 Apr 2014 12:17:00 +0000 (13:17 +0100)]
Add instruction-set arguments to installd commands.

The instruction-set is used to construct the dalvik cache
path and is also passed down to dex2oat.

(cherry picked from commit 791781bfb8cdcdf90e32968159603e2fe5098d94)

Change-Id: I43396b16f6eaecacf0fb7d052526fc5a239167ac

10 years agoAdd error message for hints when exceptions occur during binder transactions.
Jun Jiang [Tue, 29 Apr 2014 06:22:10 +0000 (14:22 +0800)]
Add error message for hints when exceptions occur during binder transactions.

It can help to detect some kind of error, such as why GraphicBuffer::flatten
will crash when handle is null.

Change-Id: I703cd035b96edb7afb324cf24d8230d4e55f4f52
Signed-off-by: Jun Jiang <jun.a.jiang@intel.com>
10 years agofix GraphicBuffer::flatten crash issue when handle is null
Jun Jiang [Tue, 29 Apr 2014 06:15:36 +0000 (14:15 +0800)]
fix GraphicBuffer::flatten crash issue when handle is null

Change-Id: I0d3727e4366cac355791e52cb7790bf8f3c51527
Signed-off-by: Jun Jiang <jun.a.jiang@intel.com>
10 years agoMerge "Fix incorrect odex path handling"
Brian Carlstrom [Mon, 28 Apr 2014 22:00:35 +0000 (22:00 +0000)]
Merge "Fix incorrect odex path handling"

10 years agoFix incorrect odex path handling
Chih-Wei Huang [Mon, 28 Apr 2014 07:47:45 +0000 (15:47 +0800)]
Fix incorrect odex path handling

It's wrong to just concatenate the apk_path and .odex.
The bug prevents the prebuilt odex being used since Kitkat.

The patch is copied from the code of JellyBean.

Change-Id: I0ce8a877e3df8ae1ab9a0e3aeeef2d5253efc223

10 years agoMerge "Expose core EGL entry points to eglGetProcAddress"
Jesse Hall [Mon, 21 Apr 2014 18:51:18 +0000 (18:51 +0000)]
Merge "Expose core EGL entry points to eglGetProcAddress"

10 years agoMerge "libui: fix passing Fence object over binder"
Colin Cross [Tue, 15 Apr 2014 02:10:51 +0000 (02:10 +0000)]
Merge "libui: fix passing Fence object over binder"

10 years agolibui: fix passing Fence object over binder
Colin Cross [Tue, 15 Apr 2014 01:43:12 +0000 (18:43 -0700)]
libui: fix passing Fence object over binder

The Fence object was writing a size_t into the binder buffer
in flatten, which changes size if the producer and consumer
are running in a 32-bit and a 64-bit process.  Use a uint32_t
instead.

Change-Id: Ifed526513800ce27f9d605101cddd922292cca37

10 years agoMerge "restorecon the profile directory."
Nick Kralevich [Wed, 9 Apr 2014 19:41:26 +0000 (19:41 +0000)]
Merge "restorecon the profile directory."

10 years agorestorecon the profile directory.
Stephen Smalley [Wed, 9 Apr 2014 18:23:43 +0000 (14:23 -0400)]
restorecon the profile directory.

This is required so that it will be assigned the correct SELinux
security context on first creation by installd.

Bug: 13927667
Change-Id: I4857d031f9e7e60d48b8c72fcb22a81b3a2ebaaa
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
10 years agoMerge "make struct Event layout consistent on 32/64-bit"
Greg Hackmann [Thu, 3 Apr 2014 17:07:09 +0000 (17:07 +0000)]
Merge "make struct Event layout consistent on 32/64-bit"

10 years agoMerge "AArch64: Correction to OMX_U32 and OMX_S32"
Glenn Kasten [Thu, 3 Apr 2014 17:00:58 +0000 (17:00 +0000)]
Merge "AArch64: Correction to OMX_U32 and OMX_S32"

10 years agoMerge "Remove global variables from ProcessState."
Narayan Kamath [Thu, 3 Apr 2014 13:59:27 +0000 (13:59 +0000)]
Merge "Remove global variables from ProcessState."

10 years agoRemove global variables from ProcessState.
Narayan Kamath [Fri, 28 Mar 2014 13:41:28 +0000 (13:41 +0000)]
Remove global variables from ProcessState.

These weren't really being used and they make it
very hard to reason about who looks at command line
arguments.

Processes started via app_process (this includes all
zygote forks and the system_server) can get information
about command line arguments from the AndroidRuntime
class, which is available via a call to
AndroidRuntime::getRuntime.

bug: 13647418

Change-Id: I6f92680c3619a68c6d4b0995db4cdc9adc788e36

10 years agoAArch64: Correction to OMX_U32 and OMX_S32
Marcus Oakland [Tue, 25 Mar 2014 17:53:43 +0000 (17:53 +0000)]
AArch64: Correction to OMX_U32 and OMX_S32

The types of OMX_U32 and OMX_S32 were appropriate to a 32-bit system
but were not appropriate to a 64-bit system. They have been changed to
make them portable between the two systems. With this change and a
change to frameworks/av/media/libstagefright/foundation/AString.cpp,
the android.media.cts.DecoderTest#testFlush CTS test passes.

Change-Id: I8e16c7169f54599c23fea71585b531e48541c78a
Signed-off-by: Marcus Oakland <marcus.oakland@arm.com>
10 years agoMerge "opengl: fix UAL conformity"
Glenn Kasten [Wed, 2 Apr 2014 16:15:59 +0000 (16:15 +0000)]
Merge "opengl: fix UAL conformity"

10 years agoopengl: fix UAL conformity
synergy dev [Mon, 24 Feb 2014 07:43:26 +0000 (23:43 -0800)]
opengl: fix UAL conformity

GAS assumes .align 2 if .align only is set, however the UAL doesn't enforce this assumption.

Change-Id: I88b567dc84ee8f04a13f2b8e80c3ee41530a9e49

10 years agoMerge "Modify installd's restorecon function."
Nick Kralevich [Mon, 31 Mar 2014 20:09:18 +0000 (20:09 +0000)]
Merge "Modify installd's restorecon function."

10 years agoModify installd's restorecon function.
Robert Craig [Thu, 27 Mar 2014 14:21:12 +0000 (10:21 -0400)]
Modify installd's restorecon function.

Changes above with PMS and below with libselinux
have resulted in a few changes to the restorecon data
api. This change is needed in order to support the new
way to issue a recursive restorecon of certain
/data/data directories.

The restorecondata function has also been modified to
find all users on the device for a given package name
(argument to the function) and to issue a separate
recursive restorecon call for each.

Change-Id: Ie440cba2c96f0907458086348197e1506d31c1b6
Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>
10 years agoMerge "GraphicProducerWrapper may return false transact status"
Jesse Hall [Fri, 28 Mar 2014 04:52:09 +0000 (04:52 +0000)]
Merge "GraphicProducerWrapper may return false transact status"

10 years agoExpose core EGL entry points to eglGetProcAddress
Michael Chock [Mon, 27 Jan 2014 16:14:33 +0000 (08:14 -0800)]
Expose core EGL entry points to eglGetProcAddress

Required behavior for EGL_KHR_get_all_proc_addresses.

Change-Id: I1e6209ef3cb9f2fa6f22808b077c35139d4cb814

10 years agoGraphicProducerWrapper may return false transact status
bdeng3X [Thu, 20 Mar 2014 01:15:34 +0000 (09:15 +0800)]
GraphicProducerWrapper may return false transact status

GraphicProducerWrapper(GPW) changed how the methods of
BpGraphicBufferProducer(BpGBP) are executed.
First, "fake" BpGBP is created. Its remote is GPW. The GPW has
wrapped the real BpGBP.
All the method calls to the fake BpGPB will be intercepted by
the GPW inside it when the methods run into remote()->transact().
Then the GPW will invoke the transact() of the real BpGBP. And
Everything runs well except that the GPW forgets to store the
transact status and always return NO_ERROR to the fake BpGBP.

It would be disastrous if the binder call of the IGBP failed and
the out parameter "reply" of transact() was in unkown state.
E.g. the queueBuffer() in the fake BpGBP will try to operate on
the "reply". This will crash the SurfaceFlinger.

Change-Id: I01b31f64e1fc92804da3f16c1fb1420dcfb3b855
Signed-off-by: bdeng3X <bingx.deng@intel.com>
Signed-off-by: Guobin Zhang <guobin.zhang@intel.com>
10 years agoMerge "Send libselinux logging to logcat."
Nick Kralevich [Wed, 26 Mar 2014 15:44:14 +0000 (15:44 +0000)]
Merge "Send libselinux logging to logcat."

10 years agoSend libselinux logging to logcat.
Stephen Smalley [Wed, 26 Mar 2014 13:30:37 +0000 (09:30 -0400)]
Send libselinux logging to logcat.

Otherwise we can't readily see log messages from libselinux calls
made by installd.

Change-Id: I319b30c181470468fe19dd5fbe9251ef03f1163b
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
10 years agoMerge "fix valgrind ioctl warning."
Jesse Hall [Thu, 20 Mar 2014 16:09:14 +0000 (16:09 +0000)]
Merge "fix valgrind ioctl warning."

10 years agomake struct Event layout consistent on 32/64-bit
Fengwei Yin [Thu, 20 Mar 2014 08:45:05 +0000 (16:45 +0800)]
make struct Event layout consistent on 32/64-bit

To make struct Event have consistent memory layout between x86
and x86_64, force nsecs_t timestamp align to 64bit because it's
not true for x86.

Change-Id: I49eaddd89e10d595cf6a5130f9762b5388c96625
Signed-off-by: Fengwei Yin <fengwei.yin@intel.com>
10 years agoMerge "Extend installd to support SELinux restorecon function."
Nick Kralevich [Wed, 19 Mar 2014 20:17:24 +0000 (20:17 +0000)]
Merge "Extend installd to support SELinux restorecon function."

10 years agoExtend installd to support SELinux restorecon function.
Robert Craig [Thu, 20 Feb 2014 15:25:56 +0000 (10:25 -0500)]
Extend installd to support SELinux restorecon function.

Implement new restorecondata function which will allow
the relabeling of /data/data and /data/user directories.
This is needed in the case of certain OTAs. Not every
boot will apply this relabeling however. Consult change
I77bf2a0c4c34b1feef6fdf4d6c3bd92dbf32f4a1 for
clarification on this issue.

Change-Id: I05e8b438950ddb908e46c9168ea6ee601e6d674f
Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>
10 years agoMerge "native frameworks: 64-bit compile issues"
Mark Salyzyn [Thu, 13 Mar 2014 15:20:44 +0000 (15:20 +0000)]
Merge "native frameworks: 64-bit compile issues"

10 years agonative frameworks: 64-bit compile issues
Mark Salyzyn [Wed, 12 Mar 2014 20:12:44 +0000 (13:12 -0700)]
native frameworks: 64-bit compile issues

- Fix format (print/scanf)
- Suppress unused argument warning messages (bonus)

Change-Id: I05c7724d2aba6da1e82a86000e11f3a8fef4e728

10 years agoMerge "Fix parameter ordering for installd's dex2oat execl."
Anwar Ghuloum [Tue, 11 Mar 2014 23:11:02 +0000 (23:11 +0000)]
Merge "Fix parameter ordering for installd's dex2oat execl."

10 years agoFix parameter ordering for installd's dex2oat execl.
Anwar Ghuloum [Tue, 11 Mar 2014 22:42:58 +0000 (15:42 -0700)]
Fix parameter ordering for installd's dex2oat execl.

Change-Id: Ibd6fd46c6ec3137874f9a3d5eea134bc804e039a

10 years agoMerge "ART profiler"
Dave Allison [Fri, 7 Mar 2014 22:25:35 +0000 (22:25 +0000)]
Merge "ART profiler"

10 years agoMerge "SurfaceFlinger: fix 64-bit format string warnings"
Greg Hackmann [Fri, 7 Mar 2014 21:47:30 +0000 (21:47 +0000)]
Merge "SurfaceFlinger: fix 64-bit format string warnings"

10 years agoSurfaceFlinger: fix 64-bit format string warnings
Greg Hackmann [Fri, 7 Mar 2014 20:44:02 +0000 (12:44 -0800)]
SurfaceFlinger: fix 64-bit format string warnings

Change-Id: Idacfbf0601743fba1c5de7632201a66a307a2710
Signed-off-by: Greg Hackmann <ghackmann@google.com>
10 years agoART profiler
Dave Allison [Thu, 30 Jan 2014 22:19:23 +0000 (14:19 -0800)]
ART profiler

Add args to the installd commands for profiler usage.
Make installd create the profile files and allow apps
to write to them.

The profile files are in /data/dalvik-cache/profiles.  This
central location is needed due to permissions issues with
dex2oat reading from an app's data directory.  The solution
is to put the profile file in a directory owned by the
install user and make the file writeable by the shared group
id of for the app.  The app can read and write to these files
only in the profiles directory.  The 'system' user also needs
to be able to read the files in order to determine the amount
of change to the file over time.

Bug: 12877748
Change-Id: I9b8e59e3bd7df8a1bf60fa7ffd376a24ba0eb42f

Conflicts:
cmds/installd/commands.c

10 years agoMerge "Don't pass in empty arg to dex2oat."
Mathieu Chartier [Thu, 6 Mar 2014 01:01:08 +0000 (01:01 +0000)]
Merge "Don't pass in empty arg to dex2oat."

10 years agoDon't pass in empty arg to dex2oat.
Mathieu Chartier [Thu, 6 Mar 2014 00:58:03 +0000 (16:58 -0800)]
Don't pass in empty arg to dex2oat.

We would occassionally pass in an empty arg "" instead of a NULL.
This caused problems since dex2oat isn't made to handle empty args.

Change-Id: Ibb1aed64a4aa17459b2a75a5a2abcf13c7fa8ac7

10 years agoMerge "Add dalvik.vm.dex2oat-flags to mimic dalvik.vm.dexopt-flags"
Brian Carlstrom [Wed, 5 Mar 2014 20:02:00 +0000 (20:02 +0000)]
Merge "Add dalvik.vm.dex2oat-flags to mimic dalvik.vm.dexopt-flags"

10 years agoAdd dalvik.vm.dex2oat-flags to mimic dalvik.vm.dexopt-flags
Brian Carlstrom [Tue, 11 Feb 2014 00:42:52 +0000 (16:42 -0800)]
Add dalvik.vm.dex2oat-flags to mimic dalvik.vm.dexopt-flags

Change-Id: Ic048ed654ea0ae38c9684e5fa5b14742b6b83305

10 years agoMerge "gui: Fix return code assert in CpuConsumer_test."
Igor Murashkin [Tue, 4 Mar 2014 21:05:40 +0000 (21:05 +0000)]
Merge "gui: Fix return code assert in CpuConsumer_test."

10 years agoMerge "hwc test: 64-bit compilation error"
Mark Salyzyn [Tue, 4 Mar 2014 19:10:28 +0000 (19:10 +0000)]
Merge "hwc test: 64-bit compilation error"

10 years agohwc test: 64-bit compilation error
Mark Salyzyn [Tue, 4 Mar 2014 17:11:04 +0000 (09:11 -0800)]
hwc test: 64-bit compilation error

* cast 1u to size_t in max() argument lists

Change-Id: I02f711c89e96e4cfc348f1c7bac455339bec2fa1

10 years agoMerge "Fix misuse of $(my-dir)."
Ying Wang [Sat, 1 Mar 2014 02:10:27 +0000 (02:10 +0000)]
Merge "Fix misuse of $(my-dir)."

10 years agoFix misuse of $(my-dir).
Ying Wang [Sat, 1 Mar 2014 02:05:56 +0000 (18:05 -0800)]
Fix misuse of $(my-dir).

Change-Id: I8b24f60826abe4b541de646cbc3df66929203301

10 years agoMerge "Correcting include path in installd test project's Android.mk"
Narayan Kamath [Fri, 28 Feb 2014 16:00:54 +0000 (16:00 +0000)]
Merge "Correcting include path in installd test project's Android.mk"

10 years agoCorrecting include path in installd test project's Android.mk
Ramin Zaghi [Thu, 27 Feb 2014 15:20:40 +0000 (15:20 +0000)]
Correcting include path in installd test project's Android.mk

 installd project has moved from frameworks/base to frameworks/native
 and so its test project's c_include path defined in Android.mk
 has to match the change.

Change-Id: I597125ff659f51edbd9fc95371790e2d567c78be

10 years agoMerge "AArch64: Make eglGetDisplay(int) work for EGL_DEFAULT_DISPLAY"
Narayan Kamath [Thu, 27 Feb 2014 13:17:57 +0000 (13:17 +0000)]
Merge "AArch64: Make eglGetDisplay(int) work for EGL_DEFAULT_DISPLAY"

10 years agoAArch64: Make eglGetDisplay(int) work for EGL_DEFAULT_DISPLAY
Ashok Bhat [Wed, 26 Feb 2014 09:56:09 +0000 (09:56 +0000)]
AArch64: Make eglGetDisplay(int) work for EGL_DEFAULT_DISPLAY

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: I0d7e9ca5410b0dd893eacc02aac40956908e4f25
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
10 years agoMerge "Virtual Display async mode is overridden"
Jesse Hall [Tue, 25 Feb 2014 21:43:09 +0000 (21:43 +0000)]
Merge "Virtual Display async mode is overridden"

10 years agoMerge "Use reinterpret_cast when an integer is cast to a pointer"
Narayan Kamath [Tue, 25 Feb 2014 13:05:49 +0000 (13:05 +0000)]
Merge "Use reinterpret_cast when an integer is cast to a pointer"

10 years agoMerge "Use long for pointers in opengl/EGL classes"
Narayan Kamath [Tue, 25 Feb 2014 13:05:45 +0000 (13:05 +0000)]
Merge "Use long for pointers in opengl/EGL classes"

10 years agoMerge "Binder: Make sure binder objects do not overlap"
Arve Hjønnevåg [Tue, 25 Feb 2014 00:01:53 +0000 (00:01 +0000)]
Merge "Binder: Make sure binder objects do not overlap"

10 years agoBinder: Make sure binder objects do not overlap
Arve Hjønnevåg [Fri, 14 Feb 2014 03:22:08 +0000 (19:22 -0800)]
Binder: Make sure binder objects do not overlap

Fixes crashing part of bug 11355082.
The driver still leaks references.

Change-Id: Ibc6a63b151c1fc1f7666237f25255ba781e02071

10 years agoUse reinterpret_cast when an integer is cast to a pointer
Ashok Bhat [Sat, 15 Feb 2014 12:51:43 +0000 (12:51 +0000)]
Use reinterpret_cast when an integer is cast to a pointer

Change-Id: I5adcd59f58c029f7b2b596f4826d8ea69fb9bba6
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
10 years agoUse long for pointers in opengl/EGL classes
Ashok Bhat [Thu, 13 Feb 2014 09:47:18 +0000 (09:47 +0000)]
Use long for pointers in opengl/EGL classes

EGL classes in frameworks/base have to be updated 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.

To allow the above changes in frameworks/base EGL classes,
corresponding code generation mechanism in frameworks/native has
been updated.

Change-Id: I5d0a62e10c20ccf05f610d6608b8dfb6414b5116
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
10 years agoVirtual Display async mode is overridden
John Dong [Fri, 21 Feb 2014 20:37:59 +0000 (12:37 -0800)]
Virtual Display async mode is overridden

Virtual Display async setting is overridden by eglApi.c causing
stall during composition.

Set the async mode after eglCreateWindowSurface()

b/13139121

Change-Id: I336ca145552e387217cd8bea6e4b7f5f490a274d
Signed-off-by: Pierre Couillaud <pierre@broadcom.com>
10 years agoMerge changes I3432d9d3,I90fcf538,I64398603
Arve Hjønnevåg [Fri, 21 Feb 2014 23:45:01 +0000 (23:45 +0000)]
Merge changes I3432d9d3,I90fcf538,I64398603

* changes:
  Binder: Fix some valgrind errors.
  Binder: Don't cast directly from a pointer to binder_uintptr_t
  Binder: Disable attemptIncStrongHandle

10 years agoMerge "Update EGL codegen to be in sync with frameworks/base"
Narayan Kamath [Fri, 21 Feb 2014 14:27:35 +0000 (14:27 +0000)]
Merge "Update EGL codegen to be in sync with frameworks/base"

10 years agoMerge "Update GLES codegen to be in sync with frameworks/base"
Narayan Kamath [Fri, 21 Feb 2014 14:27:16 +0000 (14:27 +0000)]
Merge "Update GLES codegen to be in sync with frameworks/base"

10 years agoMerge "surfaceflinger: add BoardConfig.mk variable to force 32-bit"
Colin Cross [Fri, 21 Feb 2014 00:15:58 +0000 (00:15 +0000)]
Merge "surfaceflinger: add BoardConfig.mk variable to force 32-bit"

10 years agosurfaceflinger: add BoardConfig.mk variable to force 32-bit
Colin Cross [Thu, 20 Feb 2014 23:36:21 +0000 (15:36 -0800)]
surfaceflinger: add BoardConfig.mk variable to force 32-bit

Individual devices may need to force surfaceflinger to compile for
32-bit if they don't have 64-bit GL libraries.

Change-Id: I3703b2f8e36e90cf125d9ed5e6318c3506861948

10 years agoUpdate GLES codegen to be in sync with frameworks/base
Ashok Bhat [Thu, 13 Feb 2014 11:08:25 +0000 (11:08 +0000)]
Update GLES codegen to be in sync with frameworks/base

Patch from synergydev with commit-id 01994c79 changed
core/jni/com_google_android_gles_jni_GLImpl.cpp in the
frameworks/base. However the corresponding code snippet
in frameworks/native was not updated. This patch addresses
the issue.

Change-Id: I89c3d88de832efc8cbbe682c8a7ff7dfbef99db3
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
10 years agoUpdate EGL codegen to be in sync with frameworks/base
Ashok Bhat [Thu, 13 Feb 2014 10:48:02 +0000 (10:48 +0000)]
Update EGL codegen to be in sync with frameworks/base

Patch from Takeshi Aimi with commit-id f9337377 changed
core/jni/android_opengl_EGL14.cpp in the frameworks/base.
However the corresponding code snippet in frameworks/
native was not updated. This patch addresses the issue.

Change-Id: I40bcc43d36d7ab4e0db4a73556a4f7480c7431c1
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
10 years agoBinder: Fix some valgrind errors.
Arve Hjønnevåg [Wed, 19 Feb 2014 05:10:29 +0000 (21:10 -0800)]
Binder: Fix some valgrind errors.

When using 64 bit binder pointers, only initializing the 32 bit
handle, in a stack allocated struct, will pass uninitialized stack
data to the kernel and other processes.

Change-Id: I3432d9d36bb251d8ddb0a863661aeb80aabb3d92

10 years agoBinder: Don't cast directly from a pointer to binder_uintptr_t
Arve Hjønnevåg [Wed, 19 Feb 2014 05:04:31 +0000 (21:04 -0800)]
Binder: Don't cast directly from a pointer to binder_uintptr_t

When using the 64 bit binder interface from a 32 bit process the
pointer may get sign extended and cause the kernel to fail to read
from it.

Change-Id: I90fcf53880e2aa92e230a9723f9b3f7696170e32

10 years agoMerge "libagl: support multilib build"
Colin Cross [Tue, 18 Feb 2014 21:29:50 +0000 (21:29 +0000)]
Merge "libagl: support multilib build"

10 years agoMerge "Use /(vendor|system)/lib64/egl for 64-bit EGL libraries"
Colin Cross [Tue, 18 Feb 2014 20:14:41 +0000 (20:14 +0000)]
Merge "Use /(vendor|system)/lib64/egl for 64-bit EGL libraries"

10 years agoUse /(vendor|system)/lib64/egl for 64-bit EGL libraries
Dan Willemsen [Sun, 16 Feb 2014 18:23:54 +0000 (10:23 -0800)]
Use /(vendor|system)/lib64/egl for 64-bit EGL libraries

Change-Id: Ie64806bfe4ba60a3167b84685cf983d4ada1042d

10 years agoBinder: Disable attemptIncStrongHandle
Arve Hjønnevåg [Sat, 15 Feb 2014 04:14:02 +0000 (20:14 -0800)]
Binder: Disable attemptIncStrongHandle

The driver does not support BC_ATTEMPT_ACQUIRE and will return an error.
IPCThreadState does not handle driver errors, and will resend the failed
command blocking all other commands.

Change-Id: I643986037341821b27b62dc82df933844f4842b8

10 years agolibagl: support multilib build
Colin Cross [Thu, 13 Feb 2014 01:15:53 +0000 (17:15 -0800)]
libagl: support multilib build

Use LOCAL_SRC_FILES_arch and LOCAL_CFLAGS_arch to support building
for multiple architectures.

Change-Id: I829c1bea880739bf8184df4006d0a481ffccc5c2

10 years agoMerge "frameworks/native: move idmap to frameworks/base"
Dianne Hackborn [Fri, 14 Feb 2014 01:45:27 +0000 (01:45 +0000)]
Merge "frameworks/native: move idmap to frameworks/base"

10 years agoMerge "Convert all selinux_android_restorecon and _setfilecon calls to new API."
Nick Kralevich [Wed, 12 Feb 2014 23:09:44 +0000 (23:09 +0000)]
Merge "Convert all selinux_android_restorecon and _setfilecon calls to new API."

10 years agoframeworks/native: move idmap to frameworks/base
Colin Cross [Wed, 12 Feb 2014 02:04:03 +0000 (18:04 -0800)]
frameworks/native: move idmap to frameworks/base

idmap depends on libandroidfw, so it should go in frameworks/base.

Change-Id: Ieee30ba9d8170d3118acc89f0617981228a6974b

10 years agoMerge "Runtime resource overlay, iteration 2"
Dianne Hackborn [Tue, 11 Feb 2014 21:27:35 +0000 (21:27 +0000)]
Merge "Runtime resource overlay, iteration 2"

10 years agoMerge "New command line tool 'idmap'"
Dianne Hackborn [Tue, 11 Feb 2014 20:29:54 +0000 (20:29 +0000)]
Merge "New command line tool 'idmap'"

10 years agoConvert all selinux_android_restorecon and _setfilecon calls to new API.
Stephen Smalley [Fri, 7 Feb 2014 14:16:46 +0000 (09:16 -0500)]
Convert all selinux_android_restorecon and _setfilecon calls to new API.

libselinux selinux_android_restorecon API is changing to the more
general interface with flags and dropping the older variants.

Also get rid of the old, no longer used selinux_android_setfilecon API
and rename selinux_android_setfilecon2 to it as it is the only API in use.

Change-Id: I1e71ec398ccdc24cac4ec76f1b858d0f680f4925
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
10 years agoMerge "binder: fix all warnings"
Colin Cross [Thu, 6 Feb 2014 02:06:42 +0000 (02:06 +0000)]
Merge "binder: fix all warnings"

10 years agobinder: fix all warnings
Colin Cross [Thu, 6 Feb 2014 01:42:44 +0000 (17:42 -0800)]
binder: fix all warnings

Fix warnings related to casting pointers to ints, using %d or %ld to
print size_t/ssize_t, and unused parameters.

Change-Id: I7a13ba83d402952989c1f795cd9e880a95b98d9e

10 years agoMerge "Fixed apparent copy/paste mistake Bug: 11634373"
Andrew Hsieh [Wed, 5 Feb 2014 07:16:30 +0000 (07:16 +0000)]
Merge "Fixed apparent copy/paste mistake Bug: 11634373"

10 years agoFixed apparent copy/paste mistake
David Friedman [Wed, 5 Feb 2014 03:11:33 +0000 (11:11 +0800)]
Fixed apparent copy/paste mistake
Bug: 11634373

Change-Id: I9b0ac4d3b4a9a2999b2013abd39465a062ec51ea

10 years agoMerge "GLES_trace: fix compile errors on 64 bit architectures"
Siva Velusamy [Tue, 4 Feb 2014 19:14:06 +0000 (19:14 +0000)]
Merge "GLES_trace: fix compile errors on 64 bit architectures"

10 years agoMerge "Use 64 bit binder interface if TARGET_USES_64_BIT_BINDER _or_ TARGET_IS_64_BIT...
Arve Hjønnevåg [Tue, 4 Feb 2014 00:48:12 +0000 (00:48 +0000)]
Merge "Use 64 bit binder interface if TARGET_USES_64_BIT_BINDER _or_ TARGET_IS_64_BIT is set."

10 years agoUse 64 bit binder interface if TARGET_USES_64_BIT_BINDER _or_ TARGET_IS_64_BIT is...
Arve Hjønnevåg [Mon, 3 Feb 2014 22:46:30 +0000 (14:46 -0800)]
Use 64 bit binder interface if TARGET_USES_64_BIT_BINDER _or_ TARGET_IS_64_BIT is set.

Change-Id: I46a29939fa29ec9421ab6dff3285502f69a31745

10 years agoMerge changes Ib0e5a037,I1bd7c38e,Icfc67c2a,I96c64312,I59528054, ...
Arve Hjønnevåg [Mon, 3 Feb 2014 21:12:57 +0000 (21:12 +0000)]
Merge changes Ib0e5a037,I1bd7c38e,Icfc67c2a,I96c64312,I59528054, ...

* changes:
  ServiceManager: Implement PING_TRANSACTION
  ServiceManager: Use 32/64 bit types from new binder header
  Binder: Use 64 bit pointers in 32 processes if selected by the target
  Add BINDER_IPC_32BIT to CFLAGS unless TARGET_USES_64_BIT_BINDER is true
  Binder: Make binder portable
  ServiceManager: Fix the binder interface
  ServiceManager: Store handles in uint32_t instead of void *
  ServiceManager: Generic Fixes
  ServiceManager: Add extra error handling
  ServiceManager: Fix Android.mk
  ServiceManager: Make use of kernel exported structures

10 years agoRuntime resource overlay, iteration 2
Mårten Kongstad [Fri, 31 Jan 2014 13:42:59 +0000 (14:42 +0100)]
Runtime resource overlay, iteration 2

Support any number of overlay packages. Support any target package.

UPDATED PACKAGE MATCHING
------------------------
In Runtime resource overlay, iteration 1, only a single overlay package
was considered. Package matching was based on file paths:
/vendor/overlay/system/framework-res.apk corresponded to
/system/framework-res.apk. Introduce a more flexible matching scheme
where any package is an overlay package if its manifest includes

    <overlay targetPackage="com.target.package"/>

For security reasons, an overlay package must fulfill certain criteria
to take effect: see below.

THE IDMAP TOOL AND IDMAP FILES
------------------------------
Idmap files are created by the 'idmap' binary; idmap files must be
present when loading packages. For the Android system, Zygote calls
'idmap' as part of the resource pre-loading. For application packages,
'idmap' is invoked via 'installd' during package installation (similar
to 'dexopt').

UPDATED FLOW
------------
The following is an outline of the start-up sequences for the Android
system and Android apps. Steps marked with '+' are introduced by this
commit.

Zygote initialization
   Initial AssetManager object created
+    idmap --scan creates idmaps for overlays targeting 'android', \
           stores list of overlays in /data/resource-cache/overlays.list
   AssetManager caches framework-res.apk
+  AssetManager caches overlay packages listed in overlays.list

Android boot
   New AssetManager's ResTable acquired
     AssetManager re-uses cached framework-res.apk
+    AssetManager re-uses cached 'android' overlays (if any)

App boot
   ActivityThread prepares AssetManager to load app.apk
+  ActivityThread prepares AssetManager to load app overlays (if any)
   New AssetManager's ResTable acquired as per Android boot

SECURITY
--------
Overlay packages are required to be pre-loaded (in /vendor/overlay).
These packages are trusted by definition. A future iteration of runtime
resource overlay may add support for downloaded overlays, which would
likely require target and overlay signatures match for the overlay to
be trusted.

LOOKUP PRIORITY
---------------
During resource lookup, packages are sequentially queried to provide a
best match, given the constraints of the current configuration. If any
package provide a better match than what has been found so far, it
replaces the previous match. The target package is always queried last.

When loading a package with more than one overlay, the order in which
the overlays are added become significant if several packages overlay
the same resource.

Had downloaded overlays been supported, the install time could have been
used to determine the load order. Regardless, for pre-installed
overlays, the install time is randomly determined by the order in which
the Package Manager locates the packages during initial boot. To support
a well-defined order, pre-installed overlay packages are expected to
define an additional 'priority' attribute in their <overlay> tags:

    <overlay targetPackage="com.target.package" priority="1234"/>

Pre-installed overlays are loaded in order of their priority attributes,
sorted in ascending order.

Assigning the same priority to several overlays targeting the same base
package leads to undefined behaviour. It is the responsibility of the
vendor to avoid this.

The following example shows the ResTable and PackageGroups after loading
an application and two overlays. The resource lookup framework will
query the packages in the order C, B, A.

        +------+------+-     -+------+------+
        | 0x01 |      |  ...  |      | 0x7f |
        +------+------+-     -+------+------+
            |                           |
        "android"                Target package A
                                        |
                       Pre-installed overlay B (priority 1)
                                        |
                       Pre-installed overlay C (priority 2)

Change-Id: If49c963149369b1957f7d2303b3dd27f669ed24e

10 years agoNew command line tool 'idmap'
Mårten Kongstad [Fri, 31 Jan 2014 13:00:54 +0000 (14:00 +0100)]
New command line tool 'idmap'

Introduce a new tool 'idmap' to handle generation and verification of
idmap files. The tool is modelled on 'dexopt', and is intended to be
used similarly, notably by 'installd'.
See cmds/idmap/idmap.cpp for further documentation on 'idmap'.

Note: this commit is interdependent on a commit in project build/ to add
'idmap' to PRODUCT_PACKAGES.

Note: the changes to androidfw are only stubs. The actual implementation
will be provided in Runtime resource overlay, iteration 2.

Change-Id: I7131b74ece1e46c8a9c0a31d103e686aa07da2bb