OSDN Git Service
Chih-Wei Huang [Mon, 21 Sep 2020 23:21:57 +0000 (07:21 +0800)]
Merge remote-tracking branch 'x86/nougat-x86' into cm-14.1-x86
Nicolas Peslerbe [Tue, 26 Feb 2019 11:02:10 +0000 (12:02 +0100)]
Changing input flinger to take in account screen rotation (hwrotation) in prop file
Chih-Wei Huang [Wed, 20 May 2020 14:12:39 +0000 (22:12 +0800)]
Merge remote-tracking branch 'cm/cm-14.1' into cm-14.1-x86
Ashwini Oruganti [Fri, 6 Dec 2019 18:00:53 +0000 (10:00 -0800)]
Don't leak input events to dumpsys on user builds
Remove the details of KeyEvent and MotionEvent logs.
Bug:
139945049
Test: Tested on a device, the input functions work as expected and input
event logs are not leaked to dumpsys on user builds.
Merged-In: I98c9c375f18963177bf0c1d8829a217b4ad4acc6
(cherry picked from commit
3b7d779774cb81c5d922f74216392c9fd7004a1b)
[basilgello: Back-ported to 14.1:
- motionActionToString and keyActionToString helpers are not present]
Signed-off-by: Vasyl Gello <vasek.gello@gmail.com>
Change-Id: I98c9c375f18963177bf0c1d8829a217b4ad4acc6
Michael Wachenschwanz [Tue, 15 Oct 2019 18:49:22 +0000 (11:49 -0700)]
Resize object capacity when shrinking Parcel
Bug:
140419401
Test: atest android.os.cts.ParcelTest
(cherry picked from commit
c67d9f33b36cbb95b121d058f51d6653f1ec4334)
(cherry picked from commit
d9d10dbdf2f20af3dd01376d2130c71c052e42f3)
Change-Id: I04edee415e1984ba5fb97c5c1b09892a360cf221
Steven Moreland [Tue, 8 Oct 2019 00:30:23 +0000 (17:30 -0700)]
Sensor: use FlattenableUtils::align
Since it memsets skipped over memory now.
Bug:
141890807
Test: boot, check buffer is zero'd here
[basilgello: Back-ported to 14.1:
- lib/sensor/Sensor.cpp -> lib/gui/Sensor.cpp]
Signed-off-by: Vasyl Gello <vasek.gello@gmail.com>
Change-Id: Ieb3cd90215a3ccc1dc43365ecde251a50db08553
(cherry picked from commit
d58cf5acb863eddbbeb9982439965e259045940e)
(cherry picked from commit
dbd0eecfc7570231d5cbb76678b0358c43ee6d3c)
Chih-Wei Huang [Tue, 22 Oct 2019 09:58:44 +0000 (17:58 +0800)]
Merge remote-tracking branch 'x86/nougat-x86' into cm-14.1-x86
Chih-Wei Huang [Tue, 22 Oct 2019 09:56:16 +0000 (17:56 +0800)]
Merge remote-tracking branch 'cm/cm-14.1' into cm-14.1-x86
Chih-Wei Huang [Wed, 16 Oct 2019 14:52:29 +0000 (22:52 +0800)]
Merge tag 'android-7.1.2_r39' into nougat-x86
Android 7.1.2 Release 39 (
5787804)
Brian Duddie [Thu, 6 Jun 2019 23:43:41 +0000 (16:43 -0700)]
Fix race between SensorManager ctor and callback
Avoids potential invalid memory access if system server crashes during
initialization.
Bug:
132927376
Test: confirm sensors initialize
Change-Id: If7421c452b5893ab2567323d265503a1ce304482
Merged-In: If7421c452b5893ab2567323d265503a1ce304482
(cherry picked from commit
4b23ed10ae94ff9e991cc6c1d0946b55733e8f89)
Michael Wachenschwanz [Tue, 4 Jun 2019 00:24:51 +0000 (17:24 -0700)]
Free mObjects if no objects left to realloc on resize
Bug:
134168436
Bug:
133785589
Bug:
34175893
Test: atest CtsOsTestCases:ParcelTest#testObjectDoubleFree
Change-Id: I82e7e8c7b4206fb45b832a71d174df45edb62710
Merged-In: I82e7e8c7b4206fb45b832a71d174df45edb62710
(cherry picked from commit
edd3e3d8f441131b02e5a78d18babf9d16ef9e6e)
Bryan Ferris [Wed, 5 Jun 2019 02:00:32 +0000 (19:00 -0700)]
libbinder: Status: check dataPosition sets.
Bug:
132650049
Test: fuzzer
Change-Id: Id230eae4316a444bc82b416b2049d5a5f589f89a
(cherry picked from commit
f5edb02e9e96de8ff29bc4369d6dd6681ec0d7cf)
Steven Moreland [Fri, 17 May 2019 20:14:06 +0000 (13:14 -0700)]
libbinder: readCString: no ubsan sub-overflow
Bug:
131859347
Test: fuzzer
Change-Id: I95a0f59684a172925f1eab97ff21e5d14bc79cc8
Merged-In: I95a0f59684a172925f1eab97ff21e5d14bc79cc8
(cherry picked from commit
d0d4b584fc294d2c124385644099852918416344)
Brian Duddie [Thu, 6 Jun 2019 23:43:41 +0000 (16:43 -0700)]
Fix race between SensorManager ctor and callback
Avoids potential invalid memory access if system server crashes during
initialization.
Bug:
132927376
Test: confirm sensors initialize
Change-Id: If7421c452b5893ab2567323d265503a1ce304482
Merged-In: If7421c452b5893ab2567323d265503a1ce304482
(cherry picked from commit
4b23ed10ae94ff9e991cc6c1d0946b55733e8f89)
Michael Wachenschwanz [Tue, 4 Jun 2019 00:24:51 +0000 (17:24 -0700)]
Free mObjects if no objects left to realloc on resize
Bug:
134168436
Bug:
133785589
Bug:
34175893
Test: atest CtsOsTestCases:ParcelTest#testObjectDoubleFree
Change-Id: I82e7e8c7b4206fb45b832a71d174df45edb62710
Merged-In: I82e7e8c7b4206fb45b832a71d174df45edb62710
(cherry picked from commit
edd3e3d8f441131b02e5a78d18babf9d16ef9e6e)
Bryan Ferris [Wed, 5 Jun 2019 02:00:32 +0000 (19:00 -0700)]
[RESTRICT AUTOMERGE] libbinder: Status: check dataPosition sets.
Bug:
132650049
Test: fuzzer
Change-Id: Id230eae4316a444bc82b416b2049d5a5f589f89a
(cherry picked from commit
f5edb02e9e96de8ff29bc4369d6dd6681ec0d7cf)
Steven Moreland [Fri, 17 May 2019 20:14:06 +0000 (13:14 -0700)]
libbinder: readCString: no ubsan sub-overflow
Bug:
131859347
Test: fuzzer
Change-Id: I95a0f59684a172925f1eab97ff21e5d14bc79cc8
Merged-In: I95a0f59684a172925f1eab97ff21e5d14bc79cc8
(cherry picked from commit
d0d4b584fc294d2c124385644099852918416344)
Siarhei Vishniakou [Sat, 17 Nov 2018 06:18:53 +0000 (22:18 -0800)]
Sanitize InputMessage before sending
The struct InputMessage has many fields, and is force-aligned to 8-byte
boundaries. There are also some padding fields that carry no
information.
This struct is typically allocated in the stack and populated with
various values before being sent across as a stream of bytes through the
socket.
Therefore, the "unused" data portions of the struct could contain
portions of the stack, since there aren't ever writes to those memory
locations.
To avoid this information leak, forcefully sanitize the struct. Create a
new struct that is explicitly set to zero. Next, only fill the
meaningful fields manually.
Bug:
115739809
Test: cts-tradefed run cts -m CtsSecurityBulletinHostTestCases -t android.security.cts.Poc18_12; adb shell monkey 100000
Change-Id: I7e44dacf1e8fa3156c8e4d2f7784ef0c53dab507
Merged-In: I7e44dacf1e8fa3156c8e4d2f7784ef0c53dab507
(cherry picked from commit
cb2f0ceed876b3c1cc62fc677c75a12c1f10b199)
Siarhei Vishniakou [Sat, 17 Nov 2018 06:18:53 +0000 (22:18 -0800)]
Sanitize InputMessage before sending
The struct InputMessage has many fields, and is force-aligned to 8-byte
boundaries. There are also some padding fields that carry no
information.
This struct is typically allocated in the stack and populated with
various values before being sent across as a stream of bytes through the
socket.
Therefore, the "unused" data portions of the struct could contain
portions of the stack, since there aren't ever writes to those memory
locations.
To avoid this information leak, forcefully sanitize the struct. Create a
new struct that is explicitly set to zero. Next, only fill the
meaningful fields manually.
Bug:
115739809
Test: cts-tradefed run cts -m CtsSecurityBulletinHostTestCases -t android.security.cts.Poc18_12; adb shell monkey 100000
Change-Id: I7e44dacf1e8fa3156c8e4d2f7784ef0c53dab507
Merged-In: I7e44dacf1e8fa3156c8e4d2f7784ef0c53dab507
(cherry picked from commit
cb2f0ceed876b3c1cc62fc677c75a12c1f10b199)
Jon Doe [Sun, 23 Dec 2018 14:50:00 +0000 (22:50 +0800)]
inputflinger: treat tablet-style inputs as absolute coordinate mouse pointer
Qemu and VirtualBox use tablet-style inputs. However, it's difficult to
work with the current "invisible finger" or "drag pointer" interface
provided to the virtual absolute coordinate pointing devices.
Instead, this patch classifies them as a regular mouse pointer
(INPUT_DEVICE_CLASS_CURSOR), which is more intuitive to work with.
Michael Wachenschwanz [Tue, 17 Apr 2018 23:52:40 +0000 (16:52 -0700)]
Increment when attempting to read protected Parcel Data
Make sure to increment the parcel data position even when trying to
improperly read from protected data
Bug:
29833520
Test (M): cts-tradefed run cts -c android.os.cts.ParcelTest -m testBinderDataProtection
Test (M): cts-tradefed run cts -c android.os.cts.ParcelTest -m testBinderDataProtectionIncrements
Test: cts-tradefed run cts -m CtsOsTestCases -t android.os.cts.ParcelTest#testBinderDataProtection
Test: cts-tradefed run cts -m CtsOsTestCases -t android.os.cts.ParcelTest#testBinderDataProtectionIncrements
Change-Id: Ie4aae6277fc5f5c924f603d9828c3a608998b986
Merged-In: Ie4aae6277fc5f5c924f603d9828c3a608998b986
(cherry picked from commit
6a825e8ad1a3928dd872bb7c3fbcd94784d77267)
CVE-2018-9434
Michael Wachenschwanz [Sat, 18 Nov 2017 02:25:05 +0000 (18:25 -0800)]
Disallow reading object data from Parcels with non-object reads
The check added to each non-object reads adds an overhead. If the
objects (binders and file descriptors) were written to the Parcel in
sequential order then check adds a small O(1) overhead to each read,
plus an O(N) overhead to the first read (to verify the N objects were
added in order).
If the objects were written out of order (as in by jumping around the Parcel
with setDataPosition and writing Binder, DON'T DO THIS!!) (writing non
objects out of order is fine), the first read is forced to sort the objects
in the internal bookkeeping. Based on the assumption non sequential writes
are infrequent and overall Parcels are probably mostly sorted, insertion
sort was used. Worst case sorts will add an O(N^2) overhead to the first
non object read from the Parcel.
Test: run cts -m CtsOsTestCases -t android.os.cts.ParcelTest
Bug:
29833520
Change-Id: I82de8eb5f5eb56f869542d5358e96884c24301b2
(cherry picked from commit
c517681c66a1a387be657e0cf06da8d19659dd14)
CVE-2018-9434
Martijn Coenen [Wed, 4 Apr 2018 09:46:56 +0000 (11:46 +0200)]
Don't pad before calling writeInPlace().
writeInplace() itself already pads securely, by masking off
the padded bytes. If the padding is done before calling
writeInplace(), no mask is applied, and heap data can leak.
Bug:
77237570
Test: builds
Change-Id: Ide27a0002d4ed4196530430760245b971f6a3f44
Merged-In: Ide27a0002d4ed4196530430760245b971f6a3f44
(cherry picked from commit
f8542381b72a7bb2452a5278a00ca8c34edbf8a0)
(cherry picked from commit
732132b765cd7b667f16cf32f0fe4c852d7d44dd)
Change-Id: Id65e4573e18ab68b804f1cf63a6977a71da01e5d
CVE-2018-9421
Michael Wachenschwanz [Tue, 17 Apr 2018 23:52:40 +0000 (16:52 -0700)]
Increment when attempting to read protected Parcel Data
Make sure to increment the parcel data position even when trying to
improperly read from protected data
Bug:
29833520
Test (M): cts-tradefed run cts -c android.os.cts.ParcelTest -m testBinderDataProtection
Test (M): cts-tradefed run cts -c android.os.cts.ParcelTest -m testBinderDataProtectionIncrements
Test: cts-tradefed run cts -m CtsOsTestCases -t android.os.cts.ParcelTest#testBinderDataProtection
Test: cts-tradefed run cts -m CtsOsTestCases -t android.os.cts.ParcelTest#testBinderDataProtectionIncrements
Change-Id: Ie4aae6277fc5f5c924f603d9828c3a608998b986
Merged-In: Ie4aae6277fc5f5c924f603d9828c3a608998b986
(cherry picked from commit
6a825e8ad1a3928dd872bb7c3fbcd94784d77267)
Martijn Coenen [Wed, 4 Apr 2018 09:46:56 +0000 (11:46 +0200)]
Don't pad before calling writeInPlace().
writeInplace() itself already pads securely, by masking off
the padded bytes. If the padding is done before calling
writeInplace(), no mask is applied, and heap data can leak.
Bug:
77237570
Test: builds
Change-Id: Ide27a0002d4ed4196530430760245b971f6a3f44
Merged-In: Ide27a0002d4ed4196530430760245b971f6a3f44
(cherry picked from commit
f8542381b72a7bb2452a5278a00ca8c34edbf8a0)
(cherry picked from commit
732132b765cd7b667f16cf32f0fe4c852d7d44dd)
akirilov [Tue, 3 Apr 2018 19:56:06 +0000 (12:56 -0700)]
Disallow reading object data from Parcels with non-object reads
The check added to each non-object reads adds an overhead. If the
objects (binders and file descriptors) were written to the Parcel in
sequential order then check adds a small O(1) overhead to each read,
plus an O(N) overhead to the first read (to verify the N objects were
added in order).
If the objects were written out of order (as in by jumping around the Parcel
with setDataPosition and writing Binder, DON'T DO THIS!!) (writing non
objects out of order is fine), the first read is forced to sort the objects
in the internal bookkeeping. Based on the assumption non sequential writes
are infrequent and overall Parcels are probably mostly sorted, insertion
sort was used. Worst case sorts will add an O(N^2) overhead to the first
non object read from the Parcel.
Test: run cts -m CtsOsTestCases -t android.os.cts.ParcelTest
Bug:
29833520
Change-Id: Id0119caf530023fe8b61be6d15f5b6a9c49c08df
Merged-In: I82de8eb5f5eb56f869542d5358e96884c24301b2
(cherry picked from commit
f784183c17a4985b9703ac22d063ad4ef8b9090f)
Chih-Wei Huang [Wed, 2 May 2018 14:34:04 +0000 (22:34 +0800)]
Merge remote-tracking branch 'cm/cm-14.1' into cm-14.1-x86
Conflicts:
opengl/libs/EGL/egl_object.cpp
Jesse Hall [Fri, 29 Sep 2017 22:57:42 +0000 (15:57 -0700)]
Handle glGetString returning NULL
When two contexts are shared, and one is lost/reset, the other can be
lost as well. A lost context can return NULL from glGetString. On the
first eglMakeCurrent to a context, we fetch the extension list, and
weren't checking for NULL, leading to a crash in the rare case where a
context is lost and then another context sharing with it is made
current for the first time.
Bug:
64024627
Test: dEQP-EGL.functional.robustness.reset_context.shaders.infinite_loop.shared_context_status.*
Change-Id: Ib7e1b932490ec587df159e9e461c211d3dac35d4
Aaron Kling [Fri, 17 Nov 2017 03:01:38 +0000 (21:01 -0600)]
Triple the available egl function pointers available to a process
for certain Nvidia devices.
Change-Id: Id0141140c3b44af93fbd37aaf7810bb92e335111
Chih-Wei Huang [Mon, 12 Feb 2018 10:00:06 +0000 (18:00 +0800)]
Merge remote-tracking branch 'x86/nougat-x86' into cm-14.1-x86
Chih-Wei Huang [Thu, 4 Jan 2018 08:27:30 +0000 (16:27 +0800)]
Merge tag 'android-7.1.2_r36' into nougat-x86
Android 7.1.2 Release 36 (N2G48H)
Siarhei Vishniakou [Fri, 4 Aug 2017 19:37:47 +0000 (12:37 -0700)]
DO NOT MERGE Remove window obscurement information.
If ACTION_OUTSIDE_EVENTS contain information about whether the touch is
obscured, then a pattern of invisible, untouchable, unfocusable
SYSTEM_ALERT_WINDOWS can be placed across the screen to determine
approximate locations of touch events without the user knowing.
Bug:
31097064
Test: cts-tradefed run cts --class android.security.cts.MotionEventTest
Change-Id: Iebbb68231cbb76f87241201e7640a1fe3e188625
(cherry picked from commit
5508ca2c191f8fdf29d8898890a58bf1a3a225b3)
meijjaa [Sat, 21 Oct 2017 11:42:31 +0000 (13:42 +0200)]
Merge remote-tracking branch 'cm/cm-14.1' into cm-14.1-x86
android-build-team Robot [Thu, 28 Sep 2017 17:16:50 +0000 (17:16 +0000)]
Merge cherrypicks of [
2973982,
2974657,
2974658,
2973983,
2973984,
2974689,
2974690,
2974691,
2974692,
2974710,
2974711,
2974713,
2974714,
2974215,
2974216,
2974217,
2974218,
2974219,
2974220,
2974729,
2974730,
2974731,
2974732,
2974733,
2974734,
2974735,
2974736,
2974737,
2974738,
2974739,
2974740,
2974741,
2974742,
2974749,
2974750,
2974751,
2974752,
2974753,
2974647,
2974744,
2974693,
2974694,
2974648,
2974513,
2974665,
2974746] into nyc-mr2-release
Change-Id: I1dcef704bea95d9d3e289807299d8d3fff0ea049
Siarhei Vishniakou [Fri, 4 Aug 2017 19:37:47 +0000 (12:37 -0700)]
DO NOT MERGE Remove window obscurement information.
If ACTION_OUTSIDE_EVENTS contain information about whether the touch is
obscured, then a pattern of invisible, untouchable, unfocusable
SYSTEM_ALERT_WINDOWS can be placed across the screen to determine
approximate locations of touch events without the user knowing.
Bug:
31097064
Test: cts-tradefed run cts --class android.security.cts.MotionEventTest
Change-Id: Iebbb68231cbb76f87241201e7640a1fe3e188625
(cherry picked from commit
5508ca2c191f8fdf29d8898890a58bf1a3a225b3)
Siarhei Vishniakou [Fri, 4 Aug 2017 19:37:47 +0000 (12:37 -0700)]
DO NOT MERGE Remove window obscurement information.
If ACTION_OUTSIDE_EVENTS contain information about whether the touch is
obscured, then a pattern of invisible, untouchable, unfocusable
SYSTEM_ALERT_WINDOWS can be placed across the screen to determine
approximate locations of touch events without the user knowing.
Bug:
31097064
Test: cts-tradefed run cts --class android.security.cts.MotionEventTest
Change-Id: Iebbb68231cbb76f87241201e7640a1fe3e188625
(cherry picked from commit
5508ca2c191f8fdf29d8898890a58bf1a3a225b3)
Chih-Wei Huang [Thu, 14 Sep 2017 10:20:23 +0000 (18:20 +0800)]
libEGL: use SwiftShader if hardware gralloc is not set
The old implementation to disable hardware acceleration is reverted.
Dan Pasanen [Sun, 20 Aug 2017 20:58:33 +0000 (15:58 -0500)]
InputDispatcher_test: fix pokeUserActivity after
afbd1c1265de317f5ecf44cd400586c53a001ee7
* emulatorx86 needs this apparently
Change-Id: I870dbd0a33904eb9055f60fc9af379ab901c35b6
Corinna Vinschen [Sat, 12 Aug 2017 19:22:57 +0000 (21:22 +0200)]
InputDispatcher: On keypress, deliver keycode to pokeUserActivity
Change-Id: I8f64a6fa9b4b2e4520e25731f55e89f5087c70da
Signed-off-by: Corinna Vinschen <xda@vinschen.de>
Corinna Vinschen [Sat, 12 Aug 2017 19:22:27 +0000 (21:22 +0200)]
PowerManager.h: Define USER_ACTIVITY_FLAG values
Change-Id: I90daada0d887008d56e84ce29b3f0b011a298698
Signed-off-by: Corinna Vinschen <xda@vinschen.de>
Adrian DC [Wed, 16 Nov 2016 12:02:04 +0000 (13:02 +0100)]
native: Increase ART heap limit to 192MB for 1024MB RAM devices
* Needed for Google SetupWizard to start
* Without this, SetupWizard is compiled by ART on boot
and runs out of memory (heap) while running, resulting
in the SetupWizard crashing and blocking boot
Change-Id: Ic5b8caf4352f6d104af9121a09a01adad1c5bcc3
Signed-off-by: Adrian DC <radian.dc@gmail.com>
Chih-Wei Huang [Fri, 11 Aug 2017 05:27:24 +0000 (13:27 +0800)]
Merge tag 'android-7.1.2_r33' into nougat-x86
Android 7.1.2 Release 33 (NZH54D)
Christopher N. Hesse [Wed, 9 Aug 2017 22:10:37 +0000 (00:10 +0200)]
SF: Improve hwrotation handling
Avoid getprop() calls in performance critical display
code paths.
Instead of querying the property each time we need it,
we read it once during initialization and then reuse
the cached value.
This is more appropriate here because we do not expect
the value to change at runtime. In fact, this property
behaves like a compile time constant in the real world:
Set it once and never again (because the angle of your
panel is fixed and does not change after the device
leaves the factory).
Change-Id: I55c4131735a65c7bdde8b00c166913bffa6c4ec3
Dan Pasanen [Mon, 7 Aug 2017 21:13:35 +0000 (16:13 -0500)]
Merge tag 'android-7.1.2_r29' into cm-14.1
Android 7.1.2 Release 29 (NJH47F)
# gpg: Signature made Fri 28 Jul 2017 01:56:01 PM CDT
# gpg: using DSA key
E8AD3F819AB10E78
# gpg: Can't check signature: No public key
Chih-Wei Huang [Fri, 28 Jul 2017 11:44:57 +0000 (19:44 +0800)]
RenderEngine: support non-RGBA_8888 format
Some of our GPUs (e.g., radeon) don't support RGBA_8888 well.
To workaround it, just get the EGL config by a simpler query.
This patch should be reverted once all of our GPUs support
RGBA_8888.
neo.he [Tue, 21 Mar 2017 03:48:36 +0000 (11:48 +0800)]
Add alpha channel for the EGLConfig
If the alpha channel is not assigned, the framebuffer will be opaque.
And it will mask the underlying video and make the video invisible
when play video width mediaplayer
Issue: 258684
Test: media player
Change-Id: If756ad2aaa789f6ddb178333b3e8854f52c8eac3
Chih-Wei Huang [Tue, 18 Jul 2017 05:49:31 +0000 (13:49 +0800)]
Merge tag 'android-7.1.2_r27' into nougat-x86
Android 7.1.2 release 27
Francis Hart [Fri, 9 Jan 2015 09:10:54 +0000 (11:10 +0200)]
Surface: Use async lock/unlock in copyBlt
The Surface::lock() function now uses the asynchronous versions of
gralloc lock/unlock when copying the previously drawn content to the
backbuffer. This allows for optimisations in the gralloc module
implementation and so can improve performance and avoid CPU waits.
Change-Id: I57193f327db2ff0422e1b58b3484f613201d994c
Francis Hart [Mon, 1 Dec 2014 14:04:49 +0000 (16:04 +0200)]
Surface: Ensure synchronisation of copyBlt
The Surface::lock() function has an optimisation for copying the
previously drawn contents from the frontbuffer to the (current)
backbuffer, so that the client does not have to redraw the whole surface
contents. This logic was not using the sync fence FD from
dequeueBuffer() and so was not correctly synchronised with pending
operations on the backbuffer.
Change-Id: Ib44574d50f8bdb4a23078cd8da1c5c512c876320
Ramakant Singh [Thu, 9 Feb 2017 12:53:36 +0000 (18:23 +0530)]
surfaceflinger: Validate setposition parameters
Validate setposition parameters width and height to
fix hang issues becuase of wrong values set by clients.
Change-Id: I786fc6f986fdb1d7de46ac3845f6a77cdcf34f93
CRs-Fixed:
2005153
Pullakavi Srinivas [Thu, 16 Feb 2017 10:51:47 +0000 (16:21 +0530)]
sf: Fix GPU coordinates computation.
Along with Viewport, final crop need to be
considered to maintain aspect ratio.
CRs-Fixed:
2001126
Change-Id: Ia499cc059a2b0ef65002c60215d2f01ac706867f
Baldev Sahu [Thu, 19 Jan 2017 11:02:04 +0000 (16:32 +0530)]
sf: Limit co-ordinates difference fix for high res panel
- Limit co-ordinate difference fix for high res panel as this
is causing pixel shift on low res panel due to rounding.
Change-Id: I1d697bc76ff6f962f399f6f692e347d04a059443
Namit Solanki [Fri, 9 Dec 2016 04:43:54 +0000 (10:13 +0530)]
surfaceflinger: Fix continuous SF dump.
- Pass false in dumpdrawCycle() to append
SF dumps for each draw cycle in a file.
Change-Id: Ibea496635b0d5a63e963f01754b5b6ddf8b09b4c
CRs-Fixed:
1099278
Dan Pasanen [Wed, 5 Jul 2017 22:30:22 +0000 (17:30 -0500)]
Merge tag 'android-7.1.2_r24' into cm-14.1
Android 7.1.2 release 24
# gpg: Signature made Fri 30 Jun 2017 01:19:30 PM CDT
# gpg: using DSA key
E8AD3F819AB10E78
# gpg: Can't check signature: No public key
Chih-Wei Huang [Tue, 27 Jun 2017 06:21:26 +0000 (14:21 +0800)]
installd: a workaround for 9p filesystem
SELinux and getxattr seem not work on 9p filesystem.
Ignore the errors as a workaround.
TEST: be able to boot to Home on QEMU with shared 'data' folder.
android-build-team Robot [Fri, 16 Jun 2017 17:21:50 +0000 (17:21 +0000)]
Merge cherrypicks of [
2419615,
2419671,
2419656,
2419633,
2419709,
2419634,
2419635,
2419617,
2419618,
2419619,
2419658,
2419697,
2419659,
2419673,
2419726,
2419747,
2419596,
2419748,
2419597,
2419636,
2419711,
2419749,
2419660,
2419713,
2419714,
2419727,
2419674,
2419782,
2419752,
2419731,
2419732,
2419677,
2419717,
2419734,
2419784] into nyc-mr2-security-c-release
Change-Id: I8ad2f36ffeb8ead54643cf3d7707099f422df47c
Mathias Agopian [Tue, 4 Apr 2017 00:14:31 +0000 (17:14 -0700)]
fix race condition that can cause a use after free
Backported from
12a0ccd6f7201bac706d903ac3f436c4358fe203.
Bug:
33004354
Test: manual
Change-Id: I9b38ee644b02268c9b995a330db758aa2e568399
(cherry picked from commit
59485525a6047453e6ba16c03989381e2a0d56ec)
android-build-team Robot [Thu, 15 Jun 2017 19:16:32 +0000 (19:16 +0000)]
Merge cherrypicks of [
2413468,
2413357,
2413489,
2413431,
2413506,
2413398,
2413399,
2413319,
2413507,
2413508,
2413371,
2413410,
2413432,
2413358,
2413490,
2413359,
2413360,
2413320,
2413509,
2413491,
2414061,
2413372,
2413492,
2413433,
2413469,
2413411,
2414062,
2413373,
2413374,
2413470,
2413400,
2414063,
2414064,
2413447,
2413434,
2414101,
2413412] into nyc-mr2-release
Change-Id: I3468d071cdcf838e73b0317fa1b9e9df6d81a12d
Mathias Agopian [Tue, 4 Apr 2017 00:14:31 +0000 (17:14 -0700)]
fix race condition that can cause a use after free
Backported from
12a0ccd6f7201bac706d903ac3f436c4358fe203.
Bug:
33004354
Test: manual
Change-Id: I9b38ee644b02268c9b995a330db758aa2e568399
(cherry picked from commit
59485525a6047453e6ba16c03989381e2a0d56ec)
android-build-team Robot [Thu, 15 Jun 2017 19:04:21 +0000 (19:04 +0000)]
Merge cherrypicks of [
2413849,
2413760,
2413901,
2413776,
2413658,
2413792,
2413850,
2413851,
2413793,
2413866,
2413738,
2413659,
2413660,
2413867,
2413868,
2413885,
2413829,
2413814,
2413886,
2413921,
2413777,
2413887,
2413854,
2413889,
2413890,
2413855,
2413869,
2413740,
2413816,
2413831,
2413832,
2413817,
2413892,
2413797,
2413779] into nyc-mr2-pixel-monthly-release
Change-Id: Ibdc8a041b91966025cb8dd8398903f789803cd25
Mathias Agopian [Tue, 4 Apr 2017 00:14:31 +0000 (17:14 -0700)]
fix race condition that can cause a use after free
Backported from
12a0ccd6f7201bac706d903ac3f436c4358fe203.
Bug:
33004354
Test: manual
Change-Id: I9b38ee644b02268c9b995a330db758aa2e568399
(cherry picked from commit
59485525a6047453e6ba16c03989381e2a0d56ec)
Mathias Agopian [Tue, 4 Apr 2017 00:14:31 +0000 (17:14 -0700)]
fix race condition that can cause a use after free
Backported from
12a0ccd6f7201bac706d903ac3f436c4358fe203.
Bug:
33004354
Test: manual
Change-Id: I9b38ee644b02268c9b995a330db758aa2e568399
(cherry picked from commit
59485525a6047453e6ba16c03989381e2a0d56ec)
Chih-Wei Huang [Wed, 7 Jun 2017 03:07:24 +0000 (11:07 +0800)]
Merge tag 'android-7.1.2_r17' into nougat-x86
Android 7.1.2 Release 17 (NJH47B)
Dan Pasanen [Mon, 5 Jun 2017 23:26:31 +0000 (18:26 -0500)]
Merge tag 'android-7.1.2_r17' into cm-14.1
Android 7.1.2 Release 17 (NJH47B)
# gpg: Signature made Fri 02 Jun 2017 05:09:05 PM CDT
# gpg: using DSA key
E8AD3F819AB10E78
# gpg: Can't check signature: No public key
android-build-team Robot [Wed, 24 May 2017 22:54:12 +0000 (22:54 +0000)]
Merge cherrypicks of [
2310999,
2310925,
2310891,
2311000,
2310892,
2310858,
2310986,
2310963,
2311043,
2310928,
2311044,
2310990,
2311022,
2311023,
2310917,
2310994,
2311024,
2311045,
2310967,
2310995,
2311003,
2311059,
2311025,
2311060,
2310953,
2311061,
2311004,
2311046,
2311005,
2311047,
2311006,
2311079,
2310954,
2311026,
2310896,
2310898,
2310997,
2311062,
2310955,
2311029,
2310998,
2311080,
2311119,
2311030,
2310933,
2311140,
2311063,
2310934,
2311049,
2311050,
2311084,
2311031,
2311145,
2311164] into nyc-mr2-security-c-release
Change-Id: Ib0aca10827997b0ecfcbc15b8c2db7117beab266
Chia-I Wu [Mon, 15 May 2017 17:32:27 +0000 (10:32 -0700)]
libgui: check for invalid slot in attachBuffer
Bug:
37478824
Test: manual
Change-Id: I369337d53539bf7f7e3d925bccdae4045da1b404
(cherry picked from commit
c79a29689c1046f1f0301c75df9b9a67cba8bf04)
Dan Stoza [Mon, 1 May 2017 23:31:53 +0000 (16:31 -0700)]
libgui: Check slot received from IGBP in Surface
Checks that the slot number received from mGraphicBufferProducer in
Surface::dequeueBuffer is on the interval [0, NUM_BUFFER_SLOTS) to
protect against a malicious BnGraphicBufferProducer.
Bug:
36991414
Change-Id: I1a76fd1bcce1c558f1c0c30f03638278288ed4fa
(cherry picked from commit
90ce2a9c1d3af422c66b4061805831cb208263d8)
Chris Forbes [Wed, 10 May 2017 20:12:00 +0000 (13:12 -0700)]
ui: Fix bad size check in Fence::unflatten
Differs slightly from mnc+ patch: GetFlattenedSize was fixed in mnc.
Test: Boot device, run poc from bug, observe no longer crashes
Bug:
37285689
Change-Id: Id8b851733b088cce0d07493fbf76e7e24f9299ad
(cherry picked from commit
9809602ac32dcb7bceaa5bc34df5b7fb68aacd38)
android-build-team Robot [Wed, 24 May 2017 22:12:52 +0000 (22:12 +0000)]
Merge cherrypicks of [
2310196,
2310339,
2310340,
2310175,
2310320,
2310321,
2310322,
2310323,
2310217,
2310311,
2310349,
2310313,
2310331,
2310314,
2310286,
2310368,
2310383,
2310272,
2310439,
2310317,
2310318,
2310370,
2310352,
2310459,
2310287,
2310384,
2310237,
2310422,
2310440,
2310372,
2310289,
2310374,
2310355,
2310461,
2310423,
2310375,
2310376,
2310385,
2310386,
2310275,
2310462,
2310442,
2310443,
2310539,
2310378,
2310445,
2310238,
2310446,
2310540,
2310335,
2310582,
2310454,
2310659,
2310392,
2310393,
2310437,
2310679,
2310626] into nyc-mr2-release
Change-Id: I716e667bb925d01972a6e9ef26bf11cbf3628cc5
Chia-I Wu [Mon, 15 May 2017 17:32:27 +0000 (10:32 -0700)]
libgui: check for invalid slot in attachBuffer
Bug:
37478824
Test: manual
Change-Id: I369337d53539bf7f7e3d925bccdae4045da1b404
(cherry picked from commit
c79a29689c1046f1f0301c75df9b9a67cba8bf04)
Dan Stoza [Mon, 1 May 2017 23:31:53 +0000 (16:31 -0700)]
libgui: Check slot received from IGBP in Surface
Checks that the slot number received from mGraphicBufferProducer in
Surface::dequeueBuffer is on the interval [0, NUM_BUFFER_SLOTS) to
protect against a malicious BnGraphicBufferProducer.
Bug:
36991414
Change-Id: I1a76fd1bcce1c558f1c0c30f03638278288ed4fa
(cherry picked from commit
90ce2a9c1d3af422c66b4061805831cb208263d8)
Chris Forbes [Wed, 10 May 2017 20:12:00 +0000 (13:12 -0700)]
ui: Fix bad size check in Fence::unflatten
Differs slightly from mnc+ patch: GetFlattenedSize was fixed in mnc.
Test: Boot device, run poc from bug, observe no longer crashes
Bug:
37285689
Change-Id: Id8b851733b088cce0d07493fbf76e7e24f9299ad
(cherry picked from commit
9809602ac32dcb7bceaa5bc34df5b7fb68aacd38)
android-build-team Robot [Wed, 24 May 2017 17:28:04 +0000 (17:28 +0000)]
Merge cherrypicks of [
2307556,
2307630,
2307631,
2307557,
2307632,
2307656,
2307743,
2307635,
2307799,
2307577,
2307800,
2307707,
2307803,
2307781,
2307773,
2307637,
2307804,
2307618,
2307734,
2307708,
2307805,
2307709,
2307806,
2307820,
2307746,
2307774,
2307839,
2307735,
2307782,
2307808,
2307840,
2307738,
2307783,
2307749,
2307775,
2307860,
2307899,
2307822,
2307823,
2307880,
2307778,
2307825,
2307882,
2307787,
2307919,
2307844,
2307905,
2307883,
2307829,
2307907,
2307832,
2307944,
2307945,
2307911] into nyc-mr2-pixel-monthly-release
Change-Id: I28eae9950c92e96e8d5a9ec0ae450f7bdfb0b28f
Chia-I Wu [Mon, 15 May 2017 17:32:27 +0000 (10:32 -0700)]
libgui: check for invalid slot in attachBuffer
Bug:
37478824
Test: manual
Change-Id: I369337d53539bf7f7e3d925bccdae4045da1b404
(cherry picked from commit
c79a29689c1046f1f0301c75df9b9a67cba8bf04)
Dan Stoza [Mon, 1 May 2017 23:31:53 +0000 (16:31 -0700)]
libgui: Check slot received from IGBP in Surface
Checks that the slot number received from mGraphicBufferProducer in
Surface::dequeueBuffer is on the interval [0, NUM_BUFFER_SLOTS) to
protect against a malicious BnGraphicBufferProducer.
Bug:
36991414
Change-Id: I1a76fd1bcce1c558f1c0c30f03638278288ed4fa
(cherry picked from commit
90ce2a9c1d3af422c66b4061805831cb208263d8)
Chris Forbes [Wed, 10 May 2017 20:12:00 +0000 (13:12 -0700)]
ui: Fix bad size check in Fence::unflatten
Differs slightly from mnc+ patch: GetFlattenedSize was fixed in mnc.
Test: Boot device, run poc from bug, observe no longer crashes
Bug:
37285689
Change-Id: Id8b851733b088cce0d07493fbf76e7e24f9299ad
(cherry picked from commit
9809602ac32dcb7bceaa5bc34df5b7fb68aacd38)
Chia-I Wu [Mon, 15 May 2017 17:32:27 +0000 (10:32 -0700)]
libgui: check for invalid slot in attachBuffer
Bug:
37478824
Test: manual
Change-Id: I369337d53539bf7f7e3d925bccdae4045da1b404
(cherry picked from commit
c79a29689c1046f1f0301c75df9b9a67cba8bf04)
Dan Stoza [Mon, 1 May 2017 23:31:53 +0000 (16:31 -0700)]
libgui: Check slot received from IGBP in Surface
Checks that the slot number received from mGraphicBufferProducer in
Surface::dequeueBuffer is on the interval [0, NUM_BUFFER_SLOTS) to
protect against a malicious BnGraphicBufferProducer.
Bug:
36991414
Change-Id: I1a76fd1bcce1c558f1c0c30f03638278288ed4fa
(cherry picked from commit
90ce2a9c1d3af422c66b4061805831cb208263d8)
Chris Forbes [Wed, 10 May 2017 20:12:00 +0000 (13:12 -0700)]
ui: Fix bad size check in Fence::unflatten
Differs slightly from mnc+ patch: GetFlattenedSize was fixed in mnc.
Test: Boot device, run poc from bug, observe no longer crashes
Bug:
37285689
Change-Id: Id8b851733b088cce0d07493fbf76e7e24f9299ad
(cherry picked from commit
9809602ac32dcb7bceaa5bc34df5b7fb68aacd38)
android-build-team Robot [Thu, 18 May 2017 00:55:56 +0000 (00:55 +0000)]
Merge cherrypicks of [
2278225,
2279882,
2279862,
2278226,
2277057,
2279863,
2278227] into nyc-mr2-pixel-monthly-release
Change-Id: I6774ef85615b095adca014cd9a8dbf126aea7f4c
Tim Murray [Tue, 7 Mar 2017 17:31:09 +0000 (09:31 -0800)]
binder: remove cgroup interactions [ DO NOT MERGE ]
Having binder change cgroups on the fly is too expensive in the common case to be useful.
Test: builds
bug
34825105
Change-Id: Ia692c9d2ab261d852cb2fac8f27d6779d0e2b057
(cherry picked from commit
05f4679d035b8ff8023e75f58b576518b8c3f064)
android-build-team Robot [Wed, 17 May 2017 22:44:51 +0000 (22:44 +0000)]
release-request-
513a9883-0d18-4c2f-80ce-
cadb234b4e89-for-git_nyc-mr2-pixel-monthly-release-
3938523 snap-temp-L39300000065258774
Change-Id: I7a78c6e34ffa32907d81f5e19af217421745c2ca
android-build-team Robot [Wed, 17 May 2017 22:44:33 +0000 (22:44 +0000)]
release-request-
513a9883-0d18-4c2f-80ce-
cadb234b4e89-for-git_nyc-mr2-pixel-monthly-release-
3938523 snap-temp-L39300000065258774 (snap-temp-branch)
Change-Id: Id2f1da1207e472264239e5bbe1b5e38cee120fbf
Arne Coucheron [Tue, 16 May 2017 07:02:16 +0000 (07:02 +0000)]
sensorservice: Fix orientation sensor for HAL's missing rotation vector sensor
Some HAL's doesn't have a hardware rotation sensor, and with the
current check, the orientation sensor depends on it before it's
available to the system. Remove the dependency.
Fixes compass on some devices.
Change-Id: I58f746b3dee1eb5a637b21efb8fecddc10c31e3a
Colin Cross [Tue, 27 Sep 2016 01:10:16 +0000 (18:10 -0700)]
Rename dump methods to dumpState
The dump methods shadow the IBinder dump method. The warnings were being
hidden by the use of -isystem to include frameworks/native/include.
Bug:
31752268
Test: m -j
Merged-in: Iafc64da43032d5d9d84b64640e70d93fd7051bcf
Change-Id: Iafc64da43032d5d9d84b64640e70d93fd7051bcf
Chih-Wei Huang [Wed, 3 Aug 2016 17:38:50 +0000 (01:38 +0800)]
Run SurfaceFlinger with root privilege
To control virtual consoles, SurfaceFlinger needs the root privilege.
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.
Chih-Wei Huang [Fri, 5 May 2017 03:39:08 +0000 (11:39 +0800)]
Merge branch 'android-ia' into nougat-x86
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
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
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>
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>
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>
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>
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>
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>
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>
Chih-Wei Huang [Sat, 1 Nov 2014 17:21:12 +0000 (01:21 +0800)]
InputReader: add 5-point calibration
Updated for Android 5.0.
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.
Chih-Wei Huang [Sun, 26 Oct 2014 07:38:15 +0000 (15:38 +0800)]
SurfaceFlinger: 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.