diff options
| author | 2017-02-07 17:09:29 -0800 | |
|---|---|---|
| committer | 2017-02-09 15:13:32 -0800 | |
| commit | f038cb454b1b96a2e80e0628ad513ddfccf6f5e7 (patch) | |
| tree | f7444bf35d40b91883d46a50fef08e7fe807df66 /libs/hwui/ProgramCache.cpp | |
| parent | 3238f730bdfac88e8cc6ec3e590596191762c3e9 (diff) | |
Don't notify parents of views made focusable off UI thread
Clickable now implies focusable by default. While views are
only supposed to be modified on the UI thread, before O
this wasn't enforced when setting a view as clickable. Now,
it is enforced by virtue of clickable setting focusable for
auto-focusable views.
In order to prevent crashes, detect this situation for pre-O
target-sdks and skip notifying parents of a view made
focusable if:
- it was made focusable by the new auto-focusable mechanic.
- and this is occuring off the UI thread.
The net result in these cases will be a newly-focusable view
that won't immediately receive focus if it was supposed to
(though this will be exceedingly rare).
Bug: 34815147
Test: Verified that the crashing app in the bug (JWLibrary)
doesn't crash after this change.
Change-Id: I90e9a082cb1e1a3fec75ae5159f2f2c8540ffdc2
Diffstat (limited to 'libs/hwui/ProgramCache.cpp')
0 files changed, 0 insertions, 0 deletions