OSDN Git Service

android-x86/frameworks-native.git
9 years agoPlumb through volume UUID when building paths.
Jeff Sharkey [Wed, 8 Apr 2015 01:14:05 +0000 (18:14 -0700)]
Plumb through volume UUID when building paths.

Since app data paths can live on expanded storage devices, accept the
target volume UUID when building paths.  The null UUID indicates the
default internal storage.

To improve readability, start using std::string in several places,
which throws when allocations fail.  For now, perform last-second
sanity checks on incoming path arguments, but we'll eventually want
to check arguments as they come through installd.cpp, instead of
crashing the entire daemon.

Also remove "lib" symlink code from install() and make_user_data(),
since we're no longer supporting /data/app-lib.  The framework
already uses linklib() to create the right symlink for the selected
ISA-specific library dir.

Bug: 19993667
Change-Id: Ib9343575ffb62bf3981e19375de8f3822fc31e28

9 years agoMerge "libgui: Plumb detachBuffer through ConsumerBase"
Dan Stoza [Tue, 7 Apr 2015 22:38:00 +0000 (22:38 +0000)]
Merge "libgui: Plumb detachBuffer through ConsumerBase"

9 years agolibgui: Plumb detachBuffer through ConsumerBase
Dan Stoza [Fri, 3 Apr 2015 21:22:05 +0000 (14:22 -0700)]
libgui: Plumb detachBuffer through ConsumerBase

Exposes IGraphicBufferConsumer::detachBuffer as a ConsumerBase
method. attachBuffer is not currently exposed, because all current
clients will be recycling buffers through the allocator.

Bug: 19628705
Change-Id: I3e519767fa43d5d880c1d5695e31b60f6ad588af

9 years agoMerge "Switch installd to compile as C++."
Jeff Sharkey [Tue, 7 Apr 2015 21:04:28 +0000 (21:04 +0000)]
Merge "Switch installd to compile as C++."

9 years agoMerge "Valid APK paths now include expanded storage."
Jeff Sharkey [Tue, 7 Apr 2015 21:03:41 +0000 (21:03 +0000)]
Merge "Valid APK paths now include expanded storage."

9 years agoSwitch installd to compile as C++.
Jeff Sharkey [Tue, 7 Apr 2015 19:44:51 +0000 (12:44 -0700)]
Switch installd to compile as C++.

This is the minimal change needed to switch it over to C++, which
paves the way for using more robust utilities like std::string.

Change-Id: I80ed6280146875eb6ddbbb340c05450388ca13f0

9 years agoValid APK paths now include expanded storage.
Jeff Sharkey [Mon, 6 Apr 2015 23:19:39 +0000 (16:19 -0700)]
Valid APK paths now include expanded storage.

Apps on expanded storage live at /mnt/expand/<uuid>/app/com.example,
so we need to relax one more directory level.

Bug: 19993667
Change-Id: I347ec7b92435ea69e632ed5d5fdfabe38ce0b56e

9 years agoMerge "Use AID_SYSTEM as uid when creating oat dir"
Fyodor Kupolov [Tue, 7 Apr 2015 20:09:43 +0000 (20:09 +0000)]
Merge "Use AID_SYSTEM as uid when creating oat dir"

9 years agoUse AID_SYSTEM as uid when creating oat dir
Fyodor Kupolov [Tue, 7 Apr 2015 02:09:02 +0000 (19:09 -0700)]
Use AID_SYSTEM as uid when creating oat dir

Previously AID_INSTALL was used, which was causing permission denied errors
when PackageManager was trying to recursively rename staging directory

Bug: 19550105
Bug: 20087446
Change-Id: I3a9e3056c1fbc1ce0077a3ce52cf77ea6b5085ee

9 years agoMerge "Remove useless 'svcmgr_handle' (which had wrong type)."
Elliott Hughes [Mon, 6 Apr 2015 23:13:27 +0000 (23:13 +0000)]
Merge "Remove useless 'svcmgr_handle' (which had wrong type)."

9 years agoRemove useless 'svcmgr_handle' (which had wrong type).
Elliott Hughes [Fri, 3 Apr 2015 23:51:18 +0000 (16:51 -0700)]
Remove useless 'svcmgr_handle' (which had wrong type).

Also use the 'ptr' union member rather than 'handle'.

Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com>
Change-Id: I68e5336cd3af3bc61dbddd2b33d7e1512c0c329c

9 years agoMerge "ServiceManager: Print kernel/userspace binder version"
Elliott Hughes [Sat, 4 Apr 2015 00:03:45 +0000 (00:03 +0000)]
Merge "ServiceManager: Print kernel/userspace binder version"

9 years agoServiceManager: Print kernel/userspace binder version
Serban Constantinescu [Wed, 19 Feb 2014 15:34:02 +0000 (15:34 +0000)]
ServiceManager: Print kernel/userspace binder version

This patch adds extra logging for the binder version in case the userspace
and kernel versions differ.

Change-Id: I9859b29099726cfcfe5ca23d88ed2e101a06af1a
Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com>
9 years agoMerge "DO NOT MERGE libgui: Plumb attach/detach through Surface"
Dan Stoza [Fri, 3 Apr 2015 16:10:12 +0000 (16:10 +0000)]
Merge "DO NOT MERGE libgui: Plumb attach/detach through Surface"

9 years agoMerge "Fix errors caused by unused variables"
Fyodor Kupolov [Fri, 3 Apr 2015 00:04:25 +0000 (00:04 +0000)]
Merge "Fix errors caused by unused variables"

9 years agoFix errors caused by unused variables
Fyodor Kupolov [Thu, 2 Apr 2015 23:59:10 +0000 (16:59 -0700)]
Fix errors caused by unused variables

Change-Id: Ie52ae0e9a642504ee7b78c6bc54b61549cfb0342

9 years agoMerge "Support for storing OAT files in app directory"
Fyodor Kupolov [Thu, 2 Apr 2015 23:11:01 +0000 (23:11 +0000)]
Merge "Support for storing OAT files in app directory"

9 years agoDO NOT MERGE libgui: Plumb attach/detach through Surface
Dan Stoza [Wed, 11 Mar 2015 18:55:01 +0000 (11:55 -0700)]
DO NOT MERGE libgui: Plumb attach/detach through Surface

Exposes the attachBuffer and detachNextBuffer calls from
IGraphicBufferProducer to the public Surface interface. Also moves
the version of connect that takes a producer callback from protected
to public.

Bug: 19628705
Change-Id: I9ebc3013c4d9c84c4e8ef150c00e03f8af80319e
(cherry picked from commit c14ecb9de243af8864610fd3c74342e3ca2cb4bc)

9 years agoMerge "servicemanager: service_manager missing include for string.h"
Mark Salyzyn [Wed, 1 Apr 2015 19:26:22 +0000 (19:26 +0000)]
Merge "servicemanager: service_manager missing include for string.h"

9 years agoMerge "DO NOT MERGE libgui: Remove IGBC::BufferItem"
Dan Stoza [Wed, 1 Apr 2015 18:41:24 +0000 (18:41 +0000)]
Merge "DO NOT MERGE libgui: Remove IGBC::BufferItem"

9 years agoservicemanager: service_manager missing include for string.h
Mark Salyzyn [Wed, 1 Apr 2015 14:52:12 +0000 (07:52 -0700)]
servicemanager: service_manager missing include for string.h

service_manager.c gets string.h inherited from
private/android_filesystem_config.h it should
not rely on this in the future. The intent is
to move fs_config function into libcutils and
thus deprecate any need for string.h in this
include file.

Bug: 19908228
Change-Id: Icc95ee02bf02c596463868b1330d209d1bd5c58a

9 years agoMerge "Installd: Support dex2oat threads system property"
Andreas Gampe [Tue, 31 Mar 2015 03:20:15 +0000 (03:20 +0000)]
Merge "Installd: Support dex2oat threads system property"

9 years agoInstalld: Support dex2oat threads system property
Andreas Gampe [Tue, 31 Mar 2015 01:45:03 +0000 (18:45 -0700)]
Installd: Support dex2oat threads system property

Check dalvik.vm.dex2oat-threads in installd and pass to dex2oat.

Bug: 19992386
Change-Id: I5e7806cf560607d31a1d6901dffb14bee538c9cc

9 years agoSupport for storing OAT files in app directory
Fyodor Kupolov [Tue, 3 Mar 2015 20:25:29 +0000 (12:25 -0800)]
Support for storing OAT files in app directory

Changes to installd:
- dexopt now allows oat_dir param for custom output directory
- Added helper method calculate_oat_file_path for calculating oat file
  output location based on oat_dir and apk_path.

Bug: 19550105
Change-Id: I6b079207310583adeb6dad918a58034a059e34c4

9 years agoMerge "Add trace_event_clock_sync to atrace"
John Reck [Fri, 27 Mar 2015 00:13:32 +0000 (00:13 +0000)]
Merge "Add trace_event_clock_sync to atrace"

9 years agoAdd trace_event_clock_sync to atrace
John Reck [Thu, 26 Mar 2015 22:31:35 +0000 (15:31 -0700)]
Add trace_event_clock_sync to atrace

Change-Id: I8adce15210d82df09ff3a39ddd8df617aeb16a42

9 years agoMerge "Store odex files in oat/<isa>/ directory."
Richard Uhler [Thu, 26 Mar 2015 14:57:35 +0000 (14:57 +0000)]
Merge "Store odex files in oat/<isa>/ directory."

9 years agoStore odex files in oat/<isa>/ directory.
Richard Uhler [Wed, 18 Mar 2015 19:39:09 +0000 (12:39 -0700)]
Store odex files in oat/<isa>/ directory.

Previously odex files were stored alongside the dex location as:
  dex location: /foo/bar/base.apk
  odex location: /foo/bar/<isa>/base.odex

This changes where odex files are stored, adding an "oat" directory:
  dex location: /foo/bar/base.apk
  odex location: /foo/bar/oat/<isa>/base.odex

See also the corresponding changes in platform/art and platform/build.

Bug: 19550105
Change-Id: I4c6be4f0c41ff175904846db8e360c4af815b265

9 years agoMerge "Fix mistake using width instead of height."
Jesse Hall [Tue, 24 Mar 2015 20:52:51 +0000 (20:52 +0000)]
Merge "Fix mistake using width instead of height."

9 years agoFix mistake using width instead of height.
Christopher Ferris [Mon, 23 Mar 2015 21:32:15 +0000 (14:32 -0700)]
Fix mistake using width instead of height.

Found by rodrigo.chiossi@intel.com.

Change-Id: I49d590ed39f6b47ba58a77a75d66b2964ea1cb1d

9 years agoMerge "Use verify-at-runtime if debug.usejit is true"
Mathieu Chartier [Sat, 21 Mar 2015 00:14:27 +0000 (00:14 +0000)]
Merge "Use verify-at-runtime if debug.usejit is true"

9 years agoUse verify-at-runtime if debug.usejit is true
Mathieu Chartier [Fri, 20 Mar 2015 22:39:47 +0000 (15:39 -0700)]
Use verify-at-runtime if debug.usejit is true

Bug: 19735273
Change-Id: Ib65b50dbde00184544a1341f351a0fe0ef504d32

9 years agoDO NOT MERGE libgui: Remove IGBC::BufferItem
Dan Stoza [Fri, 13 Mar 2015 21:40:34 +0000 (14:40 -0700)]
DO NOT MERGE libgui: Remove IGBC::BufferItem

Removes IGraphicBufferConsumer::BufferItem. Depends on the
following changes:
    I187b3a7d05196b6289596afac8fb9a9d4aebff76
    I0ddd38df37500cfd6b21d1e768ed14e39c5cd9fc

Cherry-pick of Id1fa56d092188f2cb712768d5d2fc6a9027fb73c

Change-Id: I3edf0db8fba656fd78e18a5a7f1137f0fb6b237d

9 years agoMerge "DO NOT MERGE SurfaceFlinger: Stop using IGBC::BufferItem"
Dan Stoza [Fri, 20 Mar 2015 18:56:05 +0000 (18:56 +0000)]
Merge "DO NOT MERGE SurfaceFlinger: Stop using IGBC::BufferItem"

9 years agoMerge "DO NOT MERGE libgui: Prepare for IGBC::BufferItem removal"
Dan Stoza [Fri, 20 Mar 2015 18:47:47 +0000 (18:47 +0000)]
Merge "DO NOT MERGE libgui: Prepare for IGBC::BufferItem removal"

9 years agoMerge "DO NOT MERGE Add dataSpace to buffer queues; remove old format enums."
Dan Stoza [Fri, 20 Mar 2015 18:36:18 +0000 (18:36 +0000)]
Merge "DO NOT MERGE Add dataSpace to buffer queues; remove old format enums."

9 years agoDO NOT MERGE SurfaceFlinger: Stop using IGBC::BufferItem
Dan Stoza [Thu, 12 Mar 2015 22:12:44 +0000 (15:12 -0700)]
DO NOT MERGE SurfaceFlinger: Stop using IGBC::BufferItem

Switches all uses of IGraphicBufferConsumer::BufferItem (and
BufferQueue::BufferItem) to the BufferItem in libgui. Depends on
frameworks/native I699ed0a6837076867ca756b28d1ffb2238f7a0d9.

Cherry pick of I187b3a7d05196b6289596afac8fb9a9d4aebff76

Change-Id: I5bc79fb96b6cba6021af64b20890967aa3b7fcbf

9 years agoDO NOT MERGE libgui: Prepare for IGBC::BufferItem removal
Dan Stoza [Wed, 11 Mar 2015 21:04:22 +0000 (14:04 -0700)]
DO NOT MERGE libgui: Prepare for IGBC::BufferItem removal

Currently, there are two instances of BufferItem: one inside of
IGraphicBufferConsumer, and a standalone one inside of libgui. They
only differ in the name of one of the fields, and we want to remove
the IGBC version. This changes things so that client code may be
incrementally switched over to the libgui version.

This is a squashed commit containing the following changes:
    I64f495105f56cbf5803cea4aa6b072ea29b70cf5
    I1394e693314429ada93427889f10b7b01c948053
    I9c3bc8037fa9438d4d9080b8afb694219ef2f71f
    I699ed0a6837076867ca756b28d1ffb2238f7a0d9
    Iac8425e1241774304a131da2fb9dec6e82922f13

Change-Id: Ic4d51f5df6dbc70b376d13fceba2335b9bae4f3d

9 years agoDO NOT MERGE Add dataSpace to buffer queues; remove old format enums.
Eino-Ville Talvala [Fri, 20 Feb 2015 00:10:43 +0000 (16:10 -0800)]
DO NOT MERGE Add dataSpace to buffer queues; remove old format enums.

- Wire up new dataSpace parameter through buffer queue stack
- Update tests to include the parameter
- Switch eglApi to using dataSpace to indicate sRGB gamma/linear
  difference
- Remove RAW_SENSOR in favor of RAW16
- Remove use of sRGB format enums
- Add default dataspace to buffer queue core
- Add query for default dataspace

Cherry pick of I070bd2e7c56506055c419004c29e2e3feac725df

Change-Id: I461952389c18051176c6b75e664f20ad369f5760

9 years agoMerge "dumpstate: add O_CLOEXEC"
Nick Kralevich [Thu, 19 Mar 2015 18:48:07 +0000 (18:48 +0000)]
Merge "dumpstate: add O_CLOEXEC"

9 years agodumpstate: add O_CLOEXEC
Nick Kralevich [Thu, 19 Mar 2015 18:30:59 +0000 (11:30 -0700)]
dumpstate: add O_CLOEXEC

Add O_CLOEXEC to various file descriptor calls, to avoid
leaking file descriptors to dumpstate's child processes.

Bug: 18342188
Change-Id: I74c47a98dfddc29c618067ad53d879b98ed1d87a

9 years agoMerge "Surface: Permit an IProducerListener on connect"
Dan Stoza [Thu, 19 Mar 2015 17:45:25 +0000 (17:45 +0000)]
Merge "Surface: Permit an IProducerListener on connect"

9 years agoMerge "libgui: Only allow one return from useFenceSync"
Dan Stoza [Thu, 19 Mar 2015 17:35:56 +0000 (17:35 +0000)]
Merge "libgui: Only allow one return from useFenceSync"

9 years agolibgui: Only allow one return from useFenceSync
Dan Stoza [Fri, 5 Dec 2014 21:43:03 +0000 (13:43 -0800)]
libgui: Only allow one return from useFenceSync

An #ifdef was causing multiple returns in this function, which was
triggering an unreachable code error on some build targets. This
adds an #else to ensure that only one return is exposed in any given
build.

Cherry pick of I9ed7c3e769bc9094ad31d810944227d1d8302886

Change-Id: Ibddc5706159d168031d1805fcce3eedc068296cf

9 years agoMerge "GLConsumer: Fix unsigned subtraction during crop"
Dan Stoza [Thu, 19 Mar 2015 17:22:22 +0000 (17:22 +0000)]
Merge "GLConsumer: Fix unsigned subtraction during crop"

9 years agoMerge "Update maxNumber to be smaller."
Dan Stoza [Thu, 19 Mar 2015 17:16:14 +0000 (17:16 +0000)]
Merge "Update maxNumber to be smaller."

9 years agoMerge "libgui: Enable -Weverything and -Werror"
Dan Stoza [Thu, 19 Mar 2015 17:06:40 +0000 (17:06 +0000)]
Merge "libgui: Enable -Weverything and -Werror"

9 years agoSurface: Permit an IProducerListener on connect
Dan Stoza [Tue, 3 Mar 2015 06:12:37 +0000 (22:12 -0800)]
Surface: Permit an IProducerListener on connect

This change allows clients of Surface to provide an IProducerListener
callback object to Surface::connect, which will be passed down to the
underlying IGraphicBufferProducer.

Cherry pick of I5ea5229bf3a329bf02c6bd20e7247039c75d136b

Change-Id: I6f8f52c72654e4cee649721383819bafe378f964

9 years agoGLConsumer: Fix unsigned subtraction during crop
Dan Stoza [Wed, 4 Mar 2015 22:58:02 +0000 (14:58 -0800)]
GLConsumer: Fix unsigned subtraction during crop

Since some variables had been switched from signed to unsigned, there
was a section of code that was guaranteed to be incorrect because it
effectively did 'if (a < b) { c = a - b; }'. This change fixes it.

Cherry pick of I9cdd6c9a0179801addebb5d6dc1fbaddf8f53c62

Bug: 19346631
Change-Id: Id13a46f74c9ae7278463ce22b586f4dc21b5e453

9 years agoUpdate maxNumber to be smaller.
Michael Lentine [Wed, 18 Feb 2015 18:14:18 +0000 (10:14 -0800)]
Update maxNumber to be smaller.

There shouldn't be more than 4096 fds (probably signficantly smaller) and
there shouldn't be more than 4096 ints.

Cherry pick of I3a3e50ee3078a4710e9737114e65afc923ed0573

Bug: 18076253
Change-Id: I82a883572b401f115d252dcd3d00aa7252b49b0e

9 years agolibgui: Enable -Weverything and -Werror
Dan Stoza [Tue, 18 Nov 2014 18:24:03 +0000 (10:24 -0800)]
libgui: Enable -Weverything and -Werror

Enables -Weverything and -Werror, with just a few exceptions for
warnings we can't (or shouldn't need to) work around.

Cherry pick of I034abec27bf4020d84af60d7acc1939c59986dd6 plus a
couple of minor changes to CpuConsumer.cpp to make it work with a
prior change:
    Uncomment CC_LOGV on line 46
    Change C-style cast to static_cast on line 71

Change-Id: Iaec610477ea0122317b0578fb74caf2383d4cf08

9 years agoMerge "[MIPS] Fix mips32r1 build"
Jesse Hall [Sun, 15 Mar 2015 02:41:04 +0000 (02:41 +0000)]
Merge "[MIPS] Fix mips32r1 build"

9 years agoam 5a25a63d: Merge "Installd: Pass debuggable flag"
Andreas Gampe [Tue, 10 Mar 2015 02:10:06 +0000 (02:10 +0000)]
am 5a25a63d: Merge "Installd: Pass debuggable flag"

* commit '5a25a63de2693177b15817fb19b684ca7bfec582':
  Installd: Pass debuggable flag

9 years agoMerge "Installd: Pass debuggable flag"
Andreas Gampe [Mon, 9 Mar 2015 22:14:47 +0000 (22:14 +0000)]
Merge "Installd: Pass debuggable flag"

9 years agoInstalld: Pass debuggable flag
Andreas Gampe [Tue, 3 Mar 2015 17:15:06 +0000 (09:15 -0800)]
Installd: Pass debuggable flag

Pass the debuggable flag from the package manager to dex2oat.

Change-Id: Id17ec72babe2ee88713a0d274eff86508de30666

9 years agoam 3949f664: Merge "SurfaceFlinger: Fix null pointer exception"
Dan Stoza [Mon, 9 Mar 2015 18:05:26 +0000 (18:05 +0000)]
am 3949f664: Merge "SurfaceFlinger: Fix null pointer exception"

* commit '3949f664c71ad1269ee0c921d176e3b4484015cc':
  SurfaceFlinger: Fix null pointer exception

9 years agoMerge "SurfaceFlinger: Fix null pointer exception"
Dan Stoza [Mon, 9 Mar 2015 18:00:28 +0000 (18:00 +0000)]
Merge "SurfaceFlinger: Fix null pointer exception"

9 years agoSurfaceFlinger: Fix null pointer exception
Dan Stoza [Mon, 9 Mar 2015 17:04:11 +0000 (10:04 -0700)]
SurfaceFlinger: Fix null pointer exception

Fixes a null pointer exception in getActiveConfig

Bug: 19416124
Change-Id: I45a01f67affb63a348866ce42a6013c5eb71fe8f

9 years agoam 5fec7915: Merge "service_manager: reorder permission checks for find"
Nick Kralevich [Thu, 5 Mar 2015 21:48:25 +0000 (21:48 +0000)]
am 5fec7915: Merge "service_manager: reorder permission checks for find"

* commit '5fec79156d749322dcc0376da1d6cf4d9ee9ccf4':
  service_manager: reorder permission checks for find

9 years agoMerge "service_manager: reorder permission checks for find"
Nick Kralevich [Thu, 5 Mar 2015 21:43:07 +0000 (21:43 +0000)]
Merge "service_manager: reorder permission checks for find"

9 years agoservice_manager: reorder permission checks for find
Nick Kralevich [Thu, 5 Mar 2015 18:58:40 +0000 (10:58 -0800)]
service_manager: reorder permission checks for find

Reorder the find permission checks. This avoids generating misleading
SELinux denials when a service doesn't exist, or when a service is
prohibited to isolated apps.

The original reason for structuring the code this way is explained
in https://android-review.googlesource.com/#/c/100530/4/cmds/servicemanager/service_manager.c@172
The concern at the time was to avoid leaking a situation where
a caller could probe for the existance of a service. This turns out
to be unnecessary. The same return value is used for both a
permission denied and a service not found. The only side effect
is the generation of an SELinux audit log, which likely won't be
accessible to the calling application.

Change-Id: I9760e1821ed16102fa5f9bec07f8c34944565be9

9 years agoam 9d68ed0e: Merge "Add timeout for dump_file."
Christopher Ferris [Thu, 26 Feb 2015 18:40:42 +0000 (18:40 +0000)]
am 9d68ed0e: Merge "Add timeout for dump_file."

* commit '9d68ed0ecd3a101c13a163cfe730b13b1564b442':
  Add timeout for dump_file.

9 years agoMerge "Add timeout for dump_file."
Christopher Ferris [Thu, 26 Feb 2015 18:35:01 +0000 (18:35 +0000)]
Merge "Add timeout for dump_file."

9 years agoam bb67beca: Merge "dumpstate: add pstore read"
Mark Salyzyn [Thu, 26 Feb 2015 17:29:07 +0000 (17:29 +0000)]
am bb67beca: Merge "dumpstate: add pstore read"

* commit 'bb67beca35e7d570ede193a316a92022fbc2f810':
  dumpstate: add pstore read

9 years agoMerge "dumpstate: add pstore read"
Mark Salyzyn [Thu, 26 Feb 2015 17:23:41 +0000 (17:23 +0000)]
Merge "dumpstate: add pstore read"

9 years agodumpstate: add pstore read
Mark Salyzyn [Tue, 16 Dec 2014 17:09:26 +0000 (09:09 -0800)]
dumpstate: add pstore read

Call logcat -L to pull any LAST Android logs. If the kernel is not
configured for PSTORE and PSTORE_PMSG, the hopes are the empty
content will pressure vendors to slice up and configure support.

Change-Id: I5fddfa1e0f59f24fccc30b257ba68af8a8cf8640

9 years agoAdd timeout for dump_file.
Christopher Ferris [Tue, 10 Feb 2015 20:15:01 +0000 (12:15 -0800)]
Add timeout for dump_file.

It turns out dump_file is used on a number of /proc and system files.
In one case, the read of a file stalled and caused a bugreport to
hang forever. It's still possible if there is a kernel bug that this
could stall forever, but less likely.

Also, change the return type of nanotime to uint64_t.

Testing:
- Created a named fifo and verified that dump_file fails with a timeout.
- Created a large /data/anr/traces.txt to verify that large files still
  dump properly and that the additional NONBLOCK parameter doesn't cause
  a problem.
- Created a dummy /data/tombstones/tombstone_00 to verify that the
  dump of these files still works.
- Compared a dump using the old dumpstate to the new dumpstate to verify
  nothing obviously different.

Bug: 19117030
Change-Id: I0d3dd27583c853cdaccd2fd278748cb5f9ccd4fb

9 years agoam 56f8c6c4: Merge "Error compiling waitforvsync.cpp"
Greg Hackmann [Thu, 26 Feb 2015 01:07:03 +0000 (01:07 +0000)]
am 56f8c6c4: Merge "Error compiling waitforvsync.cpp"

* commit '56f8c6c42dab4c3636edb62162088e5d765fa956':
  Error compiling waitforvsync.cpp

9 years agoMerge "Error compiling waitforvsync.cpp"
Greg Hackmann [Wed, 25 Feb 2015 23:42:17 +0000 (23:42 +0000)]
Merge "Error compiling waitforvsync.cpp"

9 years agoam 79749845: Merge "Fix pointer-to-int and int-to-pointer warnings."
Dan Albert [Wed, 25 Feb 2015 23:00:44 +0000 (23:00 +0000)]
am 79749845: Merge "Fix pointer-to-int and int-to-pointer warnings."

* commit '797498450cbcb87c28636e775ada942005436909':
  Fix pointer-to-int and int-to-pointer warnings.

9 years agoMerge "Fix pointer-to-int and int-to-pointer warnings."
Dan Albert [Wed, 25 Feb 2015 22:50:10 +0000 (22:50 +0000)]
Merge "Fix pointer-to-int and int-to-pointer warnings."

9 years agoFix pointer-to-int and int-to-pointer warnings.
Dan Albert [Mon, 23 Feb 2015 18:39:14 +0000 (10:39 -0800)]
Fix pointer-to-int and int-to-pointer warnings.

Change-Id: If534cbcf2c3e644270572cbf829ba9b5acab29e6

9 years agoam d80268ba: Merge "vsync.cpp test is throwing error whe compiled"
Mark Salyzyn [Mon, 23 Feb 2015 15:19:59 +0000 (15:19 +0000)]
am d80268ba: Merge "vsync.cpp test is throwing error whe compiled"

* commit 'd80268ba19f9217c5459a2952580090ef84a7b78':
  vsync.cpp test is throwing error whe compiled

9 years agoMerge "vsync.cpp test is throwing error whe compiled"
Mark Salyzyn [Mon, 23 Feb 2015 15:14:23 +0000 (15:14 +0000)]
Merge "vsync.cpp test is throwing error whe compiled"

9 years agovsync.cpp test is throwing error whe compiled
Nanik Tolaram [Sat, 14 Feb 2015 00:32:46 +0000 (11:32 +1100)]
vsync.cpp test is throwing error whe compiled

frameworks/native/services/surfaceflinger/tests/vsync/vsync.cpp:55:44: error: 'ALOOPER_EVENT_INPUT' was not declared in this scope
     loop->addFd(myDisplayEvent.getFd(), 0, ALOOPER_EVENT_INPUT, receiver,
                                            ^
frameworks/native/services/surfaceflinger/tests/vsync/vsync.cpp:64:18: error: 'ALOOPER_POLL_WAKE' was not declared in this scope
             case ALOOPER_POLL_WAKE:
                  ^
frameworks/native/services/surfaceflinger/tests/vsync/vsync.cpp:67:18: error: 'ALOOPER_POLL_CALLBACK' was not declared in this scope
             case ALOOPER_POLL_CALLBACK:
                  ^
frameworks/native/services/surfaceflinger/tests/vsync/vsync.cpp:70:18: error: 'ALOOPER_POLL_TIMEOUT' was not declared in this scope
             case ALOOPER_POLL_TIMEOUT:
                  ^
frameworks/native/services/surfaceflinger/tests/vsync/vsync.cpp:73:18: error: 'ALOOPER_POLL_ERROR' was not declared in this scope
             case ALOOPER_POLL_ERROR:
                  ^

it is missing one header file

Change-Id: Ie2fb02523a866b13a99edf837f072d101cacb466
Signed-off-by: Nanik Tolaram <nanikjava@gmail.com>
9 years agoam f3f22e55: Merge "Add missing <unistd.h> include for close."
Elliott Hughes [Fri, 20 Feb 2015 01:13:29 +0000 (01:13 +0000)]
am f3f22e55: Merge "Add missing <unistd.h> include for close."

* commit 'f3f22e555bae8e362f3cac1efb289ca321266035':
  Add missing <unistd.h> include for close.

9 years agoMerge "Add missing <unistd.h> include for close."
Elliott Hughes [Fri, 20 Feb 2015 01:08:07 +0000 (01:08 +0000)]
Merge "Add missing <unistd.h> include for close."

9 years agoAdd missing <unistd.h> include for close.
Elliott Hughes [Fri, 20 Feb 2015 00:58:44 +0000 (16:58 -0800)]
Add missing <unistd.h> include for close.

Change-Id: Iebce6d74eecb8c275e800b7f47f74bbd4374860d

9 years agoMerge commit '26cc3d0b67ff4daf31eaeed0ecd87b391978aadb' into HEAD
Bill Yi [Thu, 19 Feb 2015 22:31:45 +0000 (14:31 -0800)]
Merge commit '26cc3d0b67ff4daf31eaeed0ecd87b391978aadb' into HEAD

9 years agoMerge "egl: Remove old tuna BGRA vs RGBA workaround."
Jesse Hall [Wed, 18 Feb 2015 17:31:12 +0000 (17:31 +0000)]
Merge "egl: Remove old tuna BGRA vs RGBA workaround."

9 years agoMerge "Add missing <sys/file.h> include for flock."
Elliott Hughes [Tue, 17 Feb 2015 01:24:48 +0000 (01:24 +0000)]
Merge "Add missing <sys/file.h> include for flock."

9 years agoAdd missing <sys/file.h> include for flock.
Elliott Hughes [Mon, 16 Feb 2015 18:44:22 +0000 (10:44 -0800)]
Add missing <sys/file.h> include for flock.

Change-Id: I5c9bb4aa74d8a36d44e086bbcb5d60876727ce4c

9 years agoError compiling waitforvsync.cpp
Nanik Tolaram [Fri, 13 Feb 2015 13:26:59 +0000 (00:26 +1100)]
Error compiling waitforvsync.cpp

The waitforvsync.cpp throws error when compiling. Following is the error log

target thumb C++: test-waitforvsync <= frameworks/native/services/surfaceflinger/tests/waitforvsync/waitforvsync.cpp
frameworks/native/services/surfaceflinger/tests/waitforvsync/waitforvsync.cpp: In function 'int main(int, char**)':
frameworks/native/services/surfaceflinger/tests/waitforvsync/waitforvsync.cpp:43:17: error: 'close' was not declared in this scope
         close(fd);
                 ^
....
....

make: *** [out/target/product/grouper/obj/EXECUTABLES/test-waitforvsync_intermediates/waitforvsync.o] Error 1

the file is missing #include <unistd.h>

Change-Id: I57728dbde65641cd3138625f9a590f9db8648158
Signed-off-by: Nanik Tolaram <nanikjava@gmail.com>
9 years agoegl: Remove old tuna BGRA vs RGBA workaround.
Alistair Strachan [Thu, 12 Feb 2015 20:33:25 +0000 (12:33 -0800)]
egl: Remove old tuna BGRA vs RGBA workaround.

Some time before kitkat, a workaround was put in place to keep tuna
working with obsolete PowerVR GPU drivers. The tuna product was dropped
in AOSP for kitkat, but the workaround remained.

There are still a number of devices shipping with OMAP4 processors, and
this workaround continues to be applied on those products even when it
is not required. The effect is that virtual display CTS will fail on
those devices.

9 years agoam b9bb1f13: Merge "Add support for SENSOR_TYPE_WRIST_TILT_GESTURE" into lmp-mr1...
Nick Vaccaro [Wed, 11 Feb 2015 20:04:42 +0000 (20:04 +0000)]
am b9bb1f13: Merge "Add support for SENSOR_TYPE_WRIST_TILT_GESTURE" into lmp-mr1-modular-dev

* commit 'b9bb1f139bd1cbf3b3faa002b509f3f0a167e20b':
  Add support for SENSOR_TYPE_WRIST_TILT_GESTURE

9 years agoam 9b6be8e1: Revert "omx: add Intel\'s SemiPlanar OMX color format that is used on...
Lajos Molnar [Wed, 11 Feb 2015 20:04:40 +0000 (20:04 +0000)]
am 9b6be8e1: Revert "omx: add Intel\'s SemiPlanar OMX color format that is used on some devices"

* commit '9b6be8e10b25f6f0bb949fec67b36fc773f5b591':
  Revert "omx: add Intel's SemiPlanar OMX color format that is used on some devices"

9 years agoMerge "Add support for SENSOR_TYPE_WRIST_TILT_GESTURE" into lmp-mr1-modular-dev
Nick Vaccaro [Wed, 11 Feb 2015 19:58:18 +0000 (19:58 +0000)]
Merge "Add support for SENSOR_TYPE_WRIST_TILT_GESTURE" into lmp-mr1-modular-dev

9 years agoRevert "omx: add Intel's SemiPlanar OMX color format that is used on some devices"
Lajos Molnar [Wed, 11 Feb 2015 17:58:06 +0000 (09:58 -0800)]
Revert "omx: add Intel's SemiPlanar OMX color format that is used on some devices"

This reverts commit 61b17d64f90b85fd367ea1c7609cac69485957d4.

Bug: 19317169
Change-Id: Ib1fcc26c46a52c848ffa8238ddbf6abfe57cfa5d

9 years agoam 8511b3ae: Merge "Remove -z option."
Christopher Ferris [Tue, 10 Feb 2015 16:53:52 +0000 (16:53 +0000)]
am 8511b3ae: Merge "Remove -z option."

* commit '8511b3ae5eb42810f97f7c3e993d7f80d3393b83':
  Remove -z option.

9 years agoMerge "Remove -z option."
Christopher Ferris [Tue, 10 Feb 2015 01:26:58 +0000 (01:26 +0000)]
Merge "Remove -z option."

9 years agoRemove -z option.
Christopher Ferris [Tue, 10 Feb 2015 00:24:47 +0000 (16:24 -0800)]
Remove -z option.

This option doesn't work with the current selinux protections and
doesn't serve much of a purpose. You can get the same results running
this:

dumpstate | gzip > /data/local/tmp/dump.txt.gz

Bug: 19271141
Change-Id: Icc76200df33dc708e30c556ec8a0f393f995fe7c

9 years agoAdd support for SENSOR_TYPE_WRIST_TILT_GESTURE
Nick Vaccaro [Wed, 21 Jan 2015 23:27:23 +0000 (15:27 -0800)]
Add support for SENSOR_TYPE_WRIST_TILT_GESTURE

Change-Id: I7e5516de805618df41de0f9b06805002e32708c3

9 years agoam d25be0ea: DO NOT MERGE: omx: add OMX_INTEL_COLOR_FormatYUV420PackedSemiPlanar
Lajos Molnar [Sat, 7 Feb 2015 00:06:07 +0000 (00:06 +0000)]
am d25be0ea: DO NOT MERGE: omx: add OMX_INTEL_COLOR_FormatYUV420PackedSemiPlanar

* commit 'd25be0ea48c775e4038163b546c9553e294d4fdc':
  DO NOT MERGE: omx: add OMX_INTEL_COLOR_FormatYUV420PackedSemiPlanar

9 years agoDO NOT MERGE: omx: add OMX_INTEL_COLOR_FormatYUV420PackedSemiPlanar
Lajos Molnar [Fri, 6 Feb 2015 02:37:56 +0000 (18:37 -0800)]
DO NOT MERGE: omx: add OMX_INTEL_COLOR_FormatYUV420PackedSemiPlanar

This seems to have the same layout as OMX_COLOR_FormatYUV420SemiPlanar,
but used under this value on some devices.

Bug: 19246722

Change-Id: Ib866024e52cf7b12608f02eefc43c6d58a1c0aa1

9 years agoam ea5da67d: add bUsingNativeBuffers to DescribeColorFormatParams
Lajos Molnar [Wed, 4 Feb 2015 20:47:43 +0000 (20:47 +0000)]
am ea5da67d: add bUsingNativeBuffers to DescribeColorFormatParams

* commit 'ea5da67d90647a1d4b395be51bf9cec218b98b71':
  add bUsingNativeBuffers to DescribeColorFormatParams

9 years agoam 50ad67e4: Merge "Add better timeout mechanism for running commands."
Christopher Ferris [Wed, 4 Feb 2015 02:08:44 +0000 (02:08 +0000)]
am 50ad67e4: Merge "Add better timeout mechanism for running commands."

* commit '50ad67e4ce6b07b5f5f4649ace81ed9a8b2c2eac':
  Add better timeout mechanism for running commands.

9 years agoMerge "Add better timeout mechanism for running commands."
Christopher Ferris [Wed, 4 Feb 2015 01:57:13 +0000 (01:57 +0000)]
Merge "Add better timeout mechanism for running commands."

9 years agoAdd better timeout mechanism for running commands.
Christopher Ferris [Fri, 30 Jan 2015 19:00:52 +0000 (11:00 -0800)]
Add better timeout mechanism for running commands.

Change-Id: I60fc9e7d59c3e0e4b8b2f69f79c6903240bfd131

9 years ago[MIPS] Fix mips32r1 build
Duane Sand [Tue, 3 Feb 2015 00:54:15 +0000 (16:54 -0800)]
[MIPS] Fix mips32r1 build

Fix regression from 6701fbe5f0d799c5245b0cdf3a69ecdcbfd9fb08 .
The rdhwr instruction is unsupported by mips32r1 cpus, but is
supported via kernel emulation on those cpus.

Change-Id: Ieb3343fff0f0da54003044f451c90e1c761208eb

9 years agoam 51bfedd8: Merge "Add missing includes."
Elliott Hughes [Fri, 30 Jan 2015 21:16:38 +0000 (21:16 +0000)]
am 51bfedd8: Merge "Add missing includes."

* commit '51bfedd821c79ae34ee1caffd9ae958faa71ecec':
  Add missing includes.