Unhide View#dispatch{Start,Finish}TemporaryDetach()
In order to fix Bug 18920212, we have to track when a View enters temporarily detached state and when it exits from that state. To do that, ListView needs to use View#dispatchStartTemporaryDetach() instead of directly calling View#onStartTemporaryDetach() because there is no guarantee that existing applications have internally followed Call-Super pattern. With this CL, we are going to expose temporary detach state and its dispatching methods as public APIs. Major changes are: 1. ListView's indirect children will start receiving temporary dispatch callbacks. Previously only direct children have received View#on{Start, Finish}TemporaryDetach() callbacks. 2. TextView can no longer assume that ListView never calls View#View#dispatchStartTemporaryDetach() but directly call View#onStartTemporaryDetach() instead. See the commit message of [1] for details. This also enables us to do the following fixes, which will be handled in subsequent CLs. A. ViewCompat support lib is finally able to rely on temporary dispatch mechanism without reflection. B. InputMethodManager is now able to ignore focus-in events from temporarily detached Views. This will be done in the next CL [2]. [1]: a440b002 [2]: Ia79bbd8468f768d546354382b47b39dd31ef7bb5 Bug: 18920212 Bug: 27905921 Change-Id: If8f780f8b71754f7533a65097304113ae1f5cf12
Loading
Please register or sign in to comment