OSDN Git Service

android-x86/frameworks-native.git
7 years agoMerge tag 'android-6.0.1_r79' into marshmallow-x86 marshmallow-x86 android-x86-6.0-r3
Chih-Wei Huang [Thu, 23 Mar 2017 15:10:01 +0000 (23:10 +0800)]
Merge tag 'android-6.0.1_r79' into marshmallow-x86

Android 6.0.1 release 79

7 years agoFix SF security vulnerability: 32706020
Fabien Sanglard [Tue, 8 Nov 2016 23:35:02 +0000 (15:35 -0800)]
Fix SF security vulnerability: 32706020

Because of lack of mutex lock when get mConsumerName, if one thread
getConsumerName, another thread setConsumerName frequently, an UAF will
be triggered.

Change-Id: Id1bbf0d15de6d16def2f54ecade385058cda3b65
Test: Marling with poc provided in bug report.
Bug: 32706020
(cherry picked from commit d073eb7a3f28fd74bfa24c8b7599465cb7de5436)

7 years agoCorrect overflow check in Parcel resize code
Christopher Tate [Thu, 3 Nov 2016 20:32:41 +0000 (13:32 -0700)]
Correct overflow check in Parcel resize code

Bug 31929765

Change-Id: Ie27b9945f1de056624668869bdf9a5578abff467
(cherry picked from commit 862a0188eeec4453eb318c46adf19ea632059bdd)

7 years agoMerge tag 'android-6.0.1_r74' into marshmallow-x86 android-x86-6.0-r2
Chih-Wei Huang [Tue, 10 Jan 2017 14:07:09 +0000 (22:07 +0800)]
Merge tag 'android-6.0.1_r74' into marshmallow-x86

Android 6.0.1 release 74

7 years agoFix SF security vulnerability: 32660278
Fabien Sanglard [Tue, 8 Nov 2016 23:31:32 +0000 (15:31 -0800)]
Fix SF security vulnerability: 32660278

Because of lack of mutex lock when get mSidebandStream, if one thread
getSidebandStream, another thread setSidebandStream frequently, an UAF
will be triggered.

Bug: 32660278
Test: Marlin device with poc
Change-Id: Idbcf0976ce2db682d0f13455105c45a5c7481a45
(cherry picked from commit 2d8a2432e04234d9edbb3b099f9bbbaa36ad4843)

7 years agoMerge tag 'android-6.0.1_r66' into marshmallow-x86 android-x86-6.0-r1
Chih-Wei Huang [Wed, 7 Sep 2016 05:51:08 +0000 (13:51 +0800)]
Merge tag 'android-6.0.1_r66' into marshmallow-x86

Android 6.0.1 release 66

7 years agoWhen using trackpad, mouse pointer shows instead of circle
Amirhossein Simjour [Fri, 9 Oct 2015 14:39:48 +0000 (10:39 -0400)]
When using trackpad, mouse pointer shows instead of circle

The mouse pointer showing instead of circle for all gestures except FREEDOM.
FREEDOM gesture still is using spots to be able to show all the fingers.

Bug: 24139978
Change-Id: I91e916de02e690f6727b097345a919e536ffdc92

7 years agoServiceManager: Allow system services running as secondary users to add services
Arve Hjønnevåg [Thu, 18 Aug 2016 22:42:35 +0000 (15:42 -0700)]
ServiceManager: Allow system services running as secondary users to add services

This should be reverted when all system services have been cleaned up to not
do this. A process looking up a service while running in the background will
see the service registered by the active user (assuming the service is
registered on every user switch), not the service registered by the user that
the process itself belongs to.

BUG: 30795333
Change-Id: I1b74d58be38ed358f43c163692f9e704f8f31dbe
(cherry picked from commit e6bbe69ba739c8a08837134437aaccfea5f1d943)

7 years agoDO NOT MERGE ServiceManager: Restore basic uid check
Arve Hjønnevåg [Mon, 1 Aug 2016 23:05:17 +0000 (16:05 -0700)]
DO NOT MERGE ServiceManager: Restore basic uid check

Prevent apps from registering services without relying on selinux checks.

Bug: 29431260

Change-Id: I38c6e8bc7f7cba1cbd3568e8fed1ae7ac2054a9b
(cherry picked from commit f03ba2c0d878071603d73b7f8e9a4a468364ac27)

7 years agoMerge tag 'android-6.0.1_r61' into marshmallow-x86
Chih-Wei Huang [Wed, 3 Aug 2016 07:27:01 +0000 (15:27 +0800)]
Merge tag 'android-6.0.1_r61' into marshmallow-x86

Android 6.0.1 Release 61 (MOB30Z)

7 years agoRegion: Detect malicious overflow in unflatten
Pablo Ceballos [Wed, 13 Jul 2016 21:11:57 +0000 (14:11 -0700)]
Region: Detect malicious overflow in unflatten

Bug 29983260

Change-Id: Ib6e1cb8ae279010c5e9960aaa03513f55b7d873b

7 years agoMerge tag 'android-6.0.1_r52' into marshmallow-x86
Chih-Wei Huang [Fri, 8 Jul 2016 11:05:26 +0000 (19:05 +0800)]
Merge tag 'android-6.0.1_r52' into marshmallow-x86

Android 6.0.1 Release 52 (MOB30R)

7 years agoAdd FrameStats default constructor
Pablo Ceballos [Thu, 26 May 2016 22:35:55 +0000 (15:35 -0700)]
Add FrameStats default constructor

Bug 28592402

Change-Id: I857e46c9ab3ffae0d96923d665d13a4128a6cafa

7 years agoMerge tag 'android-6.0.1_r46' into marshmallow-x86
Chih-Wei Huang [Tue, 7 Jun 2016 00:21:48 +0000 (08:21 +0800)]
Merge tag 'android-6.0.1_r46' into marshmallow-x86

Android 6.0.1 release 46

7 years agoCorrectly handle dup() failure in Parcel::readNativeHandle
Marco Nelissen [Tue, 26 Apr 2016 15:44:09 +0000 (08:44 -0700)]
Correctly handle dup() failure in Parcel::readNativeHandle

bail out if dup() fails, instead of creating an invalid native_handle_t

Bug: 28395952

Change-Id: Ia1a6198c0f45165b9c6a55a803e5f64d8afa0572

7 years agoSF: support higher resolutions
Chih-Wei Huang [Wed, 20 Jan 2016 18:25:52 +0000 (02:25 +0800)]
SF: support higher resolutions

Add support for Surface Pro 4.

7 years agolibEGL: select pixel format by EGL_NATIVE_VISUAL_ID
Chih-Wei Huang [Mon, 23 Nov 2015 17:08:11 +0000 (01:08 +0800)]
libEGL: select pixel format by EGL_NATIVE_VISUAL_ID

We need this workaround until Mesa supports HAL_PIXEL_FORMAT_RGBA_8888.

7 years agoMerge branch 'android-ia' into marshmallow-x86
Chih-Wei Huang [Thu, 5 May 2016 17:57:27 +0000 (01:57 +0800)]
Merge branch 'android-ia' into marshmallow-x86

7 years agoInputReader: add 5-point calibration
Chih-Wei Huang [Sat, 1 Nov 2014 17:21:12 +0000 (01:21 +0800)]
InputReader: add 5-point calibration

Updated for Android 5.0.

7 years agoauto determine the density if not provided in surfaceflinger
Chih-Wei Huang [Sun, 26 Oct 2014 07:39:53 +0000 (15:39 +0800)]
auto determine the density if not provided in surfaceflinger

We hope to support tablet UI for different resolutions.
So adjust the density according to the resolution.

7 years agoenable console management
Chih-Wei Huang [Sun, 26 Oct 2014 07:38:15 +0000 (15:38 +0800)]
enable console management

The console management was removed since ICS. But it's useful for debugging.
Re-implement it based on the original class ConsoleManagerThread of class
DisplayHardwareBase.

7 years agoSurfaceFlinger: Add NULL check for buffer handling
Praveena Pachipulusu [Thu, 21 Nov 2013 13:27:31 +0000 (18:57 +0530)]
SurfaceFlinger: Add NULL check for buffer handling

Add buffer handling NULL check in dequeueBuffer and
verify whether the output data from binder is not NULL
in queueBuffer and connect api's to avoid SF crash

CRs-Fixed: 573088
CRs-Fixed: 572315

Change-Id: I41cebbc0cbcbbb0fd5ecb38db7ec7b0c91cdffe9

7 years agosurfaceflinger: Set max acquired buffer count
Naseer Ahmed [Tue, 19 Nov 2013 19:11:26 +0000 (14:11 -0500)]
surfaceflinger: Set max acquired buffer count

If triple framebuffers are enabled, the number of acquired
buffers isn't increased by default. Set the count to one less
than the max buffers to make sure all three buffers come into
play.

Change-Id: I65054ed4004607f5be68c893f6f621e821cfbf1c

7 years agoSurface: Initialize variable and add a defensive check
Rama Vaddula [Thu, 12 Sep 2013 21:09:32 +0000 (14:09 -0700)]
Surface: Initialize variable and add a defensive check

Initialize buf variable and make sure to check for return
value of dequeueBuffer() before sending to the client.

Change-Id: I0569f2d45825fab0e5d0f38fc91a07990f57c7ab
(cherry picked from commit a6bd7106a7305208f187fbf0a48f14139e33c9d6)
(cherry picked from commit e5d7662d68c5be2b282edd58d4feb68a4d476182)
(cherry picked from commit 885c146144480d4371a0a97df89b8e77f53d3d94)

7 years agoCheck fence is not NULL before dereferencing it
Lynus Vaz [Tue, 23 Jul 2013 12:49:02 +0000 (18:19 +0530)]
Check fence is not NULL before dereferencing it

If the fence obtained in dequeueBuffer is NULL, don't dereference it.
This will avoid a crash in surfaceflinger.

CRs-fixed: 516300
Change-Id: I3054dc37087103f3addae7884bb03460484a1eec
(cherry picked from commit ddf4adb487dc76ccb75fe2432772d6fc575ed77c)
(cherry picked from commit c6ae5271f9ced9a747e1481c2ef875ba03674172)
(cherry picked from commit cdad709878601eb694acbce7d3ae9f7a74bf14f3)

7 years agodisables hardware acceleration if debug.egl.hw=0
Chih-Wei Huang [Sun, 6 Jan 2013 08:56:00 +0000 (16:56 +0800)]
disables hardware acceleration if debug.egl.hw=0

7 years agoAdded option to disable touchscreen pressure sensitivity from idc files
Edward Peek [Tue, 3 Apr 2012 18:17:00 +0000 (06:17 +1200)]
Added option to disable touchscreen pressure sensitivity from idc files

7 years agoSupport old single-touch touchscreens with BTN_LEFT
DanielK [Tue, 20 Mar 2012 06:28:43 +0000 (14:28 +0800)]
Support old single-touch touchscreens with BTN_LEFT

7 years agoEnable 64-bit support in libs/gui/Sensor.cpp
Byron Gardner [Mon, 3 Nov 2014 23:54:28 +0000 (15:54 -0800)]
Enable 64-bit support in libs/gui/Sensor.cpp

Change-Id: Iaaa112bd821a6a0e3234461df8f7b6acc47b254e
Orig-Change-Id: I04c22e6f2c6f4271ca451b775c8d7f86e4c97c38
Tracked-On: https://jira01.devtools.intel.com/browse/IMINAN-9998
Category: aosp improvement
Domain: SENSORS.VIRT-Common
Origin: internal
Upstream-Candidate: yes
Signed-off-by: Byron Gardner <byron.gardner@intel.com>
Reviewed-on: https://android.intel.com:443/296325

7 years agoSurfaceFlinger: disable VSync thread if no clients requiring.
Wang, Yue A [Tue, 21 Jan 2014 09:42:13 +0000 (17:42 +0800)]
SurfaceFlinger: disable VSync thread if no clients requiring.

In EventThread, 2 VSYNCs are needed to do composition and update
the client status. So, a 30FPS video may leads to 60FPS VSYNC,
which means the DispSync thread would be waked 60FPS. This is a
unexpected behavior which takes more power consumption. Now we
update the SF status soon after the first VSYNC, which means no
extra VSYNC needed, and the DispSync could be awaked as expected,
and consequently power get saved.

Change-Id: If486eb9b87f109a71f71b510768f15dd733f1233
Orig-Change-Id: I1d3b166021e15a81b2ad770b039761fc2c15fddf
Tracked-On: https://jira01.devtools.intel.com/browse/IMINAN-12211
Category: aosp improvement
Domain: Graphics-SF
Origin: internal
Upstream-Candidate: yes
Signed-off-by: Wang, Yue A <yue.a.wang@intel.com>
Reviewed-on: https://android.intel.com:443/238344

7 years agouse HAL_PIXEL_FORMAT_BGRA_8888 with hwc 1.1
Tapani Pälli [Thu, 16 May 2013 12:03:48 +0000 (15:03 +0300)]
use HAL_PIXEL_FORMAT_BGRA_8888 with hwc 1.1

this is the format supported by our framebuffer

Change-Id: Ic2906f237e1141a970115a44078922c037224040
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Acked-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
7 years agoSet PS2 Keyboard controller as not a ketboard type
juntingwang [Fri, 1 Mar 2013 08:02:56 +0000 (16:02 +0800)]
Set PS2 Keyboard controller as not a ketboard type

The Eventhub detects the platforms built-in PS/2 keyboard controller
as a physical keyboard. So the system will not display the software
keyboard by default. Modify it device type in Keyboard-less tablets,
so that ActivityManager will not ignore the PS/2 controller.

Issue: AXIA-1875

Change-Id: Ia5b7592e82aaf1970066bab5e9ca5f46ac83ab1c
Signed-off-by: juntingwang <Junting.Wang@windriver.com>
7 years agobinder: Fix service initialization race vs. service manager
Andy Ross [Tue, 19 Feb 2013 22:39:34 +0000 (14:39 -0800)]
binder: Fix service initialization race vs. service manager

The framework relies on the global IServiceManager running before a
BinderService object is instantiated.  But there was no detection of
the error condition when it was not (specifically: mediaserver can be
initialized before system_server), and in fact the default error
behavior (kill the proxy object) ensured that the process would never
be able to add services again.  Retry the addService() code, and allow
transient binder failures for the special case of the service manager
proxy.

Issue: AXIA-1706
Change-Id: Icac10bb0f47a2fe33ac9605a13633b83afa3ebff
Signed-off-by: Andy Ross <andy.ross@windriver.com>
7 years agoPrevent EventHub from adding input device twice
Daniel Leung [Thu, 13 Sep 2012 20:43:41 +0000 (13:43 -0700)]
Prevent EventHub from adding input device twice

When Android first starts up, it scans /dev/input for input devices.
In some rare instances, the EventHub gets another notification that
some device nodes are created. It then proceeds to add the same
input device again. This causes the system to get two events per
touch or key stroke.

This adds a check to prevent adding the same device if the operation
is triggerd by inotify.

Issue: AXIA-858
Change-Id: I68b02594f1c7f14067611735db0b3763378ec7ea
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
7 years agoegl_extensions: remove force of extension not supported
Daniel Charles [Fri, 13 Jul 2012 23:11:49 +0000 (16:11 -0700)]
egl_extensions: remove force of extension not supported

This problem was introduced by commit 48d438d05f14c.

When the extension GL_EXT_debug_marker is not supported by h/w
the dummy version is used already. Whenever the h/w is ready
to support the extension it will show up and be used by the
OpenGLRenderer.

Change-Id: Iddb58859b187d872a9a3a2986d30f24b8f83e76b
Signed-off-by: Daniel Charles <daniel.charles@intel.com>
7 years agoPre-test native window pointer for validity
Paul Drews [Wed, 18 Jan 2012 19:01:49 +0000 (11:01 -0800)]
Pre-test native window pointer for validity

This fixes a segfault in the oglconform tests when running
the test:

  adb shell /data/app/oglconform -v 4 -minFmt -es -test egl-basic negative.drawables.winSurfBadWin

According the the egl specification this should return
EGL_BAD_NATIVE_WINDOW.  The segfault was resulting from the
fact that the window handle is a (cast to opaque) pointer,
and there are not straightforward ways of pre-testing a
pointer for validity.  The fix implemented here is:

  () Take advantage of the msync() system-call logic to test
     pre-test basic pointer validity
  () Once confirmed that we can reference through the
     pointer, look for the "magic" value dropped in by the
     implementation to mark this type at runtime.

Change-Id: Id7d21c822c8a416e45caba25c63d7076d1e547a5
Original-Change-Id: I3c8df8ef5ece5c0fa71c47417766b5453c355f8b
Signed-off-by: Russell Webb <russell.webb@intel.com>
Signed-off-by: Paul Drews <paul.drews@intel.com>
7 years agoegl: Add NULL check for eglGetconfigs num_config parameter
Pauli Nieminen [Wed, 4 Jan 2012 14:25:10 +0000 (16:25 +0200)]
egl: Add NULL check for eglGetconfigs num_config parameter

EGL 1.4 specification says in 3.4.1:
"An EGL_BAD_PARAMETER error is generated if num config is NULL."

We have to check for the condition and return the required error to
application.

Change-Id: Ib42709f0420161ce661536394d4c0779bc62be57
Original-Change-Id: I4fe670c4362f4ae494f91d69ae105e29ccf3c769
Signed-off-by: Pauli Nieminen <pauli.nieminen@linux.intel.com>
7 years agoFix build problem when including hal and egl to same c file
Pauli Nieminen [Tue, 15 Nov 2011 18:33:05 +0000 (20:33 +0200)]
Fix build problem when including hal and egl to same c file

If including hal and egl headers to same c file compilation files
because ANativeWindow type is defined in two headers. In HC egl didn't
include system/core/include/system/window.h which hid the type conflict.

Change-Id: Icaf7b29f913f3d7fa8f6d70bb196585d22e7d05c
Original-Change-Id: Icd37329d80fb4e8b9baf9015c9b00e43ebc4f76b
Signed-off-by: Pauli Nieminen <pauli.nieminen@linux.intel.com>
8 years agoAdd new MotionEvent flag for partially obscured windows.
Michael Wright [Tue, 22 Mar 2016 23:52:13 +0000 (16:52 -0700)]
Add new MotionEvent flag for partially obscured windows.

Due to more complex window layouts resulting in lots of overlapping
windows, the policy around FLAG_WINDOW_IS_OBSCURED has changed to
only be set when the point at which the window was touched is
obscured. Unfortunately, this doesn't prevent tapjacking attacks that
overlay the dialog's text, making a potentially dangerous operation
seem innocuous. To avoid this on particularly sensitive dialogs,
introduce a new flag that really does tell you when your window is
being even partially overlapped.

We aren't exposing this as API since we plan on making the original
flag more robust. This is really a workaround for system dialogs
since we generally know their layout and screen position, and that
they're unlikely to be overlapped by other applications.

Bug: 26677796
Change-Id: I9e336afe90f262ba22015876769a9c510048fd47

8 years agoFix issue #27252896: Security Vulnerability -- weak binder
Dianne Hackborn [Mon, 21 Mar 2016 17:36:54 +0000 (10:36 -0700)]
Fix issue #27252896: Security Vulnerability -- weak binder

Sending transaction to freed BBinder through weak handle
can cause use of a (mostly) freed object.  We need to try to
safely promote to a strong reference first.

Change-Id: Ic9c6940fa824980472e94ed2dfeca52a6b0fd342
(cherry picked from commit c11146106f94e07016e8e26e4f8628f9a0c73199)

8 years agoBQ: fix some uninitialized variables
Pablo Ceballos [Wed, 16 Mar 2016 01:10:49 +0000 (18:10 -0700)]
BQ: fix some uninitialized variables

Bug 27555981
Bug 27556038

Change-Id: I436b6fec589677d7e36c0e980f6e59808415dc0e

8 years agoAdd SN logging
Pablo Ceballos [Sat, 20 Feb 2016 19:26:13 +0000 (11:26 -0800)]
Add SN logging

Bug 27046057

Change-Id: Iede7c92e59e60795df1ec7768ebafd6b090f1c27

8 years agoSanity check IMemory access versus underlying mmap
Christopher Tate [Sat, 6 Feb 2016 03:02:56 +0000 (19:02 -0800)]
Sanity check IMemory access versus underlying mmap

Bug 26877992

Change-Id: Ibbf4b1061e4675e4e96bc944a865b53eaf6984fe

8 years agoBQ: Add permission check to BufferQueueConsumer::dump
Pablo Ceballos [Fri, 12 Feb 2016 02:01:49 +0000 (18:01 -0800)]
BQ: Add permission check to BufferQueueConsumer::dump

Bug 27046057

Change-Id: Id7bd8cf95045b497943ea39dde49e877aa6f5c4e

8 years agoIGraphicBufferProducer: fix QUEUE_BUFFER info leak
Robert Shih [Mon, 11 Jan 2016 23:02:12 +0000 (15:02 -0800)]
IGraphicBufferProducer: fix QUEUE_BUFFER info leak

Bug: 26338109
Change-Id: I8a979469bfe1e317ebdefa43685e19f9302baea8

8 years agoIGraphicBufferConsumer: fix ATTACH_BUFFER info leak
Robert Shih [Mon, 11 Jan 2016 19:42:48 +0000 (11:42 -0800)]
IGraphicBufferConsumer: fix ATTACH_BUFFER info leak

Bug: 26338113
Change-Id: I019c4df2c6adbc944122df96968ddd11a02ebe33

8 years agoMerge "Avoiding flush on-change sensors at subscription" into mnc-dr-dev
Peng Xu [Tue, 27 Oct 2015 22:23:21 +0000 (22:23 +0000)]
Merge "Avoiding flush on-change sensors at subscription" into mnc-dr-dev

8 years agoAvoiding flush on-change sensors at subscription
Peng Xu [Mon, 26 Oct 2015 22:14:43 +0000 (15:14 -0700)]
Avoiding flush on-change sensors at subscription

Initial sensor flush at subscription is a mechanism to avoid sensors
to get stale samples before subscription happens. However, there is a
slight chance that a most recent sample will be lost during the flush
process. This is OK for continuous sensors but problematic in
on-change sensor as on-change event does not come continuously and
a lost event can cause inconsistent state in client. Flush at
subscription of on-change sensor is disabled in this CL to avoid new
important on-change event to be discarded during the initial flush
process.

Bugs: b/24647069
      b/25241873
      b/24804819

Change-Id: Ibda099c6b9f5fb6e200f13cf13a850b0026e9e7c

8 years agoDO NOT MERGE: fix build try #2 am: 778b6f4902 am: 034bc1799c -s ours am: dbc9a47831...
Nick Kralevich [Fri, 23 Oct 2015 21:22:14 +0000 (21:22 +0000)]
DO NOT MERGE: fix build try #2 am: 778b6f4902 am: 034bc1799c  -s ours am: dbc9a47831  -s ours am: a2685ebb1e am: 1d94a1d036  -s ours
am: bce101e79b

* commit 'bce101e79b5ee9715a8329db8fd760f7ba829de1':
  DO NOT MERGE: fix build try #2

8 years agoMerge changes from topic 'parcel-v2' into mnc-dr-dev
Adrian Roos [Fri, 23 Oct 2015 17:21:23 +0000 (17:21 +0000)]
Merge changes from topic 'parcel-v2' into mnc-dr-dev

* changes:
  Maintain Parcel ABI
  Revert "Revert "Track ashmem memory usage in Parcel""

8 years agoDO NOT MERGE: fix build try #2 am: 778b6f4902 am: 034bc1799c -s ours am: dbc9a47831...
Nick Kralevich [Fri, 23 Oct 2015 04:36:16 +0000 (04:36 +0000)]
DO NOT MERGE: fix build try #2 am: 778b6f4902 am: 034bc1799c  -s ours am: dbc9a47831  -s ours am: a2685ebb1e
am: 1d94a1d036  -s ours

* commit '1d94a1d036cb4bc8d9b178f56fa3bbddc81b7f10':
  DO NOT MERGE: fix build try #2

8 years agoDO NOT MERGE: fix build try #2 am: 778b6f4902 am: 034bc1799c -s ours am: dbc9a47831...
Nick Kralevich [Fri, 23 Oct 2015 04:32:47 +0000 (04:32 +0000)]
DO NOT MERGE: fix build try #2 am: 778b6f4902 am: 034bc1799c  -s ours am: dbc9a47831  -s ours
am: a2685ebb1e

* commit 'a2685ebb1ec5ed523fb4800d2593f2ae0c10ed22':
  DO NOT MERGE: fix build try #2

8 years agoDO NOT MERGE: fix build try #2 am: 778b6f4902 am: 034bc1799c -s ours
Nick Kralevich [Fri, 23 Oct 2015 04:26:03 +0000 (04:26 +0000)]
DO NOT MERGE: fix build try #2 am: 778b6f4902 am: 034bc1799c  -s ours
am: dbc9a47831  -s ours

* commit 'dbc9a478311e8728c8148a80abb103fca697891d':
  DO NOT MERGE: fix build try #2

8 years agoresolve merge conflicts of 834ac204ce to klp-modular-dev. am: 7f1ea80d65 am: fa632f6a...
Nick Kralevich [Fri, 23 Oct 2015 04:19:58 +0000 (04:19 +0000)]
resolve merge conflicts of 834ac204ce to klp-modular-dev. am: 7f1ea80d65 am: fa632f6ad7 am: 9ec978732f am: 1b28b05d2e
am: 0370a03b6e

* commit '0370a03b6e74e40d5110b83fed2243bf072aee73':
  DO NOT MERGE: fix build breakage

8 years agoDO NOT MERGE: fix build try #2 am: 778b6f4902
Nick Kralevich [Fri, 23 Oct 2015 04:19:51 +0000 (04:19 +0000)]
DO NOT MERGE: fix build try #2 am: 778b6f4902
am: 034bc1799c  -s ours

* commit '034bc1799cbbc4184aa507eba181573c0a3b9b35':
  DO NOT MERGE: fix build try #2

8 years agoadd number constraint for samples per MotionEvent am: 5d17838ade am: 72c8ca4a01 am...
Flanker [Fri, 23 Oct 2015 04:19:51 +0000 (04:19 +0000)]
add number constraint for samples per MotionEvent am: 5d17838ade am: 72c8ca4a01 am: 9964d83869 am: 90dc6dc825 am: 9830f11dc6
am: a82ace99f7

* commit 'a82ace99f76ed815e16ab64eae2e9e55871a8b8f':
  add number constraint for samples per MotionEvent

8 years agoresolve merge conflicts of 834ac204ce to klp-modular-dev. am: 7f1ea80d65 am: fa632f6a...
Nick Kralevich [Fri, 23 Oct 2015 04:15:24 +0000 (04:15 +0000)]
resolve merge conflicts of 834ac204ce to klp-modular-dev. am: 7f1ea80d65 am: fa632f6ad7 am: 9ec978732f
am: 1b28b05d2e

* commit '1b28b05d2edf11f49717b53cd49a9161892f0388':
  DO NOT MERGE: fix build breakage

8 years agoDO NOT MERGE: fix build try #2
Nick Kralevich [Fri, 23 Oct 2015 04:15:21 +0000 (04:15 +0000)]
DO NOT MERGE: fix build try #2
am: 778b6f4902

* commit '778b6f4902ad824d5fc62071caaa837bb47deee5':
  DO NOT MERGE: fix build try #2

8 years agoresolve merge conflicts of 834ac204ce to klp-modular-dev. am: 7f1ea80d65 am: fa632f6ad7
Nick Kralevich [Fri, 23 Oct 2015 02:02:42 +0000 (02:02 +0000)]
resolve merge conflicts of 834ac204ce to klp-modular-dev. am: 7f1ea80d65 am: fa632f6ad7
am: 9ec978732f

* commit '9ec978732f8dd82e7adef3e37097eaca3fbd65f0':
  DO NOT MERGE: fix build breakage

8 years agoresolve merge conflicts of 834ac204ce to klp-modular-dev. am: 7f1ea80d65
Nick Kralevich [Fri, 23 Oct 2015 01:52:34 +0000 (01:52 +0000)]
resolve merge conflicts of 834ac204ce to klp-modular-dev. am: 7f1ea80d65
am: fa632f6ad7

* commit 'fa632f6ad7be6b1f488dd3d1b825a82456db5097':
  DO NOT MERGE: fix build breakage

8 years agoresolve merge conflicts of 834ac204ce to klp-modular-dev.
Nick Kralevich [Fri, 23 Oct 2015 01:44:26 +0000 (01:44 +0000)]
resolve merge conflicts of 834ac204ce to klp-modular-dev.
am: 7f1ea80d65

* commit '7f1ea80d65996ab687ff56a884da915535cdc176':
  DO NOT MERGE: fix build breakage

8 years agoMaintain Parcel ABI
Adrian Roos [Thu, 22 Oct 2015 23:46:12 +0000 (16:46 -0700)]
Maintain Parcel ABI

Makes sure we don't change the memory layout of the Parcel class
to maintain binary compatibility with prebuilts linking against
libbinder.

Bug: 25004154
Change-Id: I656687497f08bb85cefda796aafa2341e601e30a

8 years agoRevert "Revert "Track ashmem memory usage in Parcel""
Adrian Roos [Thu, 22 Oct 2015 23:12:53 +0000 (16:12 -0700)]
Revert "Revert "Track ashmem memory usage in Parcel""

This reverts commit 6880307e8e35a6c484942443fb4ddd6173126152.

Bug: 25004154
Change-Id: I9b432d1ebc39f3bbcd7afdefc403f0fb6ced8158

8 years agoresolve merge conflicts of 834ac204ce to klp-modular-dev.
Nick Kralevich [Fri, 23 Oct 2015 00:26:19 +0000 (17:26 -0700)]
resolve merge conflicts of 834ac204ce to klp-modular-dev.

Bug: 23905002
Change-Id: Ic7262861af91a8fff27692c0f68761cb3ab12aa3

8 years agoadd number constraint for samples per MotionEvent am: 5d17838ade am: 72c8ca4a01 am...
Flanker [Thu, 22 Oct 2015 22:28:01 +0000 (22:28 +0000)]
add number constraint for samples per MotionEvent am: 5d17838ade am: 72c8ca4a01 am: 9964d83869 am: 90dc6dc825
am: 9830f11dc6

* commit '9830f11dc6b6aa4001c79147966fdb9eaa71c2f2':
  add number constraint for samples per MotionEvent

8 years agoRevert "Track ashmem memory usage in Parcel"
Ian Pedowitz [Thu, 22 Oct 2015 22:08:10 +0000 (22:08 +0000)]
Revert "Track ashmem memory usage in Parcel"

This reverts commit e2f499fb734bc30a1e1c947112caa0727349b6ed.

Bug: 25169267
Bug: 25191602
Bug: 25004154
Change-Id: I24bb0da4e8739ee5a0c251e4adac9904827144e0

8 years agoDO NOT MERGE: fix build try #2
Nick Kralevich [Thu, 22 Oct 2015 21:48:50 +0000 (14:48 -0700)]
DO NOT MERGE: fix build try #2

On klp-dev, UINT16_MAX isn't available unless __STDINT_LIMITS
is defined, which it's not for this code. This isn't relevant
for later branches due to bionic commit
e2a292d278b94fec3d078b1f1b27c1f89942c276

Don't use UINT16_MAX when we can just hardcode 65535.

Bug: 23905002
Change-Id: Ia1fd0f749cb7a4d19866075abc28ed6960424e54

8 years agoDO NOT MERGE: fix build breakage
Nick Kralevich [Thu, 22 Oct 2015 14:09:23 +0000 (07:09 -0700)]
DO NOT MERGE: fix build breakage

fix klp-dev only build breakage.

  frameworks/native/libs/input/Input.cpp: In member function 'android::status_t android::MotionEvent::readFromParcel(android::Parcel*)':
  frameworks/native/libs/input/Input.cpp:494:47: error: 'UINT16_MAX' was not declared in this scope

Bug: 23905002
Change-Id: I4b6b864ca64d39a8873d045a61e0ddaea2ab9109

8 years agoadd number constraint for samples per MotionEvent am: 5d17838ade am: 72c8ca4a01 am...
Flanker [Thu, 22 Oct 2015 02:15:13 +0000 (02:15 +0000)]
add number constraint for samples per MotionEvent am: 5d17838ade am: 72c8ca4a01 am: 9964d83869
am: 90dc6dc825

* commit '90dc6dc825ebd1f0f4c9474fad887cd7eac8e9bd':
  add number constraint for samples per MotionEvent

8 years agoadd number constraint for samples per MotionEvent am: 5d17838ade am: 72c8ca4a01
Flanker [Thu, 22 Oct 2015 02:10:12 +0000 (02:10 +0000)]
add number constraint for samples per MotionEvent am: 5d17838ade am: 72c8ca4a01
am: 9964d83869

* commit '9964d83869565cf4dda432129cfe50f6ede19338':
  add number constraint for samples per MotionEvent

8 years agoadd number constraint for samples per MotionEvent am: 5d17838ade
Flanker [Thu, 22 Oct 2015 02:04:55 +0000 (02:04 +0000)]
add number constraint for samples per MotionEvent am: 5d17838ade
am: 72c8ca4a01

* commit '72c8ca4a0191827fd3265c0820b685a6cf420be1':
  add number constraint for samples per MotionEvent

8 years agoadd number constraint for samples per MotionEvent
Flanker [Thu, 22 Oct 2015 02:02:46 +0000 (02:02 +0000)]
add number constraint for samples per MotionEvent
am: 5d17838ade

* commit '5d17838adef13062717322e79d4db0b9bb6b2395':
  add number constraint for samples per MotionEvent

8 years agoTrack ashmem memory usage in Parcel
Adrian Roos [Wed, 21 Oct 2015 02:11:23 +0000 (19:11 -0700)]
Track ashmem memory usage in Parcel

Bug: 25004154
Change-Id: Id9d5656dd0605f1b50525596b75601309f67ebdc

8 years agoadd number constraint for samples per MotionEvent
Flanker [Mon, 7 Sep 2015 07:28:58 +0000 (15:28 +0800)]
add number constraint for samples per MotionEvent

Bug:23905002

Signed-off-by: Adam Lesinski <adamlesinski@google.com>
(cherry picked from commit 552a8a5d8df32f659b8d11311a244cdc6d3b7733)

Change-Id: I9b7ea859889b7697bee4165a2746602212120543

8 years agoam 18165848: am e2c4f4fb: am c1e6fbb5: Initialize local variables to avoid data leak...
Naveen Leekha [Tue, 20 Oct 2015 17:02:33 +0000 (17:02 +0000)]
am 18165848: am e2c4f4fb: am c1e6fbb5: Initialize local variables to avoid data leak am: 7534e4e63a  -s ours am: 7b4863f606
am: 8121177b5e

* commit '8121177b5e8c406570f0eaf6593c6fd1db232ddf':
  Initialize local variables to avoid data leak

8 years agoam 18165848: am e2c4f4fb: am c1e6fbb5: Initialize local variables to avoid data leak...
Naveen Leekha [Tue, 20 Oct 2015 16:54:09 +0000 (16:54 +0000)]
am 18165848: am e2c4f4fb: am c1e6fbb5: Initialize local variables to avoid data leak am: 7534e4e63a  -s ours
am: 7b4863f606

* commit '7b4863f606bdb48b188b0235447dfaba6c8c3cf0':
  Initialize local variables to avoid data leak

8 years agoam 18165848: am e2c4f4fb: am c1e6fbb5: Initialize local variables to avoid data leak
Naveen Leekha [Tue, 20 Oct 2015 16:42:34 +0000 (16:42 +0000)]
am 18165848: am e2c4f4fb: am c1e6fbb5: Initialize local variables to avoid data leak
am: 7534e4e63a  -s ours

* commit '7534e4e63afedeb826a8d8a4b0cf3f9d40d243ea':
  Initialize local variables to avoid data leak

8 years agoMerge "Set DATA_INJECTION mode flag for sensors." into mnc-dr-dev
Aravind Akella [Wed, 14 Oct 2015 21:03:07 +0000 (21:03 +0000)]
Merge "Set DATA_INJECTION mode flag for sensors." into mnc-dr-dev

8 years agoegl: Remove window disconnect before calling driver eglDestroySurface
Jesse Hall [Wed, 14 Oct 2015 18:10:24 +0000 (11:10 -0700)]
egl: Remove window disconnect before calling driver eglDestroySurface

This was originally added for b/14445579. An in-development app was
attempting to render to a window as an EGLSurface, then tear that
down, change some window properties, and create a new EGLSurface. The
second eglCreateWindowSurface failed because the window was already
connected. This change went in, but it turned out the real problem was
that the app still (unintentionally) had the surface current. After
the app bug was fixed, nobody revisited whether this change was
actually needed.

Turns out it wasn't needed. After an EGLSurface is both destroyed
*AND* not current (basically refcount==0), we were already
disconnecting the window in ~egl_surface_t().

Apart from being unnecessary and redundant, disconnecting the window
here is wrong for two reasons:

(a) The surface may still be in use after eglDestroySurface, if it was
still current. Rendering is undefined in that case, but disconnecting
the window leads to more catastrophic results than necessary.

(b) It's being called before calling the driver's eglDestroySurface.
The driver will almost definitely have a buffer dequeued that it needs
to cancel, and by disconnecting first we turn that into an error that
they don't have a graceful way to deal with.

Bug: 24524053
Change-Id: Ib063134413d25d3526f794aafb5e333e3417ea42

8 years agoMerge "add number constraint for samples per MotionEvent" into mnc-dr-dev
Adam Lesinski [Mon, 12 Oct 2015 22:15:50 +0000 (22:15 +0000)]
Merge "add number constraint for samples per MotionEvent" into mnc-dr-dev

8 years agoadd number constraint for samples per MotionEvent
Flanker [Mon, 7 Sep 2015 07:28:58 +0000 (15:28 +0800)]
add number constraint for samples per MotionEvent

Bug:23905002
Change-Id: Ifd24802977c3dcdd1dbc5120a78aac41beae4603

Signed-off-by: Adam Lesinski <adamlesinski@google.com>
8 years agoMerge "Inputflinger: hook up key event replacement processing" into mnc-dr-dev
Puneet Kumar [Thu, 8 Oct 2015 08:16:58 +0000 (08:16 +0000)]
Merge "Inputflinger: hook up key event replacement processing" into mnc-dr-dev

8 years agoMerge "Allow defining replacement key events in keymap" into mnc-dr-dev
Puneet Kumar [Thu, 8 Oct 2015 08:16:31 +0000 (08:16 +0000)]
Merge "Allow defining replacement key events in keymap" into mnc-dr-dev

8 years agoInputResampling: Don't extrapolate for very low frame rates.
Andrew de los Reyes [Thu, 1 Oct 2015 22:57:25 +0000 (15:57 -0700)]
InputResampling: Don't extrapolate for very low frame rates.

In very low framerate situations, extrapolation is generally going to
either cause no benefit or make a mistake. We can safely turn it off
with no user-visible negative impact.

BUG=https://buganizer.corp.google.com/u/0/issues/24550942
TEST=Scrolled very slowly and saw mispredictions on Angler. With change,
saw the log message that the mispredictions were suppressed.

Change-Id: Ic9747d3ff098d7918047ada2ed1c2d21282c65b0

8 years agoInputflinger: hook up key event replacement processing
Dmitry Torokhov [Thu, 24 Sep 2015 20:13:55 +0000 (13:13 -0700)]
Inputflinger: hook up key event replacement processing

Add handling of "replacement" key events in InputReader and EventHub by
consulting device's character key map (if exists) for presence of
replacement key code for given get code and meta state combination,
before passing it to InputDispatcher.

This enables defining special keys, such as ESC, on keyboards lacking
enough physical keys, via combination of normal keys and modifiers, for
example AltR + 1 => ESC.

Bug: 24504154

Change-Id: I7e36104808bedcf724436c1fbb63d37c35cca8af

8 years agoAllow defining replacement key events in keymap
Dmitry Torokhov [Fri, 18 Sep 2015 01:04:50 +0000 (18:04 -0700)]
Allow defining replacement key events in keymap

Currently keyboard maps allow to assign character sequences to key
events and allow specifying a so-called "fallback" key events that are
re-injected into input stream if target application indicates that it
was not able to handle the original key event. Unfortunately there is no
way to perform substitution before handing the event to applicationis.

This change adds a new keymap keyword "replace" that allows users query
"replacement" actions for key (if any), with the intent that such
replacement happens early in the event handling process.

Bug: 24504154

Change-Id: I3e6a2476c856524171df00ad22ff56f2018c1278

8 years agoam 69412a51: am c4bd7211: resolved conflicts for 7534e4e6 to lmp-mr1-ub-dev
Naveen Leekha [Thu, 24 Sep 2015 23:35:41 +0000 (23:35 +0000)]
am 69412a51: am c4bd7211: resolved conflicts for 7534e4e6 to lmp-mr1-ub-dev

* commit '69412a51f58fa9450f1cb077c8d4b6410128d993':
  resolved conflicts for 7534e4e6 to lmp-mr1-ub-dev

8 years agoam c4bd7211: resolved conflicts for 7534e4e6 to lmp-mr1-ub-dev
Naveen Leekha [Thu, 24 Sep 2015 23:27:31 +0000 (23:27 +0000)]
am c4bd7211: resolved conflicts for 7534e4e6 to lmp-mr1-ub-dev

* commit 'c4bd7211373cf5b745c7d4f849f43f7a2d2b1141':
  resolved conflicts for 7534e4e6 to lmp-mr1-ub-dev

8 years agoresolved conflicts for 7534e4e6 to lmp-mr1-ub-dev
Naveen Leekha [Thu, 24 Sep 2015 22:55:21 +0000 (15:55 -0700)]
resolved conflicts for 7534e4e6 to lmp-mr1-ub-dev

Change-Id: I543df164076b44578b14d41031800bb62b81586d

8 years agoam 571e27e2: am e889592e: am 73887c08: am b414255f: Initialize local variables to...
Naveen Leekha [Thu, 24 Sep 2015 22:26:22 +0000 (22:26 +0000)]
am 571e27e2: am e889592e: am 73887c08: am b414255f: Initialize local variables to avoid data leak

* commit '571e27e20e30560985d7c3a3ba8885693695b0fc':
  Initialize local variables to avoid data leak

8 years agoam e889592e: am 73887c08: am b414255f: Initialize local variables to avoid data leak
Naveen Leekha [Thu, 24 Sep 2015 22:20:59 +0000 (22:20 +0000)]
am e889592e: am 73887c08: am b414255f: Initialize local variables to avoid data leak

* commit 'e889592e33891c9b88ff6ba655426118f8ef12ee':
  Initialize local variables to avoid data leak

8 years agoam 18165848: am e2c4f4fb: am c1e6fbb5: Initialize local variables to avoid data leak
Naveen Leekha [Thu, 24 Sep 2015 22:20:05 +0000 (22:20 +0000)]
am 18165848: am e2c4f4fb: am c1e6fbb5: Initialize local variables to avoid data leak

* commit '18165848e86feab8656bfdac3173bccf45a9a6df':
  Initialize local variables to avoid data leak

8 years agoam 73887c08: am b414255f: Initialize local variables to avoid data leak
Naveen Leekha [Thu, 24 Sep 2015 22:13:06 +0000 (22:13 +0000)]
am 73887c08: am b414255f: Initialize local variables to avoid data leak

* commit '73887c0864c9a928db6f66bd48c5aea4d31d9a8b':
  Initialize local variables to avoid data leak

8 years agoam e2c4f4fb: am c1e6fbb5: Initialize local variables to avoid data leak
Naveen Leekha [Thu, 24 Sep 2015 22:04:48 +0000 (22:04 +0000)]
am e2c4f4fb: am c1e6fbb5: Initialize local variables to avoid data leak

* commit 'e2c4f4fb8b34e36a4f2760f3812c942604cabfb6':
  Initialize local variables to avoid data leak

8 years agoam b414255f: Initialize local variables to avoid data leak
Naveen Leekha [Thu, 24 Sep 2015 22:00:33 +0000 (22:00 +0000)]
am b414255f: Initialize local variables to avoid data leak

* commit 'b414255f53b560a06e642251535b019327ba0d7b':
  Initialize local variables to avoid data leak

8 years agoam c1e6fbb5: Initialize local variables to avoid data leak
Naveen Leekha [Thu, 24 Sep 2015 22:00:13 +0000 (22:00 +0000)]
am c1e6fbb5: Initialize local variables to avoid data leak

* commit 'c1e6fbb52c3f85cc7610d1d07d12be38f70b4ed4':
  Initialize local variables to avoid data leak

8 years agoMerge "DO NOT MERGE Cancel touches as well as pointer gestures." into mnc-dr-dev
Michael Wright [Wed, 23 Sep 2015 13:18:26 +0000 (13:18 +0000)]
Merge "DO NOT MERGE Cancel touches as well as pointer gestures." into mnc-dr-dev

8 years agoMerge "DO NOT MERGE Revert "am f37143d8: Merge "Cancel touches as well as pointer...
Michael Wright [Wed, 23 Sep 2015 13:15:33 +0000 (13:15 +0000)]
Merge "DO NOT MERGE Revert "am f37143d8: Merge "Cancel touches as well as pointer gestures." into mnc-dev"" into mnc-dr-dev

8 years agoInitialize local variables to avoid data leak
Naveen Leekha [Wed, 23 Sep 2015 01:04:44 +0000 (18:04 -0700)]
Initialize local variables to avoid data leak

The uninitialized local variables pick up
whatever the memory content was there on stack.
This data gets sent to the remote process in
case of a failed transaction, which is a security
issue. Fixed.

(Partial manual merge of master change
 12ba0f57d028a9c8f4eb3afddc326b70677d1e0c. Rest
 to automerge from klp-dev)

For b/23696300

Change-Id: I704c9fab327b3545c58e8a9a96ac542eb7469c2a

8 years agoInitialize local variables to avoid data leak
Naveen Leekha [Wed, 23 Sep 2015 00:58:21 +0000 (17:58 -0700)]
Initialize local variables to avoid data leak

The uninitialized local variables pick up
whatever the memory content was there on stack.
This data gets sent to the remote process in
case of a failed transaction, which is a security
issue. Fixed.

(Manual merge of master change
 12ba0f57d028a9c8f4eb3afddc326b70677d1e0c )

For b/23696300

Change-Id: I665212d10da56f0803b5bb772d14c77e632ba2ab