Merge "Work around for NPE with shell transition" into tm-qpr-dev
This commit is contained in:
@@ -803,8 +803,15 @@ public class PipTransition extends PipTransitionController {
|
|||||||
if (sourceHintRect == null) {
|
if (sourceHintRect == null) {
|
||||||
// We use content overlay when there is no source rect hint to enter PiP use bounds
|
// We use content overlay when there is no source rect hint to enter PiP use bounds
|
||||||
// animation.
|
// 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(
|
if (SystemProperties.getBoolean(
|
||||||
"persist.wm.debug.enable_pip_app_icon_overlay", true)) {
|
"persist.wm.debug.enable_pip_app_icon_overlay", true)
|
||||||
|
&& hasTopActivityInfo) {
|
||||||
animator.setAppIconContentOverlay(
|
animator.setAppIconContentOverlay(
|
||||||
mContext, currentBounds, taskInfo.topActivityInfo);
|
mContext, currentBounds, taskInfo.topActivityInfo);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user