This allows us to pass in the path to the target apk as an additional
included resource apk, allowing theme designers to reference styles
and attributes from the original package without needing to duplicate
them. Duplicating attributes never worked quite well, and causes
all sorts of issues, including crashing apps.
Instead of a theme declaring attributes, that are app specific, it
simply reference the originals. This way things like colors that
are style specific get included correctly.
Here's an example of stat_sys_wifi_signal_4_fully.xml using this feature.
By using ?com.android.systemui:attr/ we are able to reference attributes
defined in SystemUI directly in our themed resource.
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="17.25dp"
android:height="18dp"
android:viewportWidth="46.0"
android:viewportHeight="48.0">
<path
android:fillColor="?com.android.systemui:attr/backgroundColor"
android:pathData="M20.4,18.0"/>
<path
android:fillColor="?com.android.systemui:attr/fillColor"
android:pathData="M42.0,32.0l0.0,-4.0L26.0,18.0L26.0,7.0c0.0,-1.7 -1.3,-3.0 -3.0,
-3.0c-1.7,0.0 -3.0,1.3 -3.0,3.0l0.0,11.0L4.0,28.0l0.0,4.0l16.0,-5.0l0.0,11.0l-4.0,
3.0l0.0,3.0l7.0,-2.0l7.0,2.0l0.0,-3.0l-4.0,-3.0L26.0,27.0L42.0,32.0z"/>
</vector>
Change-Id: Ic00b5d91fc651a29a8c3ab341e5494107acd0463
TICKET: CYNGNOS-1645
Move the ExSurfaceFlinger, ExLayer, etc., classes to this
repository, to avoid dependency accross projects with static
linking
The following commits are included in this:
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
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
* 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: Id2b9b57d8151b0998d9233e0a6541e8c88e06af7
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
In a4650a5 the concept of a maximum frame number allowance for the consumer was
introduced. A call to acquireBuffers will only return buffers when their frame
number is less-than-or-equal-to this maximum frame number. When SurfaceFlinger
is the consumer, this maximum frame number is calculated in the
onFrameAvailable/onFrameReplaced callbacks. These callbacks are called when a
new buffer is dequeued by the application. The problem is that these callbacks
are called _after_ the fence wait which is used to throttle the frame
production of client apps. When the previous frame needs a long time to draw,
those waits can potentially be a long time. As a result SurfaceFlinger won't do
any composition with the new frame until the wait is over.
Normally this isn't a big problem because there is a queue of buffers for
SurfaceFlinger to work with. However, this changes massively when a client app
is using a swap interval of zero. In this case, a new frame will instantly
replace the previous queued frame. However, SurfaceFlinger doesn't know this
until the onFrameReplaced callback gets called - which is delayed by the fence
wait. If the timing is bad, SurfaceFlinger never gets a chance to pick up a new
frame to do the composition with.
We see this behaviour on our TC development system (slow GPU) with legacy
on-screen benchmarks. Such apps are using a swap interval of zero and sometimes
frames don't get updated for several seconds. This behaviour can be also seen
on a Nexus5, although it isn't as obvious as on our TC.
The fix in this cl is to move the EGL throttling to the end of the queueBuffers
function. This ensures that if a frame gets replaced in the queue, all
consumers who installed the callbacks, get called in a timely fashion.
Change-Id: I36e9ecda162150f41e97d4fb7437963a3d86b371
Signed-off-by: Christian Poetzsch <christian.potzsch@imgtec.com>
Reduce transparent region from a layer only if the transparent
region has valid intersection with the layer. Otherwise, reducing
a transparent region lying completely outside of the layer leads to
invalid sourcecrop values for the layer.
Change-Id: Iee9ba53a8072c21c9ba8a6d58cb14ca30f8600ba
CRs-Fixed: 620973
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: I0d31b1e4a81049fff72109d1a210e7cbd945cfe9
The addition of ashmem size tracking can lead to parcel objects
overwriting other values on the stack in old binary blobs.
Change-Id: Ife8514be1ba639c4061de38b59794c46bcc2d7f8
[root cause ] framebuffer surface is in the same process of surface flinger
[changes ] call IGraphicBufferProducer::allocateBuffers on producer inside the DisplayDevice constructor to force-allocate all three buffers.
[side effects] none
[self test ]<tshark, enter and exit mainmenu>: ok
[reviewers ] zhongjun.chen
[change_type ] AOB --> google_original
[tag_product ] common
Change-Id: Ideb75d3aa1ed23b2fa4d263a120ea3ca39d01361
This change is porting of below commits related to MDP3
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
- CRs-Fixed: 595469
- Change-Id: I99be2d81287ab746d5c4a2375c3106c59e61a8fc
Change-Id: Ie7ac95e1c03eb7ad6f71098ecf09a1e25e69760f
The addition of ashmem size tracking can lead to parcel objects
overwriting other values on the stack in old binary blobs.
Change-Id: Ida52cec851a6f9d5a57c8f9130a5875c03dcb094
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
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
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
Dedupe rotation calculation code and make rotation a statically
available property in the DisplayDevice
Change-Id: Ic517ab0d2c05026cd6fa46d664aab7926be17b62
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
* 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
* 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)
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
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
Adding ambient temperature & relative humidity hardware sensor
features as they are missing and causing CTS failures.
Change-Id: I4f07db8e77cb77c5b2c1bb7ed80a26f68c91c23e
Using the __attribute__((unused)) preprocessor directive
Change-Id: I29d27fd7eacb962ffa06ccd81ee48b48f3743243
(cherry picked from commit 047c69bb8e17eab6f3432fae200fe94f7e119755)
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
When re-creating resource apks for themes, aapt will fail if the
apk already exists unless we use -f
Change-Id: If2c3a634aa3ca061009aa6892530d643f8f67e9f
Initial sensor flush at subscription is a mechanism to avoid sensors
to get stale samples before subscription happens. However, there is a
slight chance that a most recent sample will be lost during the flush
process. This is OK for continuous sensors but problematic in
on-change sensor as on-change event does not come continuously and
a lost event can cause inconsistent state in client. Flush at
subscription of on-change sensor is disabled in this CL to avoid new
important on-change event to be discarded during the initial flush
process.
Bugs: b/24647069
b/25241873
b/24804819
Change-Id: Ibda099c6b9f5fb6e200f13cf13a850b0026e9e7c
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
- 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