Merge "[Output Switcher] Check before use MediaController" into tm-dev

This commit is contained in:
Shaowei Shen
2022-03-22 12:43:52 +00:00
committed by Android (Google) Code Review

View File

@@ -637,7 +637,8 @@ public class MediaOutputController implements LocalMediaManager.DeviceCallback,
}
private boolean isPlayBackInfoLocal() {
return mMediaController.getPlaybackInfo() != null
return mMediaController != null
&& mMediaController.getPlaybackInfo() != null
&& mMediaController.getPlaybackInfo().getPlaybackType()
== MediaController.PlaybackInfo.PLAYBACK_TYPE_LOCAL;
}