Generally we never want to lock a buffer for write access if it is at
the "head" on the surfaceflinger side. The only exception (1) is when
the buffer is not currently in use AND there is at least one queued
buffer -- in which case, SurfaceFlinger will never use said buffer
anymore, because on the next composition around, it will be able to
retire the first queued buffer.
The logic above relies on SurfaceFlinger always retiring
and locking a buffer before composition -- unfortunately this
didn't happen during a screenshot.
This could leave us in a situation where a buffer is locked by the
application for write, and used by SurfaceFlinger for texturing,
causing a hang.
Here, we fix this issue by never assuming the exception (1), it was
intended as an optimization allowing ANativeWindow::lockBuffer() to
return sooner and was justified when most of SF composition was
done in software. The actual buffer locking is now ensured by
gralloc. We could have handled screenshots in a similar way to
a regular composition, but it could have caused glitches on screen,
essentially, taking a screenshot could cause to skip a frame.
Change-Id: I1f226b1ebdf6918439b687c2723955d55b842c55
Bug: 3241808
Make sure the directory the caller is trying to open the icon db
in actually exists and create it if it doesn't.
Change-Id: Ie5e4a09210e9430edc318846a551542119969053
Adds a new virtualKeyQuietTimeMillis configuration resource that sets
the duration for which virtual keys will be dropped after recent touches
on screen. The default value is 0; it is intended to be overridden
per device using a resource overlay.
This change is designed to help in two cases:
1. Swipes from touchscreen into virtual key area.
2. Accidental taps in virtual key area while using on-screen keyboard.
Bug: 3089163
Change-Id: Ib912d4f8a4df9966a39cd537d3ec7c24afab7225
OBB files on USB storage or SD card should be removed when an
application is removed.
Bug: 3356804
Change-Id: Ifbbf043368b125fcd47fd74e5cd2e5167a8deb00
Every time the PreferenceScreen is displayed a new ListView is
created and bound to the adapter. As the same adapter is used during
the lifetime of PreferenceScreen and the listviews never gets
unbound, the adapter will contain a list of unused views. The old view
should be unbound from adapter when we create a new view.
Change-Id: I13e2d0dc79c8ff79b58efa650653e3f84c6e53c5
There is already a cache of all non-null return values for calls to
getService(), so don't bother caching it in Environment. This caused
some problems when Environment was called too early in the boot process
and getService() returned null.
Change-Id: I66739d01dab7e422f660d26b370ecce110dcc808
There are separate settings for AUTO_TIME and AUTO_TIME_ZONE.
Modify *ServiceStateTracker to monitor AUTO_TIME and AUTO_TIME_ZONE changes
separately and reset NITZ time and timezone accordingly.
bug: 3304255
Change-Id: Ie430f7b4a256618bea87672b3628d1223ea6e36a