OSDN Git Service

Fix focus ordering with duplicate ids
authorEvan Rosky <erosky@google.com>
Fri, 7 Apr 2017 01:48:33 +0000 (18:48 -0700)
committerEvan Rosky <erosky@google.com>
Fri, 7 Apr 2017 23:13:05 +0000 (16:13 -0700)
commit8448523665d682efaab93d2b76ef30e36f54c652
tree83b82224fe27240ef638f7b6e05f65e0cdc854aa
parenteb93670383aa40ad7ed55861e667c08e8a3682a6
Fix focus ordering with duplicate ids

AdapterViews (and other dynamic layouts) inflate views which
can lead to multiple views with the same id. The original
user-specified focus logic assumed that id's were unique causing
focus loops. This now uses the full "insideOut" id-search
instead of an id->view map.

Bug: 32647147
Test: FocusFinderTest still passes. Added #testDuplicateId
      specifically for this scenario

Change-Id: Iaed98438f5ad70c866dd72e699453eab0ac0cf58
core/java/android/view/FocusFinder.java