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)
Prevent apps from registering services without relying on selinux checks.
Bug: 29431260
Change-Id: I38c6e8bc7f7cba1cbd3568e8fed1ae7ac2054a9b
(cherry picked from commit f03ba2c0d878071603d73b7f8e9a4a468364ac27)
Due to more complex window layouts resulting in lots of overlapping
windows, the policy around FLAG_WINDOW_IS_OBSCURED has changed to
only be set when the point at which the window was touched is
obscured. Unfortunately, this doesn't prevent tapjacking attacks that
overlay the dialog's text, making a potentially dangerous operation
seem innocuous. To avoid this on particularly sensitive dialogs,
introduce a new flag that really does tell you when your window is
being even partially overlapped.
We aren't exposing this as API since we plan on making the original
flag more robust. This is really a workaround for system dialogs
since we generally know their layout and screen position, and that
they're unlikely to be overlapped by other applications.
Bug: 26677796
Change-Id: I9e336afe90f262ba22015876769a9c510048fd47
Sending transaction to freed BBinder through weak handle
can cause use of a (mostly) freed object. We need to try to
safely promote to a strong reference first.
Change-Id: Ic9c6940fa824980472e94ed2dfeca52a6b0fd342
(cherry picked from commit c11146106f94e07016e8e26e4f8628f9a0c73199)
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
Makes sure we don't change the memory layout of the Parcel class
to maintain binary compatibility with prebuilts linking against
libbinder.
Bug: 25004154
Change-Id: I656687497f08bb85cefda796aafa2341e601e30a
On klp-dev, UINT16_MAX isn't available unless __STDINT_LIMITS
is defined, which it's not for this code. This isn't relevant
for later branches due to bionic commit
e2a292d278b94fec3d078b1f1b27c1f89942c276
Don't use UINT16_MAX when we can just hardcode 65535.
Bug: 23905002
Change-Id: Ia1fd0f749cb7a4d19866075abc28ed6960424e54
fix klp-dev only build breakage.
frameworks/native/libs/input/Input.cpp: In member function 'android::status_t android::MotionEvent::readFromParcel(android::Parcel*)':
frameworks/native/libs/input/Input.cpp:494:47: error: 'UINT16_MAX' was not declared in this scope
Bug: 23905002
Change-Id: I4b6b864ca64d39a8873d045a61e0ddaea2ab9109
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