Check for null when getting PiP action item drawables.
Upon loading the action item drawables, it's possible they end up returned as null. Bug: 167338598 Test: None Change-Id: Iff2b7d499cee275294075a37a4970dc2dbc97401
This commit is contained in:
@@ -394,8 +394,10 @@ public class PipMenuView extends FrameLayout {
|
||||
|
||||
// TODO: Check if the action drawable has changed before we reload it
|
||||
action.getIcon().loadDrawableAsync(mContext, d -> {
|
||||
d.setTint(Color.WHITE);
|
||||
actionView.setImageDrawable(d);
|
||||
if (d != null) {
|
||||
d.setTint(Color.WHITE);
|
||||
actionView.setImageDrawable(d);
|
||||
}
|
||||
}, mHandler);
|
||||
actionView.setContentDescription(action.getContentDescription());
|
||||
if (action.isEnabled()) {
|
||||
|
||||
Reference in New Issue
Block a user