Do not hide System UI when app rejects connection

If an app rejects the connection of the internal media notification manager
the session should behave like without the the media notification controller.
The legacy System UI controller should not be hidden or even rejected to
connect in such a case.

#minor-release

PiperOrigin-RevId: 574807901
This commit is contained in:
bachinger 2023-10-19 03:48:16 -07:00 committed by Copybara-Service
parent f0cab4d03e
commit 54d5810fc3

View File

@ -599,7 +599,7 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
checkNotNull( checkNotNull(
callback.onConnect(instance, controller), callback.onConnect(instance, controller),
"Callback.onConnect must return non-null future"); "Callback.onConnect must return non-null future");
if (isMediaNotificationController(controller)) { if (isMediaNotificationController(controller) && connectionResult.isAccepted) {
isMediaNotificationControllerConnected = true; isMediaNotificationControllerConnected = true;
playerWrapper.setCustomLayout( playerWrapper.setCustomLayout(
connectionResult.customLayout != null connectionResult.customLayout != null