Fix to call openGutsInternal even when no Statusbar exists

Bug: 194014429
Bug: 138625582
Bug: 187111293
Test: atest SystemUITests
Test: atest ArcNotificationPipelineIntegrationTest
Change-Id: I9b4455ad31ef0a227fac52990c15af8abc164e6b
This commit is contained in:
Tadashi G. Takaoka
2021-07-19 10:56:07 +09:00
parent cf8de3b4d5
commit 087a06f44d

View File

@@ -561,17 +561,22 @@ public class NotificationGutsManager implements Dumpable, NotificationLifetimeEx
.setLeaveOpenOnKeyguardHide(true);
}
Runnable r = () -> mMainHandler.post(
() -> openGutsInternal(view, x, y, menuItem));
mStatusBarOptionalLazy.get().ifPresent(
statusBar -> statusBar.executeRunnableDismissingKeyguard(
r,
null /* cancelAction */,
false /* dismissShade */,
true /* afterKeyguardGone */,
true /* deferred */));
return true;
Optional<StatusBar> statusBarOptional = mStatusBarOptionalLazy.get();
if (statusBarOptional.isPresent()) {
Runnable r = () -> mMainHandler.post(
() -> openGutsInternal(view, x, y, menuItem));
statusBarOptional.get().executeRunnableDismissingKeyguard(
r,
null /* cancelAction */,
false /* dismissShade */,
true /* afterKeyguardGone */,
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);