Merge "Work around for NPE with shell transition" into tm-qpr-dev am: 6911cccd49

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

Change-Id: I1034adc0b3ac0d0a235a7b6f3ae7c29d56fcbc60
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Hongwei Wang
2023-03-11 06:34:29 +00:00
committed by Automerger Merge Worker

View File

@@ -803,8 +803,15 @@ public class PipTransition extends PipTransitionController {
if (sourceHintRect == null) {
// We use content overlay when there is no source rect hint to enter PiP use bounds
// animation.
// TODO(b/272819817): cleanup the null-check and extra logging.
final boolean hasTopActivityInfo = taskInfo.topActivityInfo != null;
if (!hasTopActivityInfo) {
ProtoLog.w(ShellProtoLogGroup.WM_SHELL_TRANSITIONS,
"%s: TaskInfo.topActivityInfo is null", TAG);
}
if (SystemProperties.getBoolean(
"persist.wm.debug.enable_pip_app_icon_overlay", true)) {
"persist.wm.debug.enable_pip_app_icon_overlay", true)
&& hasTopActivityInfo) {
animator.setAppIconContentOverlay(
mContext, currentBounds, taskInfo.topActivityInfo);
} else {