OSDN Git Service

android-x86/frameworks-native.git
8 years agoInstalld: Fully decouple pre- and post-bootcomplete properties
Andreas Gampe [Mon, 28 Sep 2015 15:55:01 +0000 (08:55 -0700)]
Installd: Fully decouple pre- and post-bootcomplete properties

Do not fall back to dalvik.vm.dex2oat-threads if
dalvik.vm.boot-dex2oat-threads is not set. Also do not ever use
the value of dalvik.vm.image-dex2oat-threads. Instead use the
default behavior of dex2oat in that situation.

Change-Id: I42e60996341414b95b8df2d243d5e07f7f5ff9b6

8 years agoMerge "Pass dexopt flags as integer"
Todd Kennedy [Fri, 25 Sep 2015 21:41:37 +0000 (21:41 +0000)]
Merge "Pass dexopt flags as integer"

8 years agoPass dexopt flags as integer
Todd Kennedy [Fri, 25 Sep 2015 14:47:47 +0000 (07:47 -0700)]
Pass dexopt flags as integer

Instead of using a series of booleans, create a single flags integer
that contains all of the dexopt options.

Change-Id: I35542aa73ca57b0e765d19b1339b1429849c1ae8

8 years agoMerge "Installd: Take boot status as dexopt parameter"
Todd Kennedy [Thu, 24 Sep 2015 20:35:07 +0000 (20:35 +0000)]
Merge "Installd: Take boot status as dexopt parameter"

8 years agoInstalld: Take boot status as dexopt parameter
Andreas Gampe [Mon, 21 Sep 2015 20:21:30 +0000 (13:21 -0700)]
Installd: Take boot status as dexopt parameter

Expect the boot status explicitly as a parameter so that we do not
have to rely on dev.bootcomplete, which isn't meaningfully set
when the device needs the decryption screen on boot.

Bug: 23898216
(cherry picked from commit 72ebebed876a62e719b098e43d9d516361bde029)
Change-Id: I9b34298caf70b1e5d40970cc0d04c469016a80a7

8 years agoMerge "Enable integer overflow sanitization in libinput."
Dan Austin [Wed, 23 Sep 2015 16:47:59 +0000 (16:47 +0000)]
Merge "Enable integer overflow sanitization in libinput."

8 years agoEnable integer overflow sanitization in libinput.
Dan Austin [Tue, 22 Sep 2015 21:33:57 +0000 (14:33 -0700)]
Enable integer overflow sanitization in libinput.

Bug: 24171356
Change-Id: I1412b78171c60b0252560956a672f2d92a7011e6

8 years agoMerge "Eliminate multiple benign overflow conditions."
Dan Austin [Wed, 23 Sep 2015 16:36:28 +0000 (16:36 +0000)]
Merge "Eliminate multiple benign overflow conditions."

8 years agoMerge "Remove usage of SharedBuffer"
Sergio Giro [Wed, 23 Sep 2015 16:22:55 +0000 (16:22 +0000)]
Merge "Remove usage of SharedBuffer"

8 years agoMerge "Enable multiple benign overflow conditions."
Dan Austin [Wed, 23 Sep 2015 14:45:51 +0000 (14:45 +0000)]
Merge "Enable multiple benign overflow conditions."

8 years agoMerge "Eliminate benign overflow condition triggered upon loop termination in Input...
Dan Austin [Wed, 23 Sep 2015 14:45:25 +0000 (14:45 +0000)]
Merge "Eliminate benign overflow condition triggered upon loop termination in Input.cpp"

8 years agoEliminate multiple benign overflow conditions.
Dan Austin [Tue, 22 Sep 2015 21:28:07 +0000 (14:28 -0700)]
Eliminate multiple benign overflow conditions.

In InputTransport.cpp, there are multiple loops in which loop
termination occurs when the value becomes zero. These termination
conditions are all written value-- > 0, which, since value is
unsigned, result in an unsigned integer overflow when value is 0.
These loops were refactored to eliminate these conditions.

Bug: 24171356
Change-Id: Ie135c4306d1f2cef2778e295242305ed5139221a

8 years agoEnable multiple benign overflow conditions.
Dan Austin [Tue, 22 Sep 2015 21:32:03 +0000 (14:32 -0700)]
Enable multiple benign overflow conditions.

In VelocityTracker.cpp, there are multiple loops in which loop
termination occurs when the value becomes zero. These termination
conditions are all written value-- > 0, which, since value is
unsigned, result in an integer overflow condition when value is 0.
These loop were refactored to eliminate these conditions.

Bug: 24171356
Change-Id: Ie44940cfef8a122ee1aff59c021274ba39a368bf

8 years agoEliminate benign overflow condition triggered upon loop termination in Input.cpp
Dan Austin [Tue, 22 Sep 2015 21:22:41 +0000 (14:22 -0700)]
Eliminate benign overflow condition triggered upon loop termination in Input.cpp

In readFromParcel, a while loop is terminated when sampleCount = 0. The
decrement operation that was here would decrease sampleCount, an unsigned value,
below 0, triggering an unsigned integer overflow. The while loop was refactored
to eliminate this condition.

Bug: 24171356
Change-Id: I7669f54a41d11548b33e322b025431c6f6038952

8 years agoMerge "constify generated JNINativeMethod fn ptr tables"
Nick Kralevich [Mon, 21 Sep 2015 21:42:06 +0000 (21:42 +0000)]
Merge "constify generated JNINativeMethod fn ptr tables"

8 years agoconstify generated JNINativeMethod fn ptr tables
Daniel Micay [Mon, 21 Sep 2015 17:17:57 +0000 (13:17 -0400)]
constify generated JNINativeMethod fn ptr tables

Change-Id: Icbad34e298f6d8e60ef12e9a91200994249fe2f5

8 years agoRemove usage of SharedBuffer
Pablo Ceballos [Fri, 11 Sep 2015 21:37:39 +0000 (14:37 -0700)]
Remove usage of SharedBuffer

- Remove getSharedBuffer() from Region
- Don't use SharedBuffer for memory management in HWCLayerVersion1,
  instead keep shallow copies of the Regions.

Bug 23962051

(cherry picked from commit d814cf2a3e3a2fdb73efa80539fe8af0a93da1db)

Change-Id: I8fa17beed57936648c7b4defc9219dff1d5b337f

8 years agoMerge "asan: update condition to work with multiple SANITIZE_TARGET values."
Evgenii Stepanov [Fri, 18 Sep 2015 20:23:35 +0000 (20:23 +0000)]
Merge "asan: update condition to work with multiple SANITIZE_TARGET values."

8 years agoasan: update condition to work with multiple SANITIZE_TARGET values.
Ivan Krasin [Fri, 18 Sep 2015 19:03:44 +0000 (12:03 -0700)]
asan: update condition to work with multiple SANITIZE_TARGET values.

The goal is to enable SANITIZE_TARGET='address coverage', which
will be used by LLVMFuzzer.

Bug: 22850550
Change-Id: Iaa300aa20798f2e9aa613842b463edf8aeebe3a7

8 years agoMerge "Installd: Allow different behavior before bootcomplete"
Andreas Gampe [Thu, 17 Sep 2015 22:36:50 +0000 (22:36 +0000)]
Merge "Installd: Allow different behavior before bootcomplete"

8 years agoInstalld: Allow different behavior before bootcomplete
Andreas Gampe [Mon, 14 Sep 2015 23:33:11 +0000 (16:33 -0700)]
Installd: Allow different behavior before bootcomplete

Check dev.bootcomplete in dex2oat(). Use the information for
two changes.

Only switch to the background when we're post bootcomplete.
This will ensure better utilization after upgrades.

Add a second dex2oat-threads property that is used pre
bootcomplete. A separation of these phases allows using less
cores when the device is up, freeing up resources for other
purposes, e.g., avoid jank. The precedence during boot is the
boot property, or the image property if the former doesn't
exist, or the default property as a fallback.

Bug: 23898216
Bug: 24004256

(cherry picked from commit 21948005f0294a64a42932b21a33ae75295dc3d9)

Change-Id: I5063f3fc4b437cbe88c4e94584e01c1c78eccc4d

8 years agoMerge "Update libpowermanager to expose enum and export headers."
Daniel Erat [Wed, 16 Sep 2015 02:45:23 +0000 (02:45 +0000)]
Merge "Update libpowermanager to expose enum and export headers."

8 years agoUpdate libpowermanager to expose enum and export headers.
Daniel Erat [Tue, 15 Sep 2015 16:50:17 +0000 (10:50 -0600)]
Update libpowermanager to expose enum and export headers.

Move libpowermanager's transaction ID enum (needed when
implementing BnPowerManager::onTransact()) into
IPowerManager.h and update the library's Android.mk file to
export its headers.

Bug: 22122485
Change-Id: Ie97198c3d2ebe8e880125e19a001ef7162009858

8 years agoMerge "Remove BnServiceManager."
Daniel Erat [Tue, 15 Sep 2015 14:21:30 +0000 (14:21 +0000)]
Merge "Remove BnServiceManager."

8 years agoRemove BnServiceManager.
Daniel Erat [Mon, 14 Sep 2015 22:29:54 +0000 (16:29 -0600)]
Remove BnServiceManager.

As far as I can tell (e.g. https://goo.gl/nxpFBZ from 2009),
BnServiceManager is unused. It's only relevant for
libbinder-based C++ daemons implementing the
IServiceManager.aidl interface. service_manager.c rolls its
own binder code instead.

Change-Id: I837a897d8a201b04bf3ff65c87b0d35d10196199

8 years agoMerge "Benign unsigned integer overflow in Parcel"
Dan Austin [Thu, 10 Sep 2015 22:02:03 +0000 (22:02 +0000)]
Merge "Benign unsigned integer overflow in Parcel"

8 years agoMerge "Enable fsanitize integer in ui"
Dan Austin [Thu, 10 Sep 2015 21:58:27 +0000 (21:58 +0000)]
Merge "Enable fsanitize integer in ui"

8 years agoBenign unsigned integer overflow in Parcel
Dan Austin [Thu, 10 Sep 2015 20:46:02 +0000 (13:46 -0700)]
Benign unsigned integer overflow in Parcel

The realloc case in continueWrite did not update the
gParcelGlobalAllocCount value when an allocation occurred.

In addition, there are conditions that could cause the
gParcelGlobalAllocCount value to be decremented below 0, resulting
in a benign unsigned integer overflow that can cause corrupted values
to be returned through system profiling mechanisms.

BUG: 23972600
Change-Id: Ibe07db91a811a04b486760eb78d81c926ba8503d

8 years agoMerge "Enable fsanitize integer in binder"
Dan Austin [Wed, 9 Sep 2015 14:39:25 +0000 (14:39 +0000)]
Merge "Enable fsanitize integer in binder"

8 years agoEnable fsanitize integer in binder
Dan Austin [Tue, 8 Sep 2015 23:18:13 +0000 (16:18 -0700)]
Enable fsanitize integer in binder

Enables checks for undefined or suspicious integer behavior. If
suspicious behavior is detected, the process is aborted instead of
potentially resulting in a security bug, such as #20674694 and
#19573085.

Bug: 23836686
Change-Id: I14d6d565afcb8a6435fd5a8e8175e00bbe5d9b6c

8 years agoEnable fsanitize integer in ui
Dan Austin [Tue, 8 Sep 2015 21:53:00 +0000 (14:53 -0700)]
Enable fsanitize integer in ui

Enables checks for undefined or suspicious integer behavior. If
suspicious behavior is detected, the process is aborted instead of
potentially resulting in a security bug.

Bug: 23834892
Change-Id: I9111bce2ebb36e045f4da1dbf78f90f04a0aa81c

8 years agoMerge "move init.trace.rc to frameworks/native"
Tom Cherry [Thu, 3 Sep 2015 21:52:44 +0000 (21:52 +0000)]
Merge "move init.trace.rc to frameworks/native"

8 years agomove init.trace.rc to frameworks/native
Tom Cherry [Thu, 3 Sep 2015 21:15:24 +0000 (14:15 -0700)]
move init.trace.rc to frameworks/native

init.trace.rc will be renamed to atrace.rc and use the LOCAL_INIT_RC
mechanism to be included on /system appropriately.

Bug 23186545

Change-Id: Ic5833b4bb6e6364e4fef6ab4882ae75f8f3856e9

8 years agoMerge "Add a tag for tracing system server."
Yasuhiro Matsuda [Wed, 2 Sep 2015 12:54:23 +0000 (12:54 +0000)]
Merge "Add a tag for tracing system server."

8 years agoMerge "Whitelist windows module"
Dan Willemsen [Mon, 31 Aug 2015 19:30:20 +0000 (19:30 +0000)]
Merge "Whitelist windows module"

8 years agoMerge "include/android/sensor: add enum for LINEAR_ACCELERATION"
Johan Euphrosine [Sat, 29 Aug 2015 04:15:16 +0000 (04:15 +0000)]
Merge "include/android/sensor: add enum for LINEAR_ACCELERATION"

8 years agoMerge "ignore SIGPIPE signal in native services"
Elliott Hughes [Sat, 29 Aug 2015 03:37:09 +0000 (03:37 +0000)]
Merge "ignore SIGPIPE signal in native services"

8 years agoignore SIGPIPE signal in native services
Young-Ho Cha [Fri, 28 Aug 2015 10:55:18 +0000 (19:55 +0900)]
ignore SIGPIPE signal in native services

When run dump method via dumpsys command with invalid pipe fd, native
services can crash with SIGPIPE.
So ignore SIGPIPE signal.

Bug: https://code.google.com/p/android/issues/detail?id=184099
Change-Id: Icb15e0dff34a245c08c1b4c4bed51992ae382da4
Signed-off-by: Young-Ho Cha <ganadist@gmail.com>
8 years agoinclude/android/sensor: add enum for LINEAR_ACCELERATION
Johan Euphrosine [Fri, 21 Aug 2015 01:13:43 +0000 (18:13 -0700)]
include/android/sensor: add enum for LINEAR_ACCELERATION

Change-Id: I6e387f905ba87bde810952daf939ba0f529d18b8

8 years agoWhitelist windows module
Dan Willemsen [Fri, 28 Aug 2015 21:09:44 +0000 (14:09 -0700)]
Whitelist windows module

Bug: 23566667
Change-Id: I4fa1243421885a0c1a8febbbcefb0d7e9cdcc99b

8 years agoMerge "BatteryProperties: Adds batteryCycleCount, batteryCurrent, batteryFullCharge...
Ruchi Kandoi [Tue, 25 Aug 2015 23:45:51 +0000 (23:45 +0000)]
Merge "BatteryProperties: Adds batteryCycleCount, batteryCurrent, batteryFullCharge fields in the the battery properties."

8 years agoBatteryProperties: Adds batteryCycleCount, batteryCurrent,
Ruchi Kandoi [Thu, 13 Aug 2015 00:49:42 +0000 (17:49 -0700)]
BatteryProperties: Adds batteryCycleCount, batteryCurrent,
batteryFullCharge fields in the the battery properties.

Bug: 22981343
Change-Id: I426b4b7d1eb544d2b1d97d87ae1eba0fdf35c503
Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
8 years agoMerge "libagl: Fix buffer read overrun in eglCreatePbufferSurface"
Jesse Hall [Sat, 22 Aug 2015 02:40:45 +0000 (02:40 +0000)]
Merge "libagl: Fix buffer read overrun in eglCreatePbufferSurface"

8 years agoMerge "bundle init.rc contents with its service"
Tom Cherry [Fri, 21 Aug 2015 17:42:30 +0000 (17:42 +0000)]
Merge "bundle init.rc contents with its service"

8 years agolibagl: Fix buffer read overrun in eglCreatePbufferSurface
Jesse Hall [Fri, 21 Aug 2015 14:41:46 +0000 (07:41 -0700)]
libagl: Fix buffer read overrun in eglCreatePbufferSurface

The code was assuming that EGL_NONE==0, which isn't true.

Bug: 23403170
Change-Id: Ic1eccdef086b4d610bd78dbb6b2ae883c91dc322

8 years agoMerge "binder: Change from C11 <stdatomic.h> to C++11 <atomic>."
Elliott Hughes [Thu, 20 Aug 2015 01:07:16 +0000 (01:07 +0000)]
Merge "binder: Change from C11 <stdatomic.h> to C++11 <atomic>."

8 years agobundle init.rc contents with its service
Tom Cherry [Fri, 14 Aug 2015 20:01:23 +0000 (13:01 -0700)]
bundle init.rc contents with its service

Bug: 23186545
Change-Id: I2a70a39122b146d5bbc9b55156e769782e011bff

8 years agobinder: Change from C11 <stdatomic.h> to C++11 <atomic>.
Bailey Forrest [Wed, 19 Aug 2015 00:15:10 +0000 (17:15 -0700)]
binder: Change from C11 <stdatomic.h> to C++11 <atomic>.

Change-Id: Ib831a9ccfcc7089940d37883d860574359c270e2

8 years agoMerge "binder: Add a throughput performance test for binder."
Riley Andrews [Mon, 17 Aug 2015 20:58:26 +0000 (20:58 +0000)]
Merge "binder: Add a throughput performance test for binder."

8 years agobinder: Add a throughput performance test for binder.
Riley Andrews [Tue, 11 Aug 2015 20:19:53 +0000 (13:19 -0700)]
binder: Add a throughput performance test for binder.

Change-Id: I04801cd505a439307f2a963f6267db1831b3829f

8 years agoMerge "Tracing for binder locks/transactions"
Riley Andrews [Wed, 12 Aug 2015 23:36:31 +0000 (23:36 +0000)]
Merge "Tracing for binder locks/transactions"

8 years agoMerge "Lose HAVE_ANDROID_OS from frameworks/native."
Elliott Hughes [Wed, 12 Aug 2015 22:30:07 +0000 (22:30 +0000)]
Merge "Lose HAVE_ANDROID_OS from frameworks/native."

8 years agoLose HAVE_ANDROID_OS from frameworks/native.
Elliott Hughes [Wed, 12 Aug 2015 22:27:47 +0000 (15:27 -0700)]
Lose HAVE_ANDROID_OS from frameworks/native.

Change-Id: I8e6af2a46a9d875192fc7957ada9b5f66d84bad6

8 years agoMerge "More O_DIRECTORY | O_NOFOLLOW changes"
Nick Kralevich [Mon, 10 Aug 2015 20:53:31 +0000 (20:53 +0000)]
Merge "More O_DIRECTORY | O_NOFOLLOW changes"

8 years agoMore O_DIRECTORY | O_NOFOLLOW changes
Nick Kralevich [Mon, 10 Aug 2015 20:43:00 +0000 (13:43 -0700)]
More O_DIRECTORY | O_NOFOLLOW changes

Fix a few other spots where we're not using O_NOFOLLOW
with O_DIRECTORY.

Add O_CLOEXEC for good measure.

https://code.google.com/p/android/issues/detail?id=181945

Bug: 23044050
Change-Id: Ib535cbba29cdd587443ea9e1e75831f57fd7a93c

8 years agoMerge "installd _delete_dir_contents: add O_NOFOLLOW"
Nick Kralevich [Mon, 10 Aug 2015 19:48:39 +0000 (19:48 +0000)]
Merge "installd _delete_dir_contents: add O_NOFOLLOW"

8 years agoinstalld _delete_dir_contents: add O_NOFOLLOW
Nick Kralevich [Mon, 10 Aug 2015 19:28:22 +0000 (12:28 -0700)]
installd _delete_dir_contents: add O_NOFOLLOW

Add O_NOFOLLOW to make sure we're not following symlinks.

https://code.google.com/p/android/issues/detail?id=181945

Bug: 23044050
Change-Id: I3408309fd401aefb6ebecb2a052bba198eed7633

8 years agoAdd a tag for tracing system server.
Yasuhiro Matsuda [Tue, 30 Jun 2015 16:46:25 +0000 (01:46 +0900)]
Add a tag for tracing system server.

This change is needed for
https://android-review.googlesource.com/#/c/157562/

BUG: 21739901
Change-Id: Ic4616065749236fbde9263b8f1898c434913564a

8 years agoMerge "Add a trace constant for PackageManager"
Todd Kennedy [Mon, 3 Aug 2015 17:44:44 +0000 (17:44 +0000)]
Merge "Add a trace constant for PackageManager"

8 years agoAdd a trace constant for PackageManager
Todd Kennedy [Fri, 31 Jul 2015 21:36:20 +0000 (14:36 -0700)]
Add a trace constant for PackageManager

Change-Id: Icd9afc86c88296919e4750d71cb0aef314194bee

8 years agoMerge "Native/opengl: Remove unused variables from test"
Andreas Gampe [Mon, 3 Aug 2015 16:55:45 +0000 (16:55 +0000)]
Merge "Native/opengl: Remove unused variables from test"

8 years agoNative/opengl: Remove unused variables from test
Andreas Gampe [Mon, 3 Aug 2015 15:57:34 +0000 (08:57 -0700)]
Native/opengl: Remove unused variables from test

For build-system CFLAGS clean-up.

Bug: 18632512

(cherry picked from commit a75f729650b18478e3ff822dbf686406ed7f7169)

Change-Id: Ibe2d59c7e0677f02e4bf5214d34655cd300d5f15

8 years agoMerge "dumpstate: add logcat -b all -S"
Mark Salyzyn [Fri, 31 Jul 2015 22:10:51 +0000 (22:10 +0000)]
Merge "dumpstate: add logcat -b all -S"

8 years agodumpstate: add logcat -b all -S
Mark Salyzyn [Thu, 30 Jul 2015 21:57:09 +0000 (14:57 -0700)]
dumpstate: add logcat -b all -S

- For those that are proud to call themselves logspam police
- Every time someone declares that something is too chatty, or that
  they lost their logs because they were declared too chatty and
  their associated logs were aggresively pruned we generally
  ask them to report the logger statistics to pinpoint what software
  product that is the elephant in the room.
- Every time we want to spawn a new 'stop being so spammy' bug spawned
  off a bugreport collected for another purpose, we *wish* we had the
  logger statistics to help add gravitas to the claim that some piece
  of software is the top, or near the top, polluter.

Change-Id: Ifae33cd21d0ae2917a3b4381502d723725b1701c

8 years agoMerge "Enable atrace to read categories from file."
Yasuhiro Matsuda [Thu, 30 Jul 2015 07:42:08 +0000 (07:42 +0000)]
Merge "Enable atrace to read categories from file."

8 years agoMerge "dumpstate: remove unnecessary mkdir"
Nick Kralevich [Sun, 26 Jul 2015 04:26:11 +0000 (04:26 +0000)]
Merge "dumpstate: remove unnecessary mkdir"

8 years agodumpstate: remove unnecessary mkdir
Nick Kralevich [Sun, 26 Jul 2015 04:13:49 +0000 (21:13 -0700)]
dumpstate: remove unnecessary mkdir

/data/anr is now created in init.rc. This code is unnecessary.

Bug: 22385254
Change-Id: I4ea9c311d52eee7fb6b90235fbd12a4c9364d71f

8 years agoMerge "Installd: Add a swap override flag"
Andreas Gampe [Fri, 17 Jul 2015 01:23:10 +0000 (01:23 +0000)]
Merge "Installd: Add a swap override flag"

8 years agoInstalld: Add a swap override flag
Andreas Gampe [Thu, 16 Jul 2015 22:55:41 +0000 (15:55 -0700)]
Installd: Add a swap override flag

Add dalvik.vm.dex2oat-swap system property to override a default
decision.

Bug: 20658562

(cherry picked from commit c968c0175e967e39e72f557b5e014b9575ba4727)

Change-Id: I34368c6e435d1a9ceec20a0bf1c8c6213e527f5e

8 years agoMerge "With SANITIZE_TARGET, load EGL libs from the instrumented path."
Evgenii Stepanov [Tue, 14 Jul 2015 23:47:59 +0000 (23:47 +0000)]
Merge "With SANITIZE_TARGET, load EGL libs from the instrumented path."

8 years agoMerge "Binder on Windows? Unlikely."
Elliott Hughes [Thu, 9 Jul 2015 17:16:58 +0000 (17:16 +0000)]
Merge "Binder on Windows? Unlikely."

8 years agoBinder on Windows? Unlikely.
Elliott Hughes [Thu, 9 Jul 2015 17:04:34 +0000 (10:04 -0700)]
Binder on Windows? Unlikely.

Change-Id: I36c1bee4ed33b9b0d24109a6dbaefa0548dd5aa8

8 years agoWith SANITIZE_TARGET, load EGL libs from the instrumented path.
Evgenii Stepanov [Wed, 8 Jul 2015 22:49:52 +0000 (15:49 -0700)]
With SANITIZE_TARGET, load EGL libs from the instrumented path.

Bug: 21785137
Change-Id: Iac56419a9ca776c5704bed44d3f0a1a1edd9d172

9 years agoMerge "Installd: Fix delete_code_cache() clearing the wrong cache dir"
Narayan Kamath [Wed, 1 Jul 2015 13:03:55 +0000 (13:03 +0000)]
Merge "Installd: Fix delete_code_cache() clearing the wrong cache dir"

9 years agoInstalld: Fix delete_code_cache() clearing the wrong cache dir
Hao Li [Thu, 25 Jun 2015 02:31:56 +0000 (14:31 +1200)]
Installd: Fix delete_code_cache() clearing the wrong cache dir

Fix a typo in delete_code_cache() introduced by commit c03de09, which
causes the function to empty /data/data/<package_name>/cache/ rather
than /data/data/<package_name>/code_cache/.

The following CTS test case should now pass:

 com.android.cts.appsecurity.SplitTests#testClearCodeCache

Change-Id: I2d9452d70ed39b3ea29ad65fb35e788c2fef5100
Signed-off-by: Hao Li <hao.i.li@intel.com>
Signed-off-by: Yu Ning <yu.ning@intel.com>
9 years agoMerge "sf: Initialize EventThread before creating HWC"
Dan Stoza [Tue, 30 Jun 2015 17:11:08 +0000 (17:11 +0000)]
Merge "sf: Initialize EventThread before creating HWC"

9 years agoMerge "Fix async_stop"
John Reck [Mon, 29 Jun 2015 14:17:43 +0000 (14:17 +0000)]
Merge "Fix async_stop"

9 years agoFix async_stop
John Reck [Fri, 15 May 2015 17:00:34 +0000 (10:00 -0700)]
Fix async_stop

Change-Id: I68a258cf71cfcd999bbd568ab3c96255c11bec41
(cherry picked from commit 2c237ee1d5961b9d11618e0c5a97b3bb7fb694b2)

9 years agoEnable atrace to read categories from file.
Yasuhiro Matsuda [Mon, 29 Jun 2015 10:20:39 +0000 (19:20 +0900)]
Enable atrace to read categories from file.

Add -f option to atrace, which enables atrace to use the
categories written in the specified file.

BUG: 21739901
Change-Id: I2cf1f277280434b28c426c68e2864b62aebd20cc

9 years agoTracing for binder locks/transactions
Scott Bauer [Mon, 8 Jun 2015 23:32:36 +0000 (16:32 -0700)]
Tracing for binder locks/transactions

Added logic to pull traces from the binder driver.

Change-Id: I9aa00b4650fc3f90d7bd55328dfef11e2514f7b4

9 years agosf: Initialize EventThread before creating HWC
Saurabh Shah [Tue, 16 Jun 2015 00:55:51 +0000 (17:55 -0700)]
sf: Initialize EventThread before creating HWC

Once HWC is created, it could use any of the provided hooks, which
could lead to a crash if the EventThread (handler) isn't initialized
prior to creating HWC.

Change-Id: I5ea35fe9bcb150fb74aae1295b798bd787ad6cee

9 years agoMerge "dumpstate: modify logcat timeout to compensate for storage speed"
Mark Salyzyn [Mon, 15 Jun 2015 14:27:10 +0000 (14:27 +0000)]
Merge "dumpstate: modify logcat timeout to compensate for storage speed"

9 years agodumpstate: modify logcat timeout to compensate for storage speed
Mark Salyzyn [Fri, 12 Jun 2015 19:28:24 +0000 (12:28 -0700)]
dumpstate: modify logcat timeout to compensate for storage speed

Discover the logcat buffer size, divide by the worst storage
speed in kb/s, and multiply by ten to estimate the timeout in
ms for each named buffer. If that value is less than 20 seconds,
then select 20 seconds. Apply this to each logcat request.

Bug: 21555259
Change-Id: Id36aebff83cb06e94350e4a84fa266b66a8444fc

9 years agoMerge "sf: Fix incorrect state reporting in dumpsys"
Dan Stoza [Fri, 12 Jun 2015 16:47:21 +0000 (16:47 +0000)]
Merge "sf: Fix incorrect state reporting in dumpsys"

9 years agosf: Fix incorrect state reporting in dumpsys
Manoj Kumar AVM [Thu, 11 Jun 2015 21:18:14 +0000 (14:18 -0700)]
sf: Fix incorrect state reporting in dumpsys

Dumpsys utility accesses layer compositionType variable
with out proper protection. These variables are modified
during hwc_prepare call. Existing HAL lock protection is not
sufficient to address this issue. Failure to do this will
result in incorrect state reporting in dumpsys.

A new displayLock mutex in HWComposer will be used in both
dumpsys and draw calls to ensure correct state is accessed.

Change-Id: I8a57de59525adc0e089b3bed95c067c01e42b666

9 years agoMerge "sf: Add a NULL check in getDisplayConfigs"
Dan Stoza [Thu, 11 Jun 2015 19:31:43 +0000 (19:31 +0000)]
Merge "sf: Add a NULL check in getDisplayConfigs"

9 years agosf: Add a NULL check in getDisplayConfigs
Tatenda Chipeperekwa [Wed, 29 Oct 2014 23:47:19 +0000 (16:47 -0700)]
sf: Add a NULL check in getDisplayConfigs

Validate the display binder by adding a NULL check in getDisplayConfigs.
This will prevent a false match if the caller queries the display
configs for an inactive display (whose binder is NULL by default).

Without this change we might end up attempting to index the display
config array, which is unpopulated for inactive displays, and this will
result in a crash. (See getDisplayInfo in SurfaceComposerClient.cpp for
an example of this scenario)

Change-Id: Ib32a7dc8378d3438df0dba1ecd608bbcfc837717

9 years agoMerge "GLConsumer: Fix crop math"
Dan Stoza [Thu, 11 Jun 2015 17:34:15 +0000 (17:34 +0000)]
Merge "GLConsumer: Fix crop math"

9 years agoGLConsumer: Fix crop math
Dan Stoza [Tue, 9 Jun 2015 22:05:23 +0000 (15:05 -0700)]
GLConsumer: Fix crop math

When we have excess pixels that need to be removed from (for example)
the left and right sides, we currently do something like:

  left += excess / 2;
  right -= excess / 2;

If excess is odd, however, this removes 1 too few pixels since the odd
pixel gets rounded down twice. This changes the math to effectively:

  left += excess / 2;
  right -= (excess - excess / 2);

Which removes the correct total number of pixels.

Bug: 19611086
Change-Id: I8d1ad9fe7ba67c149794c148663d12acbccccef0
(cherry picked from commit ec4cb387502d5bd09e49b55605cf679fe3a0207a)

9 years agoMerge "SF: Swap w/h when capturing rotated screenshots"
Dan Stoza [Wed, 10 Jun 2015 18:10:07 +0000 (18:10 +0000)]
Merge "SF: Swap w/h when capturing rotated screenshots"

9 years agoSF: Swap w/h when capturing rotated screenshots
Dan Stoza [Tue, 9 Jun 2015 23:44:40 +0000 (16:44 -0700)]
SF: Swap w/h when capturing rotated screenshots

Swaps width and height when capturing a screenshot that is rotated by
90 or 270 degrees.

Bug: 8433742
Change-Id: Ibf0b604f541e3cc271e56fe0ad04dc366beb5d79
(cherry picked from commit 3502416204d9dbd905012ee586d8bd145323809f)

9 years agoMerge "SF: Don't crop surface damage against viewport"
Dan Stoza [Tue, 9 Jun 2015 20:28:59 +0000 (20:28 +0000)]
Merge "SF: Don't crop surface damage against viewport"

9 years agoSF: Don't crop surface damage against viewport
Dan Stoza [Fri, 5 Jun 2015 02:40:03 +0000 (19:40 -0700)]
SF: Don't crop surface damage against viewport

Apply the display transform to surface damage, but don't intersect it
with the viewport.

Bug: 21486007
Change-Id: I94e697cea52096a960385d5f3b89609fdcf30a02
(cherry picked from commit 17833a1b0d70cd5cea342cadea9fdbbf16748bc6)

9 years agoMerge "libgui/SurfaceFlinger: Add getConsumerName"
Dan Stoza [Tue, 9 Jun 2015 18:34:10 +0000 (18:34 +0000)]
Merge "libgui/SurfaceFlinger: Add getConsumerName"

9 years agolibgui/SurfaceFlinger: Add getConsumerName
Dan Stoza [Mon, 8 Jun 2015 16:32:50 +0000 (09:32 -0700)]
libgui/SurfaceFlinger: Add getConsumerName

Adds a getConsumerName method to IGraphicBufferProducer and Surface.
Currently, the name is cached inside of IGBP and is update on connect
and dequeueBuffer, which should be good enough for most uses.

Bug: 6667401
Change-Id: I22c7881d778e495cf8276de7bbcd769e52429915
(cherry picked from commit c6f30bdee1f634eb90d68cb76efe935b6535a1e8)

9 years agoMerge "libgui: Add generation numbers to BufferQueue"
Dan Stoza [Tue, 9 Jun 2015 18:23:48 +0000 (18:23 +0000)]
Merge "libgui: Add generation numbers to BufferQueue"

9 years agolibgui: Add generation numbers to BufferQueue
Dan Stoza [Tue, 2 Jun 2015 22:45:22 +0000 (15:45 -0700)]
libgui: Add generation numbers to BufferQueue

This change allows producers to set a generation number on a
BufferQueue. This number will be embedded in any new GraphicBuffers
created in that BufferQueue, and attempts to attach buffers which have
a different generation number will fail.

It also plumbs the setGenerationNumber method through Surface, with the
additional effect that any buffers attached to the Surface after
setting a new generation number will automatically be updated with the
new number (as opposed to failing, as would happen on through IGBP).

Bug: 20923096
Change-Id: I32bf726b035f99c3e5834beaf76afb9f01adcbc2
(cherry picked from commit 812ed0644f8f8f71ca403f4e5793f0dbc1fcf9b2)

9 years agoMerge "Call selinux_status_open() prior to use of selinux_status_updated()."
Nick Kralevich [Wed, 3 Jun 2015 13:33:36 +0000 (13:33 +0000)]
Merge "Call selinux_status_open() prior to use of selinux_status_updated()."

9 years agoCall selinux_status_open() prior to use of selinux_status_updated().
Stephen Smalley [Wed, 3 Jun 2015 13:25:37 +0000 (09:25 -0400)]
Call selinux_status_open() prior to use of selinux_status_updated().

The selinux_status_*() interfaces require calling selinux_status_open()
first.  Since this was not being called by servicemanager, the
selinux_status_updated() call was always failing and servicemanager
was not reloading service_contexts upon a policy reload.

Change-Id: I6ac62e114bbca99c5f0999feb918fcde15009274
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
9 years agoMerge "libgui: Propagate error by clearing sp<GB>"
Dan Stoza [Mon, 1 Jun 2015 21:59:20 +0000 (21:59 +0000)]
Merge "libgui: Propagate error by clearing sp<GB>"