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
This was originally added for b/14445579. An in-development app was
attempting to render to a window as an EGLSurface, then tear that
down, change some window properties, and create a new EGLSurface. The
second eglCreateWindowSurface failed because the window was already
connected. This change went in, but it turned out the real problem was
that the app still (unintentionally) had the surface current. After
the app bug was fixed, nobody revisited whether this change was
actually needed.
Turns out it wasn't needed. After an EGLSurface is both destroyed
*AND* not current (basically refcount==0), we were already
disconnecting the window in ~egl_surface_t().
Apart from being unnecessary and redundant, disconnecting the window
here is wrong for two reasons:
(a) The surface may still be in use after eglDestroySurface, if it was
still current. Rendering is undefined in that case, but disconnecting
the window leads to more catastrophic results than necessary.
(b) It's being called before calling the driver's eglDestroySurface.
The driver will almost definitely have a buffer dequeued that it needs
to cancel, and by disconnecting first we turn that into an error that
they don't have a graceful way to deal with.
Bug: 24524053
Change-Id: Ib063134413d25d3526f794aafb5e333e3417ea42
In very low framerate situations, extrapolation is generally going to
either cause no benefit or make a mistake. We can safely turn it off
with no user-visible negative impact.
BUG=https://buganizer.corp.google.com/u/0/issues/24550942
TEST=Scrolled very slowly and saw mispredictions on Angler. With change,
saw the log message that the mispredictions were suppressed.
Change-Id: Ic9747d3ff098d7918047ada2ed1c2d21282c65b0
Add handling of "replacement" key events in InputReader and EventHub by
consulting device's character key map (if exists) for presence of
replacement key code for given get code and meta state combination,
before passing it to InputDispatcher.
This enables defining special keys, such as ESC, on keyboards lacking
enough physical keys, via combination of normal keys and modifiers, for
example AltR + 1 => ESC.
Bug: 24504154
Change-Id: I7e36104808bedcf724436c1fbb63d37c35cca8af
Currently keyboard maps allow to assign character sequences to key
events and allow specifying a so-called "fallback" key events that are
re-injected into input stream if target application indicates that it
was not able to handle the original key event. Unfortunately there is no
way to perform substitution before handing the event to applicationis.
This change adds a new keymap keyword "replace" that allows users query
"replacement" actions for key (if any), with the intent that such
replacement happens early in the event handling process.
Bug: 24504154
Change-Id: I3e6a2476c856524171df00ad22ff56f2018c1278
The uninitialized local variables pick up
whatever the memory content was there on stack.
This data gets sent to the remote process in
case of a failed transaction, which is a security
issue. Fixed.
(Partial manual merge of master change
12ba0f57d028a9c8f4eb3afddc326b70677d1e0c. Rest
to automerge from klp-dev)
For b/23696300
Change-Id: I704c9fab327b3545c58e8a9a96ac542eb7469c2a
This reverts commit 9b70ab7a3cb260205e81e40ba181a86710d2eb95, reversing
changes made to 153008efb5a00ed3c18d588ce15f90d2442a9786.
Bug: 24302031
Change-Id: Ia746381b30be3b54cb646ed412b7271962c4b02a
Expect the boot status explicitly as a parameter so that we do not
have to rely on dev.bootcomplete, which isn't meaningfully set
when the device needs the decryption screen on boot.
Bug: 23898216
Change-Id: I9b34298caf70b1e5d40970cc0d04c469016a80a7
Check dev.bootcomplete in dex2oat(). Use the information for
two changes.
Only switch to the background when we're post bootcomplete.
This will ensure better utilization after upgrades.
Add a second dex2oat-threads property that is used pre
bootcomplete. A separation of these phases allows using less
cores when the device is up, freeing up resources for other
purposes, e.g., avoid jank. The precedence during boot is the
boot property, or the image property if the former doesn't
exist, or the default property as a fallback.
Bug: 23898216
Bug: 24004256
Change-Id: I5063f3fc4b437cbe88c4e94584e01c1c78eccc4d
Also, move NetworkDiagnostics between the two runs of getting the
wifi counters, so we can see the effect on the counters of
sending our probe packets.
Bug: 23661687
Change-Id: I3f81c003a35f50ac1cb8e77d0a8c73dae4fd91f3
If the custom sensor requires the BODY SENSOR permission, we should add
the body sensors app op for the custom sensor
Bug: 23396558
Change-Id: I132917d1bca12c76c8a9fb146e00951cba3e6d7a
Adds the colorTransform field, which defines a vendor-specific color
transform (e.g., wide gamut, sRGB, etc.) to the DisplayInfo class, and
populates it from the HWC interface.
Bug: 20853317
Change-Id: I153edc36a361407656f3eb5082b96c2da2ecbec7
This maps a monotonic timestamp to the
corresponding real-time timestamp, which
can be used to match up the traces with
other logs that use real-time.
Also write clock_sync records first instead of at
the end, to avoid not being to write it due to the
buffer being full.
Bug: 23668823
Change-Id: I644aeea496197e194ec30f808f754e3e043d905f
i) Use pingBinder() to check the status of sensorservice everytime an
event_queue is created. Retry to establish the binder connection if
SensorService has recovered from a runtime restart.
ii) LOG_ALWAYS_FATAL_IF getService(SensorService) returns NULL or malloc
returns NULL.
Bug: 22634472
Change-Id: I4e3912839b6f4114be1a124510878774dbd576a4
(cherry pick from commit e3c4df96083231b519dad919fd0ed6624100b368)
- For those that are proud to call themselves logspam police
- Every time someone declares that something is too chatty, or that
they lost their logs because they were declared too chatty and
their associated logs were aggresively pruned we generally
ask them to report the logger statistics to pinpoint what software
product that is the elephant in the room.
- Every time we want to spawn a new 'stop being so spammy' bug spawned
off a bugreport collected for another purpose, we *wish* we had the
logger statistics to help add gravitas to the claim that some piece
of software is the top, or near the top, polluter.
Bug: 22351810
Change-Id: Ifae33cd21d0ae2917a3b4381502d723725b1701c
Previously the parsing found the next space and then added the the difference
between the current position and space to the set of tokens. This improperly
generated empty strings if there were consecutive spaces or if spaces existed at
the beginning or end of strings. To fix this, the parse is modified to use
simple stringstream parsing.
Bug: 22709246
Change-Id: I9e32c07bbf984eadccdadf1dc34437fa0c46088b
If SensorService hasn't started when SensorManager instance is requested, keep retrying for a
longer duration.
Bug: 22529981
Change-Id: I3c506d962b61347085fc80b2c5832289539d6853
Allows the sideband layer to be passed all the way to HWC instead of
getting blocked by the updated PTS tracking code.
Bug: 22291067
Change-Id: Ic2f20a7528e276fff054e86ca35789c26873b348