Reduces the amount of time that a lock is held and reduces the scope of
the lock to only manage the temporary TypedValue. Also ensures that the
typed value is consistently returned to the (single item) pool.
Additionally, performs some refactoring:
- removes unused variables and constants
- moves the NotFoundException cause into the constructor for consistency
with other Exceptions
- inlines sPreloadedDensity which was not used anywhere
- fixes line wrapping and indentation in nearby code
Aside from improvements to locking, there are no functional changes in
this CL.
Change-Id: I8c3059261e3cc2288a086e6637ab946e0b7d3741
Clean up usage of temporary TypedValue in Resources
Reduces the amount of time that a lock is held and reduces the scope of
the lock to only manage the temporary TypedValue. Also ensures that the
typed value is consistently returned to the (single item) pool.
Additionally, performs some refactoring:
- removes unused variables and constants
- moves the NotFoundException cause into the constructor for consistency
with other Exceptions
- inlines sPreloadedDensity which was not used anywhere
- fixes line wrapping and indentation in nearby code
Aside from improvements to locking, there are no functional changes in
this CL.
Change-Id: I8c3059261e3cc2288a086e6637ab946e0b7d3741
Previously we were discarding the Resources when forwarding from the
two-arg factory method to the one-arg method. This CL also updates the
documentation for ConstantState to be slightly more comprehensive.
Bug: 25688078
Change-Id: I4fbbf43f95fe792fa6f0bf9db8fd9a7cbfa51d1d
Recent changes to mExtensions moved the initialization code from the
constructor to a separate function called load. Make sure to call
this function in the initExtensions function call.
Bug: 25615666
Change-Id: Ic016232c42afefd3b5bc3e4bd5c8428a11c454ad
As a preparation to fix Bug 25373872, this CL does a mechanical
code clean-ups. Literally there is no behavior change.
Bug: 24504456
Change-Id: I6e3062bda17e748a3c5f1450d6752239dd260520
Not just when it's changed during this relayout.
bug: 25596610
Also add the delayed surface to removal list regardless of the show
result, it won't be destroyed until window is ready to show but we
need to add it to the list first.
bug: 25666160
Change-Id: I6fceada1bdc1de0a5b5a4d6dc261957164817330
When moving a task from one stack to another we detach the source
stack from the display if the stack is empty after the task move.
If the source and destination stack are the same we detach the
stack from the display when the task is removed, but it isn't
re-attached to the display when the task is add back since we
only attach stacks to displays when they are created.
We no longer try to move the task if it is already in the destination
stack.
Bug: 25671469
Change-Id: Idde54d362a35716223bc5f1143000111af380239
On some chips, SurfaceControl.setSize will not take effect for several
frames. We have to also do a updateSurface/invalidate (which destroys
and creates the EGLSurface) to get the size right.
Keep track of SurfaceControl size changes in window manager, and pass
that to ViewRootImpl, so that a updateSurface is done either the surface
itself or its size is changed.
Note that we don't use frame size change to trigger updateSurface, because
frame size could be different from the surface size that window manager set.
For example during drag resizing, the surface size is fullscreen although
frame size changes constantly. Doing updateSurface upon frame size change
could cause us to do many unnecessary updateSurface.
bug: 25583942
Change-Id: I1989613a187bb6ef1c179bd2800c6a7b01fcdb3a
- Apply stack crop if window isn't animating when replacing window.
We were previously not applying the crop if replacing window regardless
of the animation state.
- Apply stack crop if the current docked window isn't animating.
We were previously not applying if any window in the system is animating.
- Also created setter/getter methods for WindowAnimator.mAnimating
to make debugging easier.
Bug: 25645069
Change-Id: I671549626e218358a7dea9e78bd0b2a1f1b3a51e