Commit Graph

53194 Commits

Author SHA1 Message Date
forkbomb 53602ffde5 libbinder: allow devices to disable ashmem size tracking
The addition of ashmem size tracking can lead to parcel objects
overwriting other values on the stack in old binary blobs.

Change-Id: Ida52cec851a6f9d5a57c8f9130a5875c03dcb094
2015-12-04 15:42:51 +11:00
Caio Schnepper 8c39282e31 libgui: Don't assign handle to NULL after free is common
Reportedly Mali and PowerVR GPUs are crashing when setting handle to NULL
So we will set a flag for the devices that might need this aswell

Set BOARD_EGL_NEEDS_HANDLE_VALUE=true in BoardConfig.mk to use

Change-Id: I6c967f62dc6adced7583d7b2045d11cf5b25fc80
2015-11-25 17:51:30 -02:00
Caio Schnepper eed845539a libgui: Don't assign handle to NULL after free
This reverts c784dfc39f for exynos4 devices
with Mali 400 GPUs, which causes a fatal signal (SIGSEGV) and death of
the graphics subsystem

Change-Id: I6dbf8f8664fca01baf63fece7c64016609fe3e1c
2015-11-23 18:39:58 -02:00
Steve Kondik 05e03ad508 Merge branch 'LA.BF64.1.2.2_rb4.7' of git://codeaurora.org/platform/frameworks/native into cm-13.0
Change-Id: Ib29f744a0f7baac5d5ad8a7e9c5c14303b6aeec1
2015-11-16 14:36:34 -08:00
Ramakant Singh 2bb57a8bc3 sf : Apply user defined panel orientation to blur layer
Blur layer need to capture screen shot to create to blur
effect. Hence need to take care any user defined orientation
as well.

Change-Id: I1c0478810d12661edf2586293bbed342a5b4dc7e
2015-11-16 14:00:25 -08:00
Steve Kondik af9298115c Revert "surfaceflinger: Consolidate display orientation compensation hooks"
* This is completely breaking graphics.

This reverts commit f8e2372ad7.

Change-Id: I1d694f4228199891a191ce3fb924cec71a6100f0
2015-11-10 23:58:46 +01:00
Ricardo Cerqueira f8e2372ad7 surfaceflinger: Consolidate display orientation compensation hooks
Dedupe rotation calculation code and make rotation a statically
available property in the DisplayDevice

Change-Id: Ic517ab0d2c05026cd6fa46d664aab7926be17b62
2015-11-10 10:56:31 -08:00
Hashcode 3904525bce surfaceflinger: odd hw rotation (90/270) patch for swapping width/height
This patch works in addition to the following commit
re-implementing ro.sf.hwrotation:
7d283431ef

When using values of 90 and 270 for ro.sf.hwrotation the
LCD width and height also need to be swapped to display properly.

Change-Id: I2874fdb8f8d8b855df6d62d338c9a22360491973
NOTE: This patch does not fix the initial startup of bootanimation
2015-11-10 10:55:55 -08:00
Byunghun Jeon 987034b563 SurfaceFlinger: Native changes to add blur effect
Native changes to add blur-behind and blur mask effect

Change-Id: I54faf82d750e8299de6d261f6a893ab26d08df84

SurfaceFlinger: Adding template for LayerBlur files

Change-Id: I444009113b7bdd6c5284863fd1f56358e67d9fe6

SurfaceFlinger: Featurize libuiblur module for OSS build

Change-Id: Ifdc176e699434125d17b111c044b8ba954cf717c
2015-11-08 01:07:13 -08:00
Ethan Chen b53d92c3eb sensorservice: Don't replace HAL orientation sensor
* Previously HAL orientation sensor would always be replaced if the HAL
  did not provide a rotation vector sensor as well. Practically no HAL
  does, so the virtual sensor would always replace it.
* Add the virtual sensor only if the HAL does not provide it.

Change-Id: I50ad2cd6c60b53eddc4c6854997ec2e3dbff0d1a
2015-11-07 19:17:27 -08:00
Steve Kondik 911c7f3338 installd: Consider bundled app dir as a valid apk path
Change-Id: I92db56f21bf91e0816b63faffcfbb270ca2d8fca
2015-11-07 17:54:10 -08:00
Arne Coucheron 4cf9742078 sensorservice: Register orientation sensor if HAL doesn't provide it
* In KitKat and on most Samsung devices, the orientation sensor is
   not getting registered, and makes the compass non-working in a lot
   of apps. This patch enables the sensor for such devices.

Change-Id: I0ebba72ec4aa2cfa02c21a6daff0c356c6793fd0
(cherry picked from commit 98fa6f1152da759ef3eaf36cb16e0aaf2013376a)
2015-11-07 13:49:06 -08:00
Ricardo Cerqueira c77679141d sensorservice: Fix init sequence for pre-1.1 API sensor HALs
The sensors API introduced a new flush() method that older binaries
won't have. For those, replace the firstFlush invocation with a
setDelay call since a lot of implementations interpreted that as
the initialization step.
We also don't want any kind of call to flush() to happen when it
isn't there, since it'll either hit a random OEM extension or
a memory address we really don't want to execute.

Change-Id: I26ce923fe385751fed7d1c483a53c074249f0620

sensorservice: Set the rate for pre-1.1 HALs _after_ activation

We want to be sure these are applied in the same sequence they
used to be...

Change-Id: Ied2ba08ed3c4bed3a80bac6ab5471fcea9ba2c09
2015-11-07 13:48:42 -08:00
Clyde Tan 5b6a10373e Fix boot animation rotation problem when ro.sf.hwrotation is set to 90 or 270
Change-Id: I7ad3c83e23ce38280818ec5283d173d50c889531
2015-11-07 13:45:41 -08:00
Ricardo Cerqueira 94d724071d surfaceflinger: Reimplement hwrotation
Change-Id: Ia26bb36b5b6de132af49c272c4472ad2703afbda
2015-11-07 13:45:19 -08:00
Naseer Ahmed b9127bdbe3 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: I8fae1b5564fbea598e415a86b0a21c3449c92d87
2015-11-07 01:21:36 -08:00
Linux Build Service Account ea9f37a30c Merge "native: add ambient temperature & relative humidity sensor features" 2015-11-06 07:35:38 -08:00
Ricardo Cerqueira 1cdd1b5ad2 Android 6.0.0 release 26
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iEYEABECAAYFAlYxAgIACgkQ6K0/gZqxDnjCqACfbBT6VOiUFQvRn7w1SAa+4rjF
 1IwAn2rBUqWo0dOKVwF1DDfFmGZXc8SB
 =1BqV
 -----END PGP SIGNATURE-----

Merge tag 'android-6.0.0_r26' into HEAD

Android 6.0.0 release 26

Conflicts:
	include/android/input.h

Change-Id: Ifa374c6d3055be3b8a5d60967f8b4c0043da739b
2015-11-05 01:41:42 +00:00
Satya Durga Srinivasu Prabhala 84f1b431b2 native: add ambient temperature & relative humidity sensor features
Adding ambient temperature & relative humidity hardware sensor
features as they are missing and causing CTS failures.

Change-Id: I4f07db8e77cb77c5b2c1bb7ed80a26f68c91c23e
2015-11-04 12:28:21 -08:00
Steve Kondik 5e78568dab Merge branch 'LA.BF64.1.2.2_rb4.6' of git://codeaurora.org/platform/frameworks/native into cm-13.0 2015-11-04 10:26:51 -08:00
Ricardo Cerqueira 60c26d1f27 Android 6.0.0 release 5
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iEYEABECAAYFAlYyZAgACgkQ6K0/gZqxDng/ZgCfUJK3qqr1BvYmWlGZsQ4+taVP
 6NEAnRLWjoF9kSyraCa/VG+w2tUrS80Y
 =xUfb
 -----END PGP SIGNATURE-----

Merge tag 'android-6.0.0_r5' into cm-13.0

Android 6.0.0 release 5
2015-11-03 23:27:50 +00:00
Roman Birg 4dcf7868e3 update app ops
Change-Id: Id189866c1868e6340b1b01ca94c06983fbcc242d
Signed-off-by: Roman Birg <roman@cyngn.com>
2015-11-02 11:51:17 -08:00
Christopher N. Hesse f3f3949b32 binder: MemoryHeapIon: fix unused parameters
Using the __attribute__((unused)) preprocessor directive

Change-Id: I29d27fd7eacb962ffa06ccd81ee48b48f3743243
(cherry picked from commit 047c69bb8e17eab6f3432fae200fe94f7e119755)
2015-11-02 17:30:14 +01:00
codeworkx af2d946f2d binder: Squashed commit of MemoryHeapBaseIon
Source:
http://git.insignal.co.kr/samsung/exynos/android/platform/frameworks/native/commit/?h=exynos-jb&id=dc4cd25cc41e4358debd0c7d1a2706d208a58df6

Change-Id: Ib06cc37a2a25c78a061ee2bad48eec2d01b07833

binder: update MemoryHeapIon

* Update from ODROID-XU 09232013 BSP release

Change-Id: I5245c8a9f783e8902bf91a0ee23e60ebeb335b27

binder: update MemoryHeapIon

* Update from ODROID-XU 04212014 BSP

Change-Id: Ifc2664bcde37a71d855e05e7c9e50288a4508892

binder: Fixed new CM SLSI build variant

Change-Id: Icfff592cf705af660c7318b08fce75dbbf42103c
(cherry picked from commit 014ad5eee0a7de70c4a9f66e8f5ce7b32f4ecb16)
2015-11-02 17:29:40 +01:00
Manoj Kumar AVM f8ea9b5796 sf: vds: Avoid HWC for certain scenarios
Reserve HWC for VDS for WFD use case. During WFD usecase, sink usage
will contain GRALLOC_USAGE_PRIVATE_WFD flag.

When HWC is avoided, all virtual displays are composed using GLES.
This means that GLES composes directly into the sink buffer and
signals the consumer. Furthermore, it is expected that any color
conversion will be handled on the consumer side.

CRs-Fixed: 908380
Change-Id: I93ff54c79ece788b6caf3f4172835d8ac1362f62
2015-11-02 08:15:21 -08:00
Praveen Chavan c784dfc39f libgui: assign handle to NULL after free
to avoid use-after-free situations

Change-Id: If9c09f509bc55795856302e5ca34470df019c622
2015-10-31 03:19:42 -07:00
Ricardo Cerqueira d15d2252b0 installd: Run all of the appt setup operations in the child process
Change-Id: Ifc18741380d7f922540d04ef622f17edfd87dbdf
2015-10-30 18:36:57 +00:00
d34d 716c2cf34a installd: Call pipe() before forking
Change-Id: Ideef9387c503a25dadb2afb4e4b394a2e61cd8e9
2015-10-28 18:35:09 -07:00
d34d 66a1d0d715 installd: Use -f (force overwrite) for aapt
When re-creating resource apks for themes, aapt will fail if the
apk already exists unless we use -f

Change-Id: If2c3a634aa3ca061009aa6892530d643f8f67e9f
2015-10-28 14:11:01 -07:00
d34d 2a7b426c03 Themes: Restructure resource cache [2/2]
Change-Id: Ib62081e0551e572680b92c0a587bdc7bbee9b62b
2015-10-26 18:34:55 -07:00
Clark Scheff ea0c03875f Themes: Port to CM13 [2/3]
Themes: Forward port installd

Id: I5c03bdca30d55f252d486ddac0355f41623ba8d5

Themes: Remove legacy theme support

Id: I6823a6f2735f07f8e4a25a9c0f6f297577a554ab

Access Themed ResTables from compiled theme apk [2/2]

Before this patch the ResTable for a theme/app was created and
accessed seperate from the compiled APK. Since the compiled APK
has its own copy of the resources.arsc, we can just reuse the table
in the APK instead

Id: Ib7916eba5663db5d077d33fc02623748e8a9f10c

Send target sdk version to aapt [2/2]

If vector drawables are used in a theme we must have a minSdkVersion of 21 passed
to aapt or else aapt will Segfault.

Id: Ib5ffa6d12c91d465f3a603e03b09ab03b02715c7
Change-Id: Ie14322b7efb40b270abd3d4ca1b7c5f97bf4b5ca
2015-10-26 16:00:55 -07:00
Arun Kumar K.R 81c57b3149 SurfaceFlinger: Disable rotation animation on Secondary displays
- Add support to set animating layer for HWCLayers
- After hwc_prepare, dont override the compType of a layer to
  HWC_FRAMEBUFFER if its for non-primary displays

Change-Id: Iac462778ce5fb9016290846146e62f80dcfafd5c
CRs-fixed: 922304
2015-10-26 14:20:43 -07:00
Ethan Chen 846c7e9329 input: Disable debug again
Change-Id: I3adadd69b8b3a42bcb384cac7ccff98ef0ca9c65
2015-10-26 13:58:49 -07:00
Steve Kondik 8f0e75211f Merge branch 'm' of git://codeaurora.org/platform/frameworks/native into cm-13.0
Change-Id: I7830f596b2e7da809a759491d8115ff158c43734
2015-10-21 16:56:23 -07:00
Praveen Chavan c57c920c26 libgui: assign handle to NULL after free
to avoid use-after-free situations

Change-Id: If9c09f509bc55795856302e5ca34470df019c622
2015-10-20 19:59:12 -07:00
Jorge Ruesga bfcd443950 native: dock battery
Change-Id: I23eadf0361cbe25029b95dbd022ce1a2cc96e94d
Require: topic:dock_battery
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
2015-10-17 14:04:39 -07:00
nadlabak c1c5240aa9 Support WAKE flag in keyboard layouts
This flag is used to specify the internal keyboard keys allowed
to wake the device.

Change-Id: Ic15aca1134206c9b006a4d97dded10bccae640d3
2015-10-17 14:03:58 -07:00
Steve Kondik 6b6c0cde5b input: Add option to toggle pointer icon when using stylus(3/3)
* The visible pointer icon when hovering or drawing with the stylus is
  quite annoying when trying to actually draw with it. Turn it off by
  default and add an option to turn it on.

Forward Port from CM-11.0

Change-Id: Ie4e9e6bcc48803b195d1615d83d6e36d663cc33a
2015-10-17 14:03:23 -07:00
chaochen ac086d353e Fix for landscape thumbnail images on GLES11RenderEngine
Change-Id: If825345be2c30645c7b87258b7e24d6009f3090a
Signed-off-by: Raj Mamadgi <rmamadgi@sta.samsung.com>
2015-10-17 13:59:32 -07:00
nadlabak 437e236427 Forward port 'Swap volume buttons' (2/3)
[mikeioannina]: Adjust for 5.0 changes

Change-Id: I5ed4ae2b7e69e2ada067ed1d3524b3d3fad30e2e
2015-10-17 13:58:48 -07:00
Ricardo Cerqueira b87c456431 surfaceflinger: Track the last surfaceview frame for latency dumps
When measuring GL latency with dumpsys, it's possible to hit a
race condition if the hardware is fast enough to complete rendering
the test cycle before the latency dump is requested, since it only
matches the latency for live layers (unless it's an animation. See
change I8bded1ea08a4cddefef0aa955401052bb9107c90)

So always save a reference to the last rendered SurfaceView frame,
and dump its values if there isn't an active one.

Change-Id: I740e9830161396ea955b5a53322bd8576b5136bc
2015-10-17 13:58:36 -07:00
Christopher N. Hesse 00888b7eee inputflinger: disable touch input while using a stylus
Android 5.0 cannot form multitouch events from multiple input
devices. So it is not possible to report one touchpoint from the
stylus position and, at the same time, another touchpoint from a
finger touch. Instead, when a new input device starts up the currently
active input is cancelled. This is highly undesirable while writing
with the pen.

The easiest solution is to ignore non-stylus touch events while the
stylus is within range (hovering) of the touchscreen. For example,
N-trig digitizers implement this in hardware. But wacom digitizers do
report pen data simultaneously with touch data. This patch disables
(non-stylus) touch input within 50ms of stylus data. On my Galaxy
Note this is necessary to make stylus input usable.

Original commit by vbraun:
b9cb296130

Change-Id: I97f26369826e96c97461c8ae188f1c64dec1b4d3
2015-10-17 13:56:31 -07:00
Ethan Chen bd33987d72 Add GESTURE_SENSOR input source
Change-Id: If61a7e7bf2d8b2665db7ca57ed68a4462d0c1783
2015-10-17 13:53:53 -07:00
Steve Kondik ac9d8404f1 inputflinger: Add gesture sensor support
Change-Id: Ieca4e54439c47a817aaa6a9b6fabcee750ffc0c2
2015-10-17 13:53:44 -07:00
Steve Kondik ccf7c200ce input: Adjust priority
* Bring into the desired group to get the best result.

Change-Id: I3bd031074cd7006994736b4c22d0294b6012f662
2015-10-17 13:51:11 -07:00
Michael Gernoth 80216f6442 RenderEngine: remove warning "using EGL_IMG_context_priority"
This warning breaks the build as it is treated as an error,
so just remove it.

Change-Id: I1a6353e5960866a9302a8c00eb97d1779b35b6be
2015-10-16 14:46:08 -07:00
Ricardo Cerqueira f4fac7e93f Support forcing all screenshots into a CPU consumer
Looks like a full GPU path is less efficient on some GPU
drivers that we're still using, and CPU is reliably faster...
(there's probably a locking condition going on somewhere, this
needs to be looked into)

Change-Id: I8878796a117d65bf2324507cf8755cadce49f6dc
2015-10-16 14:45:55 -07:00
Pawit Pornkitprasan ff59fbd819 libEGL: allow devices to workaround Google bug 10194508
Most older blobs don't have the EGL_KHR_gl_colorspace
extension and need this workaround.

Change-Id: Ifc5d097c1a0b68275d23c2d191976ac96631b695
2015-10-16 14:45:10 -07:00
Pawit Pornkitprasan fd1fb639a1 Bring back support for glReadPixels screenshot path
Squashed commit of the following:

commit 012d3fe41d1d6cd38a0858b59145e9a4447641fa
Author: Hashcode <hashcode0f@gmail.com>
Date:   Sun Dec 8 19:36:50 2013 +0000

    sf: Always use opengles for screen capture

    Go back to the usage of GRALLOC_USAGE_HW_TEXTURE and GRALLOC_USAGE_HW_RENDERER
    in captureScreenImplLocked regardless of useReadPixels value

    This fixes the EGL_NO_IMAGE_KHR error returned from
    eglCreateImageKHR (blank images returned from screenshot path)

    Change-Id: I62fe90a081607b9e89c67f3dcfd34c84efc89d35

commit 4866ddf98ac98d8e22a1cd6a21894bb17f274588
Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
Date:   Thu Oct 31 03:53:39 2013 +0000

    Revert "remove support for glReadPixels screenshot path"

    This reverts commit 3ca76f416b.

    Conflicts:
    	include/gui/ISurfaceComposer.h
    	libs/gui/ISurfaceComposer.cpp
    	libs/gui/SurfaceComposerClient.cpp
    	services/surfaceflinger/SurfaceFlinger.cpp
    	services/surfaceflinger/SurfaceFlinger.h

    Change-Id: I8c239e533757af770e418dbb198f5a86c736961f

Change-Id: I8c239e533757af770e418dbb198f5a86c736961f
2015-10-16 14:45:10 -07:00
Ethan Chen bcce313fea Revert "egl: Remove old tuna BGRA vs RGBA workaround."
This reverts commit 733a807547.

Change-Id: Ifb41720ed020489892a667914ea3bd3f1ac6504e
2015-10-16 20:20:32 +02:00