We used the system proterties as a shared memory mechanism
to propagate information to local settings caches when the
content has changed and the cache should be cleared. The
system properties are unfortunately updated asynchronously
leading to cases where clients may read stale data.
This change adds a simple int array data structure backed
by shared memory which guarantees individual values are
atomically read and updated without memory tear. Multi-
index opearations are not synchronized between each other.
The settings provider is using the new data structure to
propagate the settings generation which drives when caches
are purged.
We have a single memory array keeping the generation for
different settings tables per user. Since memory array is
not a compact data structure and the user space exceeds
the memory array size we use an in-memory map from keys
to indices in the memory array where the generation id of
a key is stored. A key is derived by the setting type in
the 4 most significant bits and the user id in the 28 least
significant bits.
The mapping from a key to an index is cleared if the user is
removed and the corresponding index in the memory arry is
reset to make it available for other users. The size of the
memory array is derived from the max user count that can be
created at the same time.
bug:18826179
Change-Id: I64009cc5105309ef9aa83aba90b82afc8ad8c659
When setting the vertical location of the gear we need the collapsed
height of the parent, the parent might not be fully laid out so move
setting the vertical location into onLayout instead
Bug: 28390732
Change-Id: I7c1bf14a54e9f1ef0a693fa13e1a6533f5967631
Fine tune the audio gain for Bluetooth Absolute Volume.
Use 50%, 70% and 85% for lowest volume steps 1, 2 and 3.
Thus the volume change sounds smoother, more linear.
When remote end tune volume out of mute, we should also
tune the audio gain for the lowest volume steps.
Bug: 26694114
Change-Id: I298a334a4b40ddb87495fda1935349bfce8b0537
We shouldn't profile *any* packages loaded by the system_server, not
just the system_servers own ("android") package.
bug: 28241500
Change-Id: I5f3f477b40c758030a5bdc8e97d17cab6e68e204
Happens because mActionMode was set at the end
of the call, which means that invalidate() doesn't
actually do anything.
BUG: 28392319
Change-Id: Ifdc97c03dc43bfbe74790f90764d1575bd9ca951
Changes the policy for selecting packages which will be pre-verified
during post-OTA boot animation.
For Nx to Ny, an app is pre-verified if used in the foreground in the
last 7 days, or if its APK was loaded by other apps.
For M to N (or early N builds without detailed stats), an app is
pre-verified if it has any recorded use in the last 7 days.
Bug: 27902702
Bug: 27350503
Change-Id: I2b38daf017ecd0e5aa5ed596ed9351cffa03dbcb
Currently post-OTA verification will attempt to compile with
'verify-profile' but does not merge the profiles prior to calling
dex2oat. As a result, we may miss some or all classes that need
verification.
Bug: 27688727
Change-Id: I1aa93cad2686513594cb37f6d3d181ae5c718d1d