Merge "Fix to call openGutsInternal even when no Statusbar exists" into sc-v2-dev am: 3296cc24eb am: da095b8e19

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

Change-Id: I12ec8f89d2498c2bc9935acbd0e8aaa76d1c98d2
This commit is contained in:
TreeHugger Robot
2021-07-20 00:13:53 +00:00
committed by Automerger Merge Worker

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);