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
(cherry picked from commit 54d5810fc353a9e7133ef929ab2f822d921070b1)
This commit is contained in:
bachinger 2023-10-19 03:48:16 -07:00 committed by Rohit Singh
parent 2ae6b1e832
commit a8b0bd712a

View File

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