Fixed a bug that cause Context.createPackageContext() to discard
display information. Likewise also fixes issues where the
activity token, override configuration, user handle, and
restriction state might be discarded.
As part of this change, reworked how Contexts are created to make
initialization easier to understand and less error-prone.
The init() methods have been removed and most of the state is
now stored in final variables.
Bug: 12015587
Change-Id: If795851f1cd078bef889b76a52e00d9b3c06ab11
When the work source of a wake lock was changed, this would
cause the old wake lock to be released in battery stats before
the new one was acquired (the power manager would correctly
keep holding the associated wake lock). This resulted in a
pointless entry in the battery history showing the last wake
lock being released and a new one acquired.
This change adds a new path in to battery stats to report
when a wake lock has changed, allowing it to acquire the
new wake locks first before the old ones, so it can't drop
down to zero wake locks. This also provides better timing
information, as the same current time can be used for both
operations.
In addition, added a new kind of history entry for the
current time, so you can tell when in actual world clock
time the battery data is happening.
Change-Id: Ibbf2eed83bb93f31f60267889b7bc5b9e71e355f
This was brought back by a bad merge conflict resolution
in change 0efbd9a463c848118c7685f4bfc8765a82caa761.
Change-Id: I0c7cbe8ee396293619eabf4d0a3c2f06c76bdd6e
New write method with data in ByteBuffer. Allows blocking and
non-blocking write.
If the ByteBuffer is not direct, the implementation uses the
existing implementation with a byte array.
Bug 7919023
Change-Id: I6935e3e05783d7d7672614b194941a87abbb50cf
Updates the format of the calibration XML to store the Surface rotation
that a specific calibration applies to. Also updates the API to require
a rotation value for get/set, and has the native framework supply this
according to the current rotation whenever it changes.
Change-Id: I72b6703f646dd18db537365c5c9843f720a5f41e
This patch extends the PersistentDataStore store to read and write
input device calibration data. A new SET_INPUT_CALIBRATION permission
grants apps the ability to update this information, and a new
TouchCalibration class is used to wrap the raw calibration data.
Change-Id: I4daac2b15ef03616ea5b068c1e77bebd0ce7b8c1
Extract the size from the MeasureSpec value before adding the
delta. The opposite order could result in a negative delta causing
overflow into size from the EXACTLY mode, creating a very large size
value in the resulting MeasureSpec.
Don't reapply optical bounds insets after pulling a value from the
measurement cache. (The insets will have already been applied before
insertion into the cache.)
Change-Id: Ib0154f4d6c3a7c31e7fee24fd7d5d10cc5dc71a1