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
Merged-In: Iff2b7d499cee275294075a37a4970dc2dbc97401
Change-Id: Iff2b7d499cee275294075a37a4970dc2dbc97401
(cherry picked from commit e09e8e8a18)
This commit is contained in:
@@ -562,8 +562,10 @@ public class PipMenuActivity extends Activity {
|
||||
|
||||
// TODO: Check if the action drawable has changed before we reload it
|
||||
action.getIcon().loadDrawableAsync(this, 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