Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 2f1f2ccf authored by qqzhou's avatar qqzhou Committed by Gerrit - the friendly Code Review server
Browse files

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
parent 4404f4a2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment