commit | 5c4d5ee6697503c9c170fe240b0fe97792d83904 | [log] [tgz] |
---|---|---|
author | Dake Gu <dake@google.com> | Tue Mar 14 10:53:58 2017 -0700 |
committer | Dake Gu <dake@google.com> | Tue Mar 14 11:02:08 2017 -0700 |
tree | b4d9ae10919c167d0601e58c6711b875ae94339a | |
parent | 035bb922cd2fd0d8362dfa008f29e6d898bb9f96 [diff] |
leanback: fix crash caused by wrong position When notifyDataSetChange() is called on Adapter that clears its data and has stable ids, it will trigger a requestChildFocus() in creating DISAPPEARING animation. At that time we should use adapter position instead of view position. The adapter position would be -1, so requestChildFocus() should do nothing. Bug: 36139432 Test: GridWidgetTest.testRemoveLastItemWithStableId Change-Id: Ief37156d58c2596c28002143cd14395ade24c6a5