Fix NullPointerException in System UI caused by remote volume change
VolumeDialogController(System UI) only manages active sessions, but MediaSessionService always notifies the System UI of remote volume change regardless of whether the session is active or not. This CL makes MediaSessionService notify of remote volume change only when the session is active. Bug: 34033926 Test: Flashed new master build on angler and tested. Change-Id: Id363c078f75d49732aa7af9578ee44a24649df63
This commit is contained in:
@@ -150,10 +150,10 @@ public class MediaSessionService extends SystemService implements Monitor {
|
||||
}
|
||||
|
||||
/**
|
||||
* Tells the system UI that volume has changed on a remote session.
|
||||
* Tells the system UI that volume has changed on an active remote session.
|
||||
*/
|
||||
public void notifyRemoteVolumeChanged(int flags, MediaSessionRecord session) {
|
||||
if (mRvc == null) {
|
||||
if (mRvc == null || !session.isActive()) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user