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

Commit 087a06f4 authored by Tadashi G. Takaoka's avatar Tadashi G. Takaoka
Browse files

Fix to call openGutsInternal even when no Statusbar exists

Bug: 194014429
Bug: 138625582
Bug: 187111293
Test: atest SystemUITests
Test: atest ArcNotificationPipelineIntegrationTest
Change-Id: I9b4455ad31ef0a227fac52990c15af8abc164e6b
parent cf8de3b4
Loading
Loading
Loading
Loading
+16 −11
Original line number Diff line number Diff line
@@ -561,18 +561,23 @@ public class NotificationGutsManager implements Dumpable, NotificationLifetimeEx
                            .setLeaveOpenOnKeyguardHide(true);
                }

                Optional<StatusBar> statusBarOptional = mStatusBarOptionalLazy.get();
                if (statusBarOptional.isPresent()) {
                    Runnable r = () -> mMainHandler.post(
                            () -> openGutsInternal(view, x, y, menuItem));

                mStatusBarOptionalLazy.get().ifPresent(
                        statusBar -> statusBar.executeRunnableDismissingKeyguard(
                    statusBarOptional.get().executeRunnableDismissingKeyguard(
                            r,
                            null /* cancelAction */,
                            false /* dismissShade */,
                            true /* afterKeyguardGone */,
                                true /* deferred */));
                            true /* deferred */);
                    return true;
                }
                /**
                 * When {@link StatusBar} doesn't exist, falling through to call
                 * {@link #openGutsInternal(View,int,int,NotificationMenuRowPlugin.MenuItem)}.
                 */
            }
        }
        return openGutsInternal(view, x, y, menuItem);
    }