Commits


qqzhou authored and Gerrit - the friendly Code Review server committed 2f1f2ccfffa
base: fix ClassCastException in MenuPopupWindow The exception happens at MenuDropDownListView.onKeyDown() in MenuPopupWindow, the code wants to cast getAdapter() into MenuAdapter without checking the instance of getAdapter(), MenuDropDownListView extends ListView, ListView will wrap its adapter into HeaderViewListAdapter when header or foot view exists, so getAdapter() may be MenuAdapter instance if not wrapped but will be HeaderViewListAdapter instance otherwise. So need to unwrap the adapter to get MenuAdapter for wrapped case. CRs-Fixed: 1057424 Change-Id: If697fc972b9f2247dc9eb4522c156830568c50b1