OSDN Git Service

android-x86/frameworks-native.git
7 years agoMerge tag 'android-7.0.0_r14' of https://android.googlesource.com/platform/frameworks...
Steve Kondik [Tue, 4 Oct 2016 21:33:41 +0000 (14:33 -0700)]
Merge tag 'android-7.0.0_r14' of https://android.googlesource.com/platform/frameworks/native into cm-14.0

Android 7.0.0 Release 14 (NBD90Z)

7 years agoBuild fix after CAF merge
Sam Mortimer [Fri, 30 Sep 2016 01:58:48 +0000 (18:58 -0700)]
Build fix after CAF merge

Change-Id: I5a7cfbe74d6fecabefb0281b64daa5291d3f728d

7 years agoMerge branch 'android-framework.lnx.2.0.r5-rel' of git://codeaurora.org/platform...
Steve Kondik [Thu, 29 Sep 2016 12:54:51 +0000 (05:54 -0700)]
Merge branch 'android-framework.lnx.2.0.r5-rel' of git://codeaurora.org/platform/frameworks/native into cm-14.0

Change-Id: If54259ac22b3ea895cc923f677103f0282021c4c

7 years agoAdd bound checks to utf16_to_utf8
Sergio Giro [Tue, 28 Jun 2016 17:19:33 +0000 (18:19 +0100)]
Add bound checks to utf16_to_utf8

Bug: 29250543
Change-Id: I518e7b2fe10aaa3f1c1987586a09b1110aff7e1a
(cherry picked from commit 7e93b2ddcb49b5365fbe1dab134ffb38e6f1c719)
(cherry picked from commit 1f4b49e64adf4623eefda503bca61e253597b9bf)

7 years agoMerge 52e03defb53f670ab331a481caf9b0f289b54240 on remote branch
Linux Build Service Account [Thu, 22 Sep 2016 12:15:28 +0000 (05:15 -0700)]
Merge 52e03defb53f670ab331a481caf9b0f289b54240 on remote branch

Change-Id: I7a245210b0e250e45430f85b32f757c0bff49741

7 years agoPromotion of android-framework.lnx.2.0-00009.
Linux Build Service Account [Thu, 15 Sep 2016 09:07:58 +0000 (03:07 -0600)]
Promotion of android-framework.lnx.2.0-00009.

CRs      Change ID                                   Subject
--------------------------------------------------------------------------------------------------------------
1059112   Ib6e1cb8ae279010c5e9960aaa03513f55b7d873b   Region: Detect malicious overflow in unflatten

Change-Id: Id16b593df4cb84d2a8f280b129304a4bbaccb905
CRs-Fixed: 1059112

7 years agosurfaceflinger: writepid to the actual stune mount point
Zhao Wei Liew [Tue, 13 Sep 2016 14:01:11 +0000 (22:01 +0800)]
surfaceflinger: writepid to the actual stune mount point

Seems like AOSP missed these out when switching the schedTune
cgroup mount point from /sys/fs/cgroup/stune/ to /dev/stune/.

Reference commit:
11cde56 Mount schedTune cgroup as /dev/stune

Change-Id: Ifbd9ddcaab0fa2a55433a9a66e9a907b6c242204

7 years agoMerge tag 'android-7.0.0_r6' of https://android.googlesource.com/platform/frameworks...
Steve Kondik [Tue, 13 Sep 2016 16:21:23 +0000 (09:21 -0700)]
Merge tag 'android-7.0.0_r6' of https://android.googlesource.com/platform/frameworks/native into cm-14.0

Android 7.0.0 release 6

Change-Id: I7379a40e1f3d34c1a30e04c449821c23455f38db

7 years agoDO NOT MERGE ANYWHERE: BufferQueue consumers: Add discardFreeBuffer method
Eino-Ville Talvala [Fri, 22 Jul 2016 00:06:58 +0000 (17:06 -0700)]
DO NOT MERGE ANYWHERE: BufferQueue consumers: Add discardFreeBuffer method

This method releases all free buffers owned by the buffer queue,
in order to save memory (at the cost of potential future
reallocation of buffers).

Bug: 28695173
Change-Id: I458d10373e639e3144faf673af2ba01aca36e65a
(cherry picked from commit 8211047138ea7892c73f4e6f6291a85a11759e0c)

7 years agoMerge 0746959b9cf537f6486c9f7651196410a34d1cdb on remote branch
Linux Build Service Account [Mon, 12 Sep 2016 14:38:45 +0000 (08:38 -0600)]
Merge 0746959b9cf537f6486c9f7651196410a34d1cdb on remote branch

Change-Id: Ie0d243ac4d85a4914686c19a1c6581770b73678c

7 years agosurfaceflinger: hwc1: Fix hwrotation
Christopher N. Hesse [Sat, 27 Aug 2016 12:43:40 +0000 (14:43 +0200)]
surfaceflinger: hwc1: Fix hwrotation

Change-Id: I1f8defb108ff944f07ac32e8b147d1d87e7089e0

7 years agoinput: Adjust priority
Steve Kondik [Sun, 20 Sep 2015 11:20:21 +0000 (04:20 -0700)]
input: Adjust priority

 * Bring into the desired group to get the best result.

Change-Id: I3bd031074cd7006994736b4c22d0294b6012f662

7 years agoPromotion of android-framework.lnx.2.0-00007.
Linux Build Service Account [Fri, 9 Sep 2016 06:44:35 +0000 (00:44 -0600)]
Promotion of android-framework.lnx.2.0-00007.

CRs      Change ID                                   Subject
--------------------------------------------------------------------------------------------------------------
1053183   I7c36fdfb9480b156191dd4237432d6b12d113f53   Graphics: Avoid vulkan libs access if vulkan is disabled

Change-Id: I3918b9df763b426a6108bc4e3175ebb19880567b
CRs-Fixed: 1053183

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
(cherry picked from commit 363247929c35104b3e5ee9e637e9dcf579080aee)

7 years agoappops: update index
Raleigh Matlock [Tue, 6 Sep 2016 18:13:11 +0000 (14:13 -0400)]
appops: update index

* This is to match the new number of ops for N

Change-Id: Ibe32dc10fdfca2cddd1894bc04f1bc42923d1051
Signed-off-by: Raleigh Matlock <raleighman2@gmail.com>
7 years agosurfaceflinger: fix missing include
Hashbang173 [Sun, 4 Sep 2016 14:22:12 +0000 (10:22 -0400)]
surfaceflinger: fix missing include

Change-Id: Ie70bb547b3c172e7d11cce4ee23303024323bd90

7 years agosurfaceflinger: Add missing code in opaque check
Arne Coucheron [Mon, 5 Sep 2016 03:57:57 +0000 (05:57 +0200)]
surfaceflinger: Add missing code in opaque check

 * Add back the missing code for non QTI_BSP cases. Without it,
   this whole section is skipped, and horrible black screen flashing
   is seen on QCOM A fam, and probably on other platforms as well.

Change-Id: Ie39de7df4f1276be68aa4b1668e687f7a41b5625

7 years agosurfaceflinger: Enable blur for HWC1
Steve Kondik [Mon, 5 Sep 2016 05:53:15 +0000 (22:53 -0700)]
surfaceflinger: Enable blur for HWC1

 * Apparently there are actually two copies of Surfaceflinger now.

Change-Id: If16e9228bafd272d1542ac6c55b0fb6adb1bff20

7 years agosensor: Skip additional permission request checks
OzzysCmAcc [Sun, 4 Sep 2016 06:53:01 +0000 (08:53 +0200)]
sensor: Skip additional permission request checks

* Some legacy Samsung HALs supporting BODY_SENSOR types are
incompatible with the new permission checks added in M.
Extend the NO_SENSOR_PERMISSION_CHECK flags to cover more
of the actual checks.

Change-Id: I27c87fe9434994ca3fc40dfcb5f4fb44504eb610

7 years agoGraphics: Avoid vulkan libs access if vulkan is disabled
Ananta Kishore K [Thu, 1 Sep 2016 12:58:56 +0000 (18:28 +0530)]
Graphics: Avoid vulkan libs access if vulkan is disabled

Some CTS tests open vulkan libs without checking permission
files. Avoid loading of vulkan libs if vulkan is disabled.

CRs-fixed: 1053183

Change-Id: I7c36fdfb9480b156191dd4237432d6b12d113f53

7 years agosurfaceflinger: Clean up use of QC extended API
Steve Kondik [Mon, 12 Oct 2015 23:44:11 +0000 (13:44 -1000)]
surfaceflinger: Clean up use of QC extended API

gui: only support tertiary display if QTI_BSP is defined

Non-caf display HALs crap out with this

surfaceflinger: Correct QTI_BSP ifdef

* Should be #ifdef, not #if

REF: CRACKLING-938

sf: Fix blending mode for legacy BSP

 * After 0c5f3af, glitches when blending is observed on
   A family devices. Modify ifdef to not include QCOM_BSP_LEGACY.

surfaceflinger: Fix the fix of the opaque check fix

 * Use the right define.

Change-Id: I45deaffc0d5efd8ffa643120b0dea3aab461d70f

7 years agolibgui: Provide M-compatible sensors ABI
Steve Kondik [Fri, 2 Sep 2016 05:10:07 +0000 (22:10 -0700)]
libgui: Provide M-compatible sensors ABI

 * Enable with -DCOMPAT_SENSORS_M

Change-Id: Ia3a37539cec852c59a06c519641a30072749f8dc

7 years agoPromotion of android-framework.lnx.2.0-00005.
Linux Build Service Account [Thu, 1 Sep 2016 17:58:58 +0000 (10:58 -0700)]
Promotion of android-framework.lnx.2.0-00005.

CRs      Change ID                                   Subject
--------------------------------------------------------------------------------------------------------------
1054425   Ic260872aa49faee6d17a84e6177ef94c35ef0d68   media: add OMX extensions for video temporal layering
1019601   I7445c2daf0a8e628af5ef0d4ad31f5346dc09988   SF: pass animation presence info to HWC

Change-Id: I7f26c1b5d9e925722b98c5cdfcbce4cdab7f26aa
CRs-Fixed: 10544251019601

7 years agonative: Use project pathmap
Steve Kondik [Mon, 12 Oct 2015 23:00:01 +0000 (13:00 -1000)]
native: Use project pathmap

Change-Id: I81752c2c433752c02ab2a922f974f363e10d8def

7 years agoSupport forcing all screenshots into a CPU consumer
Ricardo Cerqueira [Sat, 26 Oct 2013 02:43:03 +0000 (03:43 +0100)]
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

7 years agoBring back support for glReadPixels screenshot path
Pawit Pornkitprasan [Tue, 18 Nov 2014 01:38:33 +0000 (08:38 +0700)]
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 3ca76f416bc8665a97636ca8a2d0128b9da9d92c.

    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

7 years agosurfaceflinger: odd hw rotation (90/270) patch for swapping width/height
Hashcode [Tue, 11 Dec 2012 00:33:53 +0000 (16:33 -0800)]
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:
https://github.com/CyanogenMod/android_frameworks_native/commit/7d283431efffc4402cb1a6cacf5da64729c883bb

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

7 years agolibbinder: allow devices to disable ashmem size tracking
Simon Shields [Thu, 3 Dec 2015 09:34:15 +0000 (20:34 +1100)]
libbinder: allow devices to disable ashmem size tracking

The addition of ashmem size tracking has resulted in a broken ABI
for old blobs.

Change-Id: Ife8514be1ba639c4061de38b59794c46bcc2d7f8

7 years agosurfaceflinger: blur compilation fixes
Chirayu Desai [Fri, 26 Aug 2016 19:32:26 +0000 (01:02 +0530)]
surfaceflinger: blur compilation fixes

Change-Id: I21308b00ad951991e6c38f2bb5284fc30c454c5b

7 years agoSurfaceFlinger: Native changes to add blur effect
Steve Kondik [Sat, 6 Dec 2014 02:28:32 +0000 (18:28 -0800)]
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

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

surfaceflinger: Cleanups for blur

 * Dynamically load it so no direct linkage or headers are required.

Change-Id: I4eba035f527ae4f0fa2485e24a8586145baf0adc

surfaceflinger: Fix uninitialized variable

 * And don't try to reinit the lib after a failure.

Change-Id: Ic055a48670ed8cf01e27b16c5d4ddf214db53d20

7 years agosurfaceflinger: Add support for secondary color matrix
Steve Kondik [Tue, 12 Apr 2016 20:14:26 +0000 (13:14 -0700)]
surfaceflinger: Add support for secondary color matrix

 * Add a new binder transaction for applying a secondary color matrix
   using RenderEngine. This stacks with the primary color matrix
   (if set for a11y) to enable GPU-based display calibration.

Change-Id: I766455bfb5212e2dcc8ad0cb8ebdddbda87af732

7 years agoFix xxhdpi 3072 heap sizes
Abhisek Devkota [Wed, 17 Aug 2016 16:04:42 +0000 (09:04 -0700)]
Fix xxhdpi 3072 heap sizes

Bootloops on r7 with current values

Fix for 94774ac01d1953bcc7a70a7018267ee34793d3f7

Change-Id: I248a9375735a261715668494da0d0ab5a6440d42

7 years agoFix xxxhdpi 3072 heap sizes
Abhisek Devkota [Wed, 17 Aug 2016 16:04:42 +0000 (09:04 -0700)]
Fix xxxhdpi 3072 heap sizes

Bootloops on shamu with current values

Fix for 94774ac01d1953bcc7a70a7018267ee34793d3f7

Change-Id: Iade253bd8bc5074486d2d69bb9c738844615b08d

7 years agodalvik: rework 3 and 4-GB dalvik heap configurations
Alex Naidis [Mon, 15 Aug 2016 01:48:27 +0000 (21:48 -0400)]
dalvik: rework 3 and 4-GB dalvik heap configurations

The previous configuration sets target utilization as .25, which is geared towards
low memory devices. This path increases it to .75 and makes us pass the check:
(heaptargetutilization / 2) * heapsize = heapgrowthlimit

Example:
heapgrowthlimit: 256m
heapsize: 512m
heaptargetutilization: 0.75
0.75/2 * 512 = 192

To pass the check this has to be true:

192 = 256 (WRONG)

Check not passed.

This new configuration is optimized for higher RAM devices and passes the check:

heapgrowthlimit: 384m
heapsize: 1024m
heaptargetutilization: 0.75

0.75/2 * 1024 = 384

384 = 384 (TRUE)

Check passed.

Change-Id: I6839339382229da80546761c3746a032081ff2cd
Signed-off-by: Alex Naidis <alex.naidis@linux.com>
7 years agoAdd dalvik heap/hwui overrides for xxxhdpi phone with 4096MB RAM
Louis Popi [Wed, 4 May 2016 18:17:24 +0000 (20:17 +0200)]
Add dalvik heap/hwui overrides for xxxhdpi phone with 4096MB RAM

Change-Id: I8e7bd9b520c20e0cd07c9b17d74e4ae79f2769b4

7 years agoAdd dalvik heap/hwui overrides for xxhdpi phone with 3072MB RAM
Louis Popi [Wed, 11 May 2016 20:48:52 +0000 (22:48 +0200)]
Add dalvik heap/hwui overrides for xxhdpi phone with 3072MB RAM

Change-Id: I0ebf2033341e8f09004c1e2dec5f4438aa52e5dc

7 years agonative: Restore VM memory overrides
Diogo Ferreira [Sun, 9 Nov 2014 16:16:41 +0000 (16:16 +0000)]
native: Restore VM memory overrides

This change adds back the property overrides for several device
types as we had in CM 11.

It contains a squished commit of the following:

commit 5b9240927f8af0b26c406835df33b2d999496434
Author: Steve Kondik <shade@chemlab.org>
Date:   Thu Nov 6 14:40:44 2014 -0800

    Add hdpi-2048 tunings

commit ed579d8be17fb52ef92a1dc9c83843879f396fa1
Author: Steve Kondik <shade@chemlab.org>
Date:   Sat Jan 4 12:12:00 2014 -0800

    Update HWUI config for xxhdpi/2GB devices

commit 386f220e174f9ed5aad487867223033fd5d986c6
Author: Steve Kondik <shade@chemlab.org>
Date:   Tue Aug 6 02:53:19 2013 -0700

    hwui: Update configuration for 2GB/1080p devices

commit b7392d113d8ae6c3c07990bbb3f2621bef490d11
Author: Steve Kondik <shade@chemlab.org>
Date:   Sat Jun 1 14:51:17 2013 +0200

    provide overrides for hwui memory limits for xxhdpi phones

commit 247b3c635b1d6776ffedf3cd61a936546c2f6603
Author: Steve Kondik <shade@chemlab.org>
Date:   Fri May 17 13:10:19 2013 -0700

    Add heap configuration for 1080p phones with 2048m

     * Increase heap start size to 16m to minimize GC with larger bitmaps

commit 9856e93970fd6def1349e564f17d42f505904eba
Author: Andrew Bartholomew <andrewb03@gmail.com>
Date:   Thu Apr 25 13:48:21 2013 -0400

    build/phone-xhdpi-1024-dalvik-heap.mk Revert AOSP heapgrowthlimit change from 64 to 96

    This reverts part of AOSP change at

    https://android.googlesource.com/platform/frameworks/native/+/c84e9844d621223d14178be521

    Possible performance issues have arisen because of it. Discussion at

    http://code.google.com/p/android/issues/detail?id=40961

    Patch Set 2: Clean up commit message

commit bd7fb4be323f6f868a886b22e93cf203944af9a6
Author: Bhargav Upperla <bhargavuln@codeaurora.org>
Date:   Thu May 23 12:50:15 2013 -0700

    Configure dalvik heap parameters for low memory devices

    Reduces after boot memory footprint by about 5-8MB
    Note: This is for low memory based devices only (~512MB RAM
    or less)

Change-Id: Id7e1967d18227359ad9631139bfd47e61e494829

7 years agoAdd dalvik heap override for xxxhdpi phone
bmc08gt [Fri, 20 Mar 2015 14:19:19 +0000 (15:19 +0100)]
Add dalvik heap override for xxxhdpi phone

Change-Id: Ib2649f55327775bbd4d94012952b4301536391ed
Signed-off-by: bmc08gt <brandon.mcansh@gmail.com>
7 years agoAdd HWUI overrides for xxxhdpi phone
bmc08gt [Fri, 20 Mar 2015 14:14:07 +0000 (15:14 +0100)]
Add HWUI overrides for xxxhdpi phone

Change-Id: I4393ef0a5f6f1e9775b5d40b094da3f74ed3ae35
Signed-off-by: bmc08gt <brandon.mcansh@gmail.com>
7 years agodumpstate: add CM version to output
Scott Mertz [Wed, 25 May 2016 22:50:02 +0000 (15:50 -0700)]
dumpstate: add CM version to output

Change-Id: Ibd804872d7d32ac1d26efaf30927a2359d2da287

7 years agoFixed stylus eraser being rejected by palm rejection
FPtje [Thu, 4 Aug 2016 01:37:46 +0000 (20:37 -0500)]
Fixed stylus eraser being rejected by palm rejection

The stylus eraser appeared not to work, i.e. Android did not respond to
input from the eraser. It turned out that all input except stylus input
is rejected when palm rejection is activated. The problem was that the
eraser itself activates palm rejection when it hovers. The solution is
to allow the eraser during palm rejection. This solution makes sense
because the eraser input works in the exact same way as normal stylus
input.

Change-Id: I9c7451112ce7dbca14a1e1694eedca2d4ed041a1

7 years agosensor: Allow devices to skip the permission request
Christopher N. Hesse [Sat, 28 Nov 2015 23:39:51 +0000 (00:39 +0100)]
sensor: Allow devices to skip the permission request

This is needed by Samsung devices with pre-M sensor
blobs which have support for SENSOR_TYPE_HEART_RATE
or body sensors in general.
These HALs somehow segfault on the flagged code.

Change-Id: I698f4129e71b683f6f063f00da79f32a5f521149

7 years agolibgui: Don't assign handle to NULL after free is common
Caio Schnepper [Wed, 25 Nov 2015 19:51:30 +0000 (17:51 -0200)]
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

7 years agolibgui: Don't assign handle to NULL after free
Caio Schnepper [Mon, 23 Nov 2015 20:39:58 +0000 (18:39 -0200)]
libgui: Don't assign handle to NULL after free

This reverts c784dfc39fa1471b0f653206970ac9a256269256 for exynos4 devices
with Mali 400 GPUs, which causes a fatal signal (SIGSEGV) and death of
the graphics subsystem

Change-Id: I6dbf8f8664fca01baf63fece7c64016609fe3e1c

7 years agosurfaceflinger: Reimplement hwrotation
Ricardo Cerqueira [Sat, 24 Nov 2012 23:11:49 +0000 (23:11 +0000)]
surfaceflinger: Reimplement hwrotation

Change-Id: Ia26bb36b5b6de132af49c272c4472ad2703afbda

Fix boot animation rotation problem when ro.sf.hwrotation is set to 90 or 270

Change-Id: I7ad3c83e23ce38280818ec5283d173d50c889531

sf: Only apply hwrotation to primary displays

Change-Id: Ib51030cec5ce7609f12be9a5e46310f75442b680

7 years agoupdate app ops
Roman Birg [Mon, 2 Nov 2015 17:45:05 +0000 (09:45 -0800)]
update app ops

Change-Id: Id189866c1868e6340b1b01ca94c06983fbcc242d
Signed-off-by: Roman Birg <roman@cyngn.com>
7 years agonative: dock battery
Jorge Ruesga [Sat, 27 Jun 2015 23:12:46 +0000 (01:12 +0200)]
native: dock battery

Change-Id: I23eadf0361cbe25029b95dbd022ce1a2cc96e94d
Require: topic:dock_battery
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
7 years agoSupport WAKE flag in keyboard layouts
nadlabak [Thu, 16 Apr 2015 22:55:53 +0000 (00:55 +0200)]
Support WAKE flag in keyboard layouts

This flag is used to specify the internal keyboard keys allowed
to wake the device.

Change-Id: Ic15aca1134206c9b006a4d97dded10bccae640d3

7 years agoinput: Add option to toggle pointer icon when using stylus(3/3)
Steve Kondik [Mon, 2 Feb 2015 04:40:19 +0000 (23:40 -0500)]
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

7 years agoFix for landscape thumbnail images on GLES11RenderEngine
chaochen [Thu, 20 Nov 2014 01:14:00 +0000 (17:14 -0800)]
Fix for landscape thumbnail images on GLES11RenderEngine

Change-Id: If825345be2c30645c7b87258b7e24d6009f3090a
Signed-off-by: Raj Mamadgi <rmamadgi@sta.samsung.com>
7 years agoForward port 'Swap volume buttons' (2/3)
nadlabak [Sat, 20 Dec 2014 22:10:54 +0000 (00:10 +0200)]
Forward port 'Swap volume buttons' (2/3)

[mikeioannina]: Adjust for 5.0 changes

Change-Id: I5ed4ae2b7e69e2ada067ed1d3524b3d3fad30e2e

7 years agoinputflinger: disable touch input while using a stylus
Christopher N. Hesse [Fri, 5 Dec 2014 20:38:51 +0000 (21:38 +0100)]
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:
https://github.com/CyanogenMod/android_frameworks_base/commit/b9cb2961309c829586ae24ce432bb1fdb5610ba6

Change-Id: I97f26369826e96c97461c8ae188f1c64dec1b4d3

7 years agoAdd GESTURE_SENSOR input source
Ethan Chen [Tue, 8 Oct 2013 22:07:21 +0000 (15:07 -0700)]
Add GESTURE_SENSOR input source

Change-Id: If61a7e7bf2d8b2665db7ca57ed68a4462d0c1783

7 years agoinputflinger: Add gesture sensor support
Steve Kondik [Wed, 19 Nov 2014 09:22:14 +0000 (01:22 -0800)]
inputflinger: Add gesture sensor support

Change-Id: Ieca4e54439c47a817aaa6a9b6fabcee750ffc0c2

7 years agoRenderEngine: remove warning "using EGL_IMG_context_priority"
Michael Gernoth [Tue, 13 Oct 2015 19:08:19 +0000 (21:08 +0200)]
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

7 years agolibEGL: allow devices to workaround Google bug 10194508
Pawit Pornkitprasan [Sun, 3 Nov 2013 06:02:15 +0000 (23:02 -0700)]
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

7 years agoRevert "egl: Remove old tuna BGRA vs RGBA workaround."
Ethan Chen [Thu, 15 Oct 2015 20:50:10 +0000 (13:50 -0700)]
Revert "egl: Remove old tuna BGRA vs RGBA workaround."

This reverts commit 733a80754786d39cdc0fee09509b194472c320bc.

Change-Id: Ifb41720ed020489892a667914ea3bd3f1ac6504e

7 years agoexynos4: getphys implementation on buffermanager for samsung omx
Ricardo Cerqueira [Sun, 3 Nov 2013 03:06:55 +0000 (03:06 +0000)]
exynos4: getphys implementation on buffermanager for samsung omx

Change-Id: I73d9633e1a7b3316ede28dd1369f8f069609cbb0

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 agoServiceManager: Restore basic uid check
Arve Hjønnevåg [Mon, 1 Aug 2016 23:05:17 +0000 (16:05 -0700)]
ServiceManager: Restore basic uid check

Prevent apps from registering services without relying on selinux checks.

Bug: 29431260

Change-Id: I38c6e8bc7f7cba1cbd3568e8fed1ae7ac2054a9b
(cherry picked from commit 2b74d2c1d2a2c1bb6e9c420f7e9b339ba2a95179)

7 years agomerge in nyc-bugfix-release history after reset to nyc-dev
gitbuildkicker [Thu, 1 Sep 2016 04:58:33 +0000 (21:58 -0700)]
merge in nyc-bugfix-release history after reset to nyc-dev

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 agoServiceManager: Restore basic uid check
Arve Hjønnevåg [Mon, 1 Aug 2016 23:05:17 +0000 (16:05 -0700)]
ServiceManager: Restore basic uid check

Prevent apps from registering services without relying on selinux checks.

Bug: 29431260

Change-Id: I38c6e8bc7f7cba1cbd3568e8fed1ae7ac2054a9b
(cherry picked from commit 2b74d2c1d2a2c1bb6e9c420f7e9b339ba2a95179)

7 years agomedia: add OMX extensions for video temporal layering
Praveen Chavan [Fri, 25 Mar 2016 08:17:32 +0000 (01:17 -0700)]
media: add OMX extensions for video temporal layering

Add static/dynamic configuration structures to setup/tune
video encoder for temporal layering.

Bug: 27596987
Change-Id: Ic260872aa49faee6d17a84e6177ef94c35ef0d68

7 years agoSF: pass animation presence info to HWC
Ray Zhang [Fri, 5 Aug 2016 14:00:08 +0000 (22:00 +0800)]
SF: pass animation presence info to HWC

Sometimes HWC needs to know whether there are animation layers
in composition. E.g., S3D needs to disable when there is screen
shot layer because it cannot correctly compose it as S3D format.
So always pass this kind of info to HWC no matter whether the
disable external animation property is set.

CRs-fixed: 1019601

Change-Id: I7445c2daf0a8e628af5ef0d4ad31f5346dc09988

7 years agoPromotion of android-framework.lnx.2.0-00002.
Linux Build Service Account [Sun, 28 Aug 2016 08:26:51 +0000 (01:26 -0700)]
Promotion of android-framework.lnx.2.0-00002.

CRs      Change ID                                   Subject
--------------------------------------------------------------------------------------------------------------
1035464   Ifd718eb0006f7194c0fd29b89094e733b241ad02   SF: Add QTI_S3D macro to enable/disable S3D GPU composti
1035464 999055   I536fa4a03e246d51891045b692d5dc5be88f2adf   SF: Add support to draw S3D framebuffer target

Change-Id: I9434e13b86af405e5ec542f7875e8c0163e4c761
CRs-Fixed: 1035464, 999055

7 years agoSF: Add QTI_S3D macro to enable/disable S3D GPU compostiton
Ray Zhang [Tue, 23 Aug 2016 08:47:39 +0000 (16:47 +0800)]
SF: Add QTI_S3D macro to enable/disable S3D GPU compostiton

S3D GPU compostion only supported on SDM platform, add QTI_S3D
macro to disable S3D GPU compostion on Non-SDM platform.

Change-Id: Ifd718eb0006f7194c0fd29b89094e733b241ad02

7 years agoSF: Add support to draw S3D framebuffer target
feifanz [Wed, 27 Apr 2016 04:23:28 +0000 (12:23 +0800)]
SF: Add support to draw S3D framebuffer target

Add support to draw S3D framebuffer target in case HWC driver
can not handle due to resource or capability issue.

CRs-fixed: 999055
Change-Id: I536fa4a03e246d51891045b692d5dc5be88f2adf

7 years agosurfaceflinger: Flip the sourceCrop for inverse mounted panel.
Namit Solanki [Wed, 13 Jul 2016 10:28:32 +0000 (15:58 +0530)]
surfaceflinger: Flip the sourceCrop for inverse mounted panel.

- Flip the sourceCrop for inverse mounted panel when
screenshot is taken for WindowManagerService

Change-Id: I08bb7e0feea69dd15b372e9fbbd6984c6bfbec46
CRs-Fixed: 1033965

7 years agosf : Fix vertices & texture coordinates computation.
Pullakavi Srinivas [Thu, 21 Jul 2016 11:33:52 +0000 (17:03 +0530)]
sf : Fix vertices & texture coordinates computation.

Compute crop and display frame for GPU composition also
in the same way it's done for HWC and compute vertices
and texture coordinates for GPU composition. This avoids
pixel shifts in output of GPU composition & overlays.

Change-Id: Ia4c649ef236f5684fb76ff1b4b802a9d01c1da0c

7 years agosurfaceflinger: Validate LayerListIterator before accessing it.
Namit Solanki [Thu, 28 Jul 2016 14:00:52 +0000 (19:30 +0530)]
surfaceflinger: Validate LayerListIterator before accessing it.

- Check LayerListIterator for NULL before dereferencing it.

Change-Id: I299ee94ef264280aca991e1e574b998b4b58951e
CRs-Fixed: 1039837

7 years agosurfaceflinger: Add check for number of queued buffers
Anjaneya Prasad Musunuri [Tue, 5 Jul 2016 05:05:59 +0000 (10:35 +0530)]
surfaceflinger: Add check for number of queued buffers

Pop buffer item from shadow queue only when
number of queued buffer items is greater than zero.

Change-Id: I039bc133842293c29e3e130efd65f521ef0049c6
CRs-Fixed: 1009466

7 years agosurfaceflinger: Exclude video encoder usage for scratch buffer
Anjaneya Prasad Musunuri [Sat, 11 Jun 2016 07:00:35 +0000 (12:30 +0530)]
surfaceflinger: Exclude video encoder usage for scratch buffer

Sink and Scratch buffers in VDS are using same usage flags.
This causes video encoder flag to be set for scratch
buffers Also. Exclude video encoder flag from scratch
buffer usage flags as scratch buffers are used only as
write back input and not video encoder input.

Change-Id: I7763efd155a1ec4c550680c9a07e4a934b52dfe4
CRs-Fixed: 1008906

7 years agoSurfaceFlinger: Add support to set RGBA color on Dim Layer
Sushil Chauhan [Mon, 25 Jul 2016 23:24:55 +0000 (16:24 -0700)]
SurfaceFlinger: Add support to set RGBA color on Dim Layer

SF client can set RGBA color on Dim Layer. Black is default color.

CRs-Fixed: 1047307
Change-Id: I74d3b14b365a9ac8aaf2ecbf906ba00711643f53

7 years agosurfaceflinger: Use only one EventThread when phase offsets are same
Omprakash Dhyade [Tue, 21 Jun 2016 13:22:23 +0000 (18:52 +0530)]
surfaceflinger: Use only one EventThread when phase offsets are same

SurfaceFlinger uses two event-threads to support phase-offsets
for application and SurfaceFlinger itself. Extra thread may
cause scheduling issues and wake-up latency for either
SurfaceFlinger or Application, depending on scheduling, even
when running at higher priority as these threads have low-load
and qualify for task-packing.
Use single event-thread when phase offsets are same.
Debug runtime service call behavior change when same phase-offset:
1018 (set phase offset for Application): will change both
Application and SurfaceFlinger phase offsets.
1019 (set phase offset for SurfaceFlinger): Will be a no-op.

Change-Id: I2514b4ff6249e9bce3eb19f60b1dfe0de12b86d9

7 years agosf: Make sure HWC_BLENDING_NONE is set for opaque layer
radhakrishna [Wed, 29 Jun 2016 07:31:16 +0000 (13:01 +0530)]
sf: Make sure HWC_BLENDING_NONE is set for opaque layer

Before configuring the layers to HWC, make sure
HWC_BLENDING_NONE is set if the layer is opaque

Change-Id: Ie84aa9d93e98a244692a0cffc2de653a9079f8b4
Crs-fixed: 957373

7 years agosf: Change log message in layer query method from ALOGE to ALOGW
Pullakavi Srinivas [Tue, 21 Jun 2016 12:35:44 +0000 (18:05 +0530)]
sf: Change log message in layer query method from ALOGE to ALOGW

This error can be seen for the following use case
1. Connect HDMI display
2. Dump the SurfaceFlinger state
The problem here is that HWComposer would have processed the display
connection event via the hotplug mechanism and considers that the
external display is connected. However, SurfaceFlinger has not
updated its internal state (mDisplays) since it will be waiting for
the mStateLock to be release by the dump function. As a result, when
the dump function invokes the getLayerSortedByZForHwcDisplay for the
external display, we will end up seeing the error log message because
SurfaceFlingers internal state has not yet been updated.
We can move this to ALOGW since it is a non-fatal/recoverable state.
CRs-Fixed: 914173

Change-Id: Ib0ba359ecd894dd463417ba57ba1f72c07b5833e

7 years agosurfaceflinger: Point to new display HAL path
Bikshapathi Kothapeta [Thu, 21 Jul 2016 11:03:48 +0000 (16:33 +0530)]
surfaceflinger: Point to new display HAL path

Change-Id: I28b16dc0deaef0574def585334530a1ccda049be

7 years agoThis is a combination of two commits
Dileep Marchya [Fri, 8 Jul 2016 13:11:17 +0000 (18:41 +0530)]
This is a combination of two commits

sf: Correcting hardware acceleration for WFD

Hardware acceleration Virtual display debug property
implementation is updated for WFD cases

Change-Id: I61ad578919c034df3b7d7028925f2201b4131f24

surfaceflinger: Use /sys/class/graphics/fb* path for fb node access.

- /dev/graphics/fb* and /sys/class/graphics/fb* path do not have
  symbolic relation. /dev/graphics/fb* is deprecated. Accessing this
  path results in unpredictable behaviour.

CRs-Fixed: 1037552

Change-Id: I56cd8ea33153183ae93638153bb2fd6a9becdac0

7 years agosf: Do not allow hardware acceleration for VDS
Manoj Kumar AVM [Fri, 10 Jun 2016 15:10:35 +0000 (08:10 -0700)]
sf: Do not allow hardware acceleration for VDS

Do not allow hardware acceleration for Virtual display if Platform
doesn't support writeback.

CRs-Fixed: 1031674
Change-Id: I343ae97adc552b6f2f8c08967f5768babb4abd70

7 years agosf: Allow hardware acceleration of VDS
Manoj Kumar AVM [Wed, 8 Jun 2016 19:43:47 +0000 (12:43 -0700)]
sf: Allow hardware acceleration of VDS

Allow hardware acceleration of VDS if debug.vds.allow_hwc is
set to true for debugging purposes.

CRs-Fixed: 1027244
Change-Id: I12710349b1e74d419f9e0216bf29e70201fe20e6

7 years agoSurfaceFlinger: Add support for MDP3
Baldev Sahu [Fri, 17 Jul 2015 04:34:43 +0000 (10:04 +0530)]
SurfaceFlinger: Add support for MDP3

This change is porting of following commits related to MDP3

1) SurfaceFlinger: Change to support framebuffer flip for 2D blitters
- Surfaceflinger does not flip framebuffers when there are
  no layers marked for HWC_FRAMEBUFFER
- This change checks for the HWC_BLIT flag and will request a flip
  to a new FB_TARGET buffer even if there are no FRAMEBUFFER layers

  "Change-Id: I1cb44389a05c9ec049d7f0d39c288feccb11a91c"

2) SF: Avoid wormhole clear for BLIT calls
- Do not call GPU clear from SF when composition
  type is BLIT as it'll be taken care in HAL.

  "Change-Id: Ia613eb9b824c6484ecc8c8fa4ee883545d8541b8"

3) surfaceflinger: Allow gpu to render widevine level3
- Allow gpu to render widevine level3 but keep
  blocking screen shots.

  "Change-Id: I914232a062acbb7b17901dbf2b414973230e59d9"

4) surfaceflinger: Do not allow gpu to render widevine for screen shot or
   screen record
- In MDP3 we are using the widevine level3 for secure  content display.
  And this should applicable only for primary display not for screen shot
  or screen recording.

  "Change-Id: I99be2d81287ab746d5c4a2375c3106c59e61a8fc"
  CRs-Fixed: 595469

Change-Id: I35eef9eb1597af21c195e07d5fe4c0c73ab3a269

7 years agoSurfaceFlinger: Add support for continuous dumpsys to file.
Dileep Marchya [Thu, 3 Dec 2015 22:39:35 +0000 (14:39 -0800)]
SurfaceFlinger: Add support for continuous dumpsys to file.

- Collect dumpsys to an outfile file when triggered.
- Collect dumpsys before calling Prepare on hwc module in
  each draw cycle. Recollect dumpsys if Commit goes through
  successfully and replace former dumpsys with this.
- Wrap around if file size reaches appx 20 MB.
- Generate output file at /data/misc/display/dumpsys.txt
- Syntax:
      adb shell dumpsys SurfaceFlinger --file [--no-limit]
          --file : Ouput dumpsys to file
          --no-limit : Do not wrap around, keep appending

      Use same command to trigger start and end of dumping.
- Output format:
      | start code | after commit? | time stamp | dump size | dump data |

CRs-Fixed: 947084

Change-Id: Ie520f51c69757aeec88b9400688a7f3271472349

7 years agosf: vds: Avoid HWC for certain scenarios
Manoj Kumar AVM [Fri, 2 Oct 2015 21:53:50 +0000 (14:53 -0700)]
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

7 years agoSurfaceFlinger: Add support for V4L2 based wfd solution.
Baldev Sahu [Wed, 12 Aug 2015 10:55:05 +0000 (16:25 +0530)]
SurfaceFlinger: Add support for V4L2 based wfd solution.

This change add support for V4L2 based Wi-Fi display.

Change-Id: Ib3f3868eb0b7fa2bf7e58246fb2c5cd0ddceb7e1

7 years agoSurfaceFlinger: Combine SF Refactor changes
Raj Kamal [Tue, 23 Jun 2015 19:55:15 +0000 (12:55 -0700)]
SurfaceFlinger: Combine SF Refactor changes

The following commits are included in this:

SurfaceFlinger: Add support for DisplayUtils

Add DisplayUtils class which uses the custom implementations
of ExLayer, ExSurfaceFlinger, ExHWComposer,
and ExVirtualDisplaySurface classes if needed

Change-Id: Ibdd8da5d3d0d602f42b76a15d0994c6aa98bee3f

SurfaceFlinger: Move Extended SF classes to same repository

Move the ExSurfaceFlinger, ExLayer, etc., classes to this
repository, to avoid dependency accross projects with static
linking

commit 04f501b31f627e47ae540b5160b2f86b7adbd921
Author: Baldev Sahu <bsahu@codeaurora.org>
Date:   Wed Nov 25 18:05:51 2015 +0530

display-fw: Properly initialise mIsGPUAllowedForProtected flag

- This flag need to be initialize to false when layer is
  created.

Change-Id: Ie3df40ffc4240c33883f19ecbef6428f7c539b07
CRs-fixed: 942102

commit 09032188751356db295bc5467133ec484dc536cd
Author: Arun Kumar K.R <akumarkr@codeaurora.org>
Date:   Tue Oct 20 10:22:51 2015 -0700

display-fw: Enable checking for INTERNAL_ONLY private flag

Check for INTERNAL_ONLY private flag and return correct values
from the function isIntOnly

Change-Id: I61b44f636412e0ad93e1b3ff18e4accdf90eeafe
CRs-fixed: 927880

commit f687ac25b3482b92da3c252d29b65e850cca3ce1
Author: Arun Kumar K.R <akumarkr@codeaurora.org>
Date:   Thu Oct 15 16:37:11 2015 -0700

display-frameworks: Include libqdutils
only for target builds

Featurize including libqdutils for targets which uses QCOM_BSP,
helps in resolving compilation for emulator builds

Change-Id: I39639c3100eb20dd24d2a875bb0e9bc82d2b2d1f

commit 4ec765e01be506a8083980fc746a1737bbac4bf2
Author: Arun Kumar K.R <akumarkr@codeaurora.org>
Date:   Wed Oct 7 18:33:34 2015 -0700

display-fw: Disable rotation animation on secondary displays

- Set the animating flag on layer during animation which is used
  as hint to disable rotation animation on secondary displays.
- Set sys.disable_ext_animation to enable the feature
- Remove unused definitions in the extended hwc header

Change-Id: I7b72c7b605930ea189e047fec17ed18b17d46fdf
CRs-fixed: 922304

commit 6998bbdfd7af3126b64897b16b6961e84952601b
Author: Baldev Sahu <bsahu@codeaurora.org>
Date:   Thu Jul 30 16:01:15 2015 +0530

display-frameworks: Extend support for MDP3

- Add support for HWC_BLIT
- Allow GPU to compose widevine level 3

Change-Id:I11e03ccd0842d019e85d0c29bc5b7be559fccbaa

commit 2fa7aa1684c0162b8226c4327c86c6eaf6b76101
Author: Manoj Kumar <manoj@codeaurora.org>
Date:   Thu Aug 20 13:52:15 2015 -0700

display-frameworks: Override mOutputUsage with sink Usage flags

mOutputUsage flags contain default usage flags and doesnt reflect
sink usage flags. Override mOutputUsage with sink usage flags.

This change is needed to support WFD Secure usecase.

Change-Id: I14d8812049f635a8ebe6a944783e0ec7f8f80b1f

commit 09da768794c8c6acd786d73239ed5a739695b8cb
Author: Raj Kamal <rkamal@codeaurora.org>
Date:   Mon Jul 20 10:46:27 2015 +0530

display-frameworks: Extend the classes defined in SF

Add support for custom classes ExSurfaceFlinger,
ExLayer, ExHWComposer and ExVirtualDisplaySurface

Change-Id: Iab8c4835faaad9b436bbd34d38702741eb0cf12d

Change-Id: Ie400c94ccc77fc379ffa256af03a9e42ba5decaa

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

CRs-fixed: 922304
Change-Id: Iac462778ce5fb9016290846146e62f80dcfafd5c

sf: ex-sf: Remove screenshot surface from secondary displays

- When rotation animation is disabled on secondary displays, remove
  the screenshot surface from the secondary display list, without
  this it would show up upside down frame on secondary.
- Mark IntOnly layers as invisible on secondary displays.

Change-Id: Ia859ee1c6ac7caa132c95e4f906bd2589e786fac
CRs-fixed: 949263

sf: Clear visible region of layer appropriately.

Clear visible region of layer having layer stack id different than
the display layer stack id to ensure that the layer won't be present
on the wrong display layer list.

Change-Id: I59289fea63ec7a2451d4715cfe7926ba34fdb8e3

Change-Id: Ib7ef7ce9ae68ae2246c1c9bfbce342d9b5d06621

7 years agolibgui : Fix copyback dirty region
Omprakash Dhyade [Fri, 10 Aug 2012 02:00:37 +0000 (19:00 -0700)]
libgui : Fix  copyback dirty region

This is a combination of 2 commits.

fix copy back dirty region

Copyback dirty region logic does copyback,
even when its not necessary causing 2ms delay.
Fix the logic to copy back only what is necessary

CRs-fixed: 562334
Change-Id: I52de68258ac9f87d704ee5401f93417805fa6773

libgui: Copyback all region except dirty region

Inside Surface::lock if new buffer is allocated
and DirtyRegion does not cover complete buffer
bounds then copyback may not cover all remaining area
as it copyback only area covered by dirty regions
from other buffers. This will lead to left out
black area which may cause flicker.

Change-Id: I4a3f7a56fc5fbaf4af926584919577d8d34bed57

Change-Id: I4a3f7a56fc5fbaf4af926584919577d8d34bed5f

7 years agoSurfaceFlinger: Support get/set ActiveConfigs
Tatenda Chipeperekwa [Mon, 22 Sep 2014 23:57:24 +0000 (16:57 -0700)]
SurfaceFlinger: Support get/set ActiveConfigs

This includes the following two changes squashed into one and
retaining the change I182f41edbaf9226fc62d6d17ee964998cd9f21f7

sf: Fixes for resolution change in SurfaceFlinger

1. Use active config from HWC when querying display attributes

   When we query the display attributes we should use the active
   config as reported by HWC in cases where HWC version is 1.4.
   In all other cases we should revert to the default config,
   config 0, as the active config.

2. Set/update the display config if HWC config change was successful

   The new config should only be applied if HWC succeeded in changing
   the active config. This would otherwise cause failure or undefined
   behavior if the client sets an invalid/unsupported display config.

3. Set the active config at display creation time

   When a new display device is added update the active config by
   querying HWC.

   Change-Id: I182f41edbaf9226fc62d6d17ee964998cd9f21f7

sf: Initialize active config for non-virtual displays at boot time

When a non-virtual display device is added at boot time, update the
active config by querying HWC otherwise the default config (config 0)
will be used.

    Change-Id: I90f42fa1d20ed6176c4be464a10ae69a2f6a6d55

Change-Id: I182f41edbaf9226fc62d6d17ee964998cd9f21f7

7 years agoSF : Add support for rotated panel mounts
Prabhanjan Kandula [Thu, 6 Nov 2014 12:28:04 +0000 (17:58 +0530)]
SF : Add support for rotated panel mounts

This is a combination of 2 commits.

SF: Add support for inverse mounted panels

Add 180 rotation in SF to account for inverse mounted panels.
The framework will be unaffected and use policies for a 0 mounted
panel. SF changes the global transform and silently induces the H,V
flips. Similar flips are added to screenshots as well.

Change-Id: I6e9576ee734ee85097491eaa1e8e94cfb3731e0f

SF: Add support for all flips of panel mount

Add support for all flips of panel mount, H, V, HV (180). Property
persist.panel.mountflip can be set to 1 for H-Flip, 2 for V-Flip,
3 for HV-Flip (180 / inverse mount).

Change-Id: Ide7b8378ad6a423e5d7335fedc27d480a25b53ae
CRs-fixed: 990622

Change-Id: Ide7b8378ad6a423e5d7335fedc27d480a25b53af

7 years agoSurfaceFlinger: Add dim layer information into HWC layer.
Dileep Marchya [Thu, 3 Sep 2015 01:49:21 +0000 (18:49 -0700)]
SurfaceFlinger: Add dim layer information into HWC layer.

- Set dim layer flag = 0x80000000 to send dim layer hint to HWC.
- Clear HWC_SKIP_LAYER flag when dim layer flag is set.

Change-Id: I56904c65fb487e6e89d4c057015443730d727299

7 years agogui: add Tertiary display support in surface composer header
Vinu Deokaran [Mon, 20 Jul 2015 17:50:15 +0000 (13:50 -0400)]
gui: add Tertiary display support in surface composer header

Add definition of Tertiary display into the enumeration list of
surface composer header file, to support third display for all
Surface Flinger APIs.

Change-Id: Ic932be4f7f1ac9c44a5a8f36d17eb9386135de87

7 years agosf: Add flip support in RenderEngine
Saurabh Shah [Thu, 26 May 2016 21:01:19 +0000 (14:01 -0700)]
sf: Add flip support in RenderEngine

Add flip support in RenderEngine while setting projection matrix.
Note that H+90/V+90 support is still pending and needs to be present
in multiple places in f/w and gfx stack.

Change-Id: Ib9391ee313589fedb1d0fe571a6b06ceff1d032e
CRs-fixed: 1011375

7 years agoframeworks: egl: Enable loading of SW gles libs
Naseer Ahmed [Wed, 7 Jan 2015 20:17:42 +0000 (15:17 -0500)]
frameworks: egl: Enable loading of SW gles libs

Based on the property persist.sys.force_sw_gles, ensure that the
S/W OpenGL library is loaded.

CRs-Fixed: 1021870
Change-Id: If37bfa979d021d28586e3bf9c1f9c5ce77d3c3a8

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 agoAdd bound checks to utf16_to_utf8
Sergio Giro [Tue, 28 Jun 2016 17:19:33 +0000 (18:19 +0100)]
Add bound checks to utf16_to_utf8

Bug: 29250543
Change-Id: I518e7b2fe10aaa3f1c1987586a09b1110aff7e1a
(cherry picked from commit 7e93b2ddcb49b5365fbe1dab134ffb38e6f1c719)

7 years agoBQ: Add and expose a unique id
Pablo Ceballos [Tue, 28 Jun 2016 00:56:53 +0000 (17:56 -0700)]
BQ: Add and expose a unique id

Bug 29422927

Change-Id: I80eab94f073ebc378302f00fa86a740c3643657e

7 years agomerge in nyc-release history after reset to nyc-dev
The Android Automerger [Sun, 26 Jun 2016 07:03:29 +0000 (00:03 -0700)]
merge in nyc-release history after reset to nyc-dev

7 years agodumpstate: Also pick up /sys/fs/pstore/console-ramoops-0 for LAST KMSG
Mark Salyzyn [Fri, 24 Jun 2016 21:06:15 +0000 (14:06 -0700)]
dumpstate: Also pick up /sys/fs/pstore/console-ramoops-0 for LAST KMSG

(cherry pick from commit 7d0a762ecaf9f4d005f0f6db913034c2e084d362)

Bug: 29639467
Change-Id: Iba0b1754eaebfb2b0624dcbef522b7d8456eeb50

7 years agomerge in nyc-release history after reset to nyc-dev
The Android Automerger [Thu, 23 Jun 2016 07:03:51 +0000 (00:03 -0700)]
merge in nyc-release history after reset to nyc-dev

7 years agoMerge "Sensor: Make getId() more varied" into nyc-dev
Greg Kaiser [Thu, 23 Jun 2016 03:25:44 +0000 (03:25 +0000)]
Merge "Sensor: Make getId() more varied" into nyc-dev