diff options
author | Adam Powell <adamp@google.com> | 2016-03-22 10:40:29 -0700 |
---|---|---|
committer | Adam Powell <adamp@google.com> | 2016-03-22 11:14:16 -0700 |
commit | 35e2ea02035e8b7eb7de5d7a1d51bf030dcb5b76 (patch) | |
tree | c251a945bc28c4cf2dffac3eb40ab3f09537115f /rs/java/android/renderscript/ProgramFragmentFixedFunction.java | |
parent | 030247d41b6e9a48248634a27df5264ea41c04ca (diff) |
Only call Drawable.setVisible(false) for visible outgoing drawables
In framework views where we're handling the new visibility aggregated
call we only update the drawable visibility when we're attached to a
window. For old outgoing drawables being replaced, gate this on
whether the drawable is already marked visible instead.
This catches a case where views being inflated might set drawables in
in a superclass constructor and have them replaced in a later
constructor. Gating the call into a drawable that might invoke its
callback (the view being constructed) avoids potential problems where
overridden methods are called unexpectedly on a view subclass that has
not finished running its constructor.
This is a better check than isAttachedToWindow, as isAttachedToWindow
will return false if the view has been temporarily detached from its
parent by a view-recycling container. In those cases, the view would
not correctly update the outgoing drawable.
Bug 27461617
Change-Id: I733a2dd3e3df0a8d80d5dc542ca7b30064159d5d
Diffstat (limited to 'rs/java/android/renderscript/ProgramFragmentFixedFunction.java')
0 files changed, 0 insertions, 0 deletions