Don't let NotificationMediaManager cause NPEs
If setUpWithPresenter() hasn't been called on NotificationMediaManager, it can NPE when serving up APIs. Long term, we probably need a way to make sure classes which need to bet set up don't do anything before they get that chance. Test: open camera, kill sysui, make sure it boots Change-Id: Idc41bf9aeecda2bcc55c03b4c027c15fbc880a4f Fixes: 119322135
This commit is contained in:
@@ -280,7 +280,10 @@ public class NotificationMediaManager implements Dumpable {
|
||||
if (metaDataChanged) {
|
||||
getEntryManager().updateNotifications();
|
||||
}
|
||||
mPresenter.updateMediaMetaData(metaDataChanged, true);
|
||||
|
||||
if (mPresenter != null) {
|
||||
mPresenter.updateMediaMetaData(metaDataChanged, true);
|
||||
}
|
||||
}
|
||||
|
||||
public void clearCurrentMediaNotification() {
|
||||
|
||||
Reference in New Issue
Block a user