commit | 8b0ac8fc8e5216ea96c761c076d018e8c88c38a4 | [log] [tgz] |
---|---|---|
author | Ben Murdoch <benm@google.com> | Thu Jul 09 19:35:59 2020 +0100 |
committer | Ben Murdoch <benm@google.com> | Thu Jul 09 21:02:53 2020 +0100 |
tree | e3212c11742c945e9a7ad9008ac325f87700f502 | |
parent | 1c2a704f10e5782cdb121ebe492bfab6dec7afe0 [diff] |
Fix crashes in UserDetailViewAdapterTest. ag/12048551 exposed some issues running these tests with mocks. 1. Once UserDetailItemView was created from the mocked convertView, it returned null from getResources. Fix by calling getResources through Context instead. 2. CircleFramedDrawable needs a real bitmap to work. Using a mock ended up in a native crash somewhere in libhwui. Bug: 160794744 Test: atest UserDetailViewAdapterTest Change-Id: I85a84dbd454ebb1627e4ded21e6708c7fedac11c