Fix memory leak in HWUI
std::unique_ptr::release just releases the ownership of the
managed object. To delete the object, std::unique_ptr::reset
function should be called.
Bug: 26116596
Change-Id: If65f74085b1fc2be3a9fffc433326e0bcdb40ff3
This reverts commit e5e59c6da424096da8f57137cdc57d8bd410b079.
Drawables expect to be able to call invalidateSelf() during
draw() to pump animation frames. We shouldn't break this.
Bug: 26533725
Change-Id: Ibe2871f2622faf836637225fc1e3e6f0ca6def47
Ignores the old, re-appropriated key "idle_duration" which is now
set to a high value in order to force disable app idle on devices
with bug b/26355386
Bug:26355386
Change-Id: Iff9de843ad6e547d29c1583687fc7f7ce7e15090
With the updated rolling window of stats for app idleness, we need to make sure
it is populated before we initialize some defaults.
Now that we look at older entries to figure out idleness, if those
entries are in the future (due to time change), set them to the current
screen on time.
Bug:26504153
Change-Id: Ia22add0e8eaf0f137002bbe3e91d747fef5b7d69
am: eebf168e43
* commit 'eebf168e43e4a455a74e949cc0d7e156b231a697':
In CanvasContext::doFrame, make a separate call to computeFrameTimeNanos and save the result. Then pass that value to UiFrameInfoBuilder::setVsync as both arguments.
and save the result. Then pass that value to
UiFrameInfoBuilder::setVsync as both arguments.
The order of function argument evaluation is undefined in C++. Because
the value returned from TimeLord::latestVsync may be changed by
the preceding call to TimeLord::computeFrameTimeNanos the values of the
arguments passed to UiFrameInfoBuilder::setVsync is also undefined. This
change removes any ambiguity.
Change-Id: Ie71ee453f9ccc725edfe5f7cc9b277f2a809dfdc
Prevents infinite invalidation loop when reusing a drawable asset within
a single draw() call. Also reduces unnecessary extra invalidations due to
drawable setters (ex. setBounds()) being called during draw().
Bug: 26329675
Change-Id: I31b3c99e8efd4193415cc562a84c8939a2f56c2d
(cherry picked from commit 8cda8e915916b3166e4496589b802fd1ed553c77)
Also adds final where the method was being called, adds Nullable
annotation to method, and updates docs.
Bug: 25985497
Change-Id: I847a8507f2e3970f1340cddf4abf8650dda22b35
(cherry picked from commit ad52693cf3dfe3f5e84f5a22fe4c3787f2f2cbfb)
The goal for this change is to get the timing for animation update. Since
AnimatorSet does not support update listeners, we have to go with the a different
approach, which sets up a value animator that runs between the start and end of
the AnimatorSet. We can then get the animation update timing from the ValueAnimator.
Bug: 26329675
Change-Id: Ibe7fce81eb6da5e05c87a732c1d3bc904b4e5e6f
(cherry picked from commit I378a0964da8f7090f65f6b56275a302e30668835)
TextUtils#getOffsetAfter was used for getting the next
offset in Layout#getOffsetForHorizontal. However, this
method doesn't treat grapheme clusters properly.
Changed to use TextLine#getOffsetToLeftRightOf instead of
TextUtils#getOffsetAfter.
Bug: 25375561
Change-Id: I96c9e6e5da65adfb5266446ecab852c52628dbb5
"getLineEnd(line) - 1" is used as the return value when the
"horiz" is beyond the line end for multiple line text.
In this case, the returned value can point an invalid
offset like the middle point of a surrogate pair.
Bug: 23069901
Change-Id: I1afef7205a15079a42bb0018df73f70fe9ada862
(cherry picked from commit 00ad16d1cd24b788262ab4f62935e720a392da6d)
When measuring in TextLine (important for cursor positioning), the
substring measured must neither be too short (it can't just be the
substring up to the measure limit, but must include additional
characters if they form a ligature) nor too long (it can't extend
beyond the end of the CharacterStyle span, otherwise the measurement
fails to account for the fact that the CharacterStyle span boundary
breaks the ligature). This patch gets it just right.
Bug: 25375561
Change-Id: I36e1c4bdc66424d3b611cf54031756cf54cf3fec
Some operators support Wi-Fi Calling only, not VoLTE.
They don't need "Cellular preferred" option.
In this case, set uneditalbe attribute for preferred preference.
Bug: 26299288
Change-Id: I58b44bbd85bb5ef436d32a5e34d7372532695b91