Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a3ce9dbf authored by Matt Pietal's avatar Matt Pietal Committed by Automerger Merge Worker
Browse files

Merge "Controls UI - Wait for callback to potentially show controls" into...

Merge "Controls UI - Wait for callback to potentially show controls" into rvc-dev am: 0d425c2e am: ede57198

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11702453

Change-Id: Ia3e613f4a5fa66ef5070ae2b698c54cd91e8403f
parents 0c707aaa ede57198
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -391,7 +391,15 @@ public class GlobalActionsDialog implements DialogInterface.OnDismissListener,

        if (controlsComponent.getControlsListingController().isPresent()) {
            controlsComponent.getControlsListingController().get()
                    .addCallback(list -> mControlsServiceInfos = list);
                    .addCallback(list -> {
                        mControlsServiceInfos = list;
                        // This callback may occur after the dialog has been shown.
                        // If so, add controls into the already visible space
                        if (mDialog != null && !mDialog.isShowingControls()
                                && shouldShowControls()) {
                            mDialog.showControls(mControlsUiControllerOptional.get());
                        }
                    });
        }

        // Need to be user-specific with the context to make sure we read the correct prefs