Check null taskInfo for occlude transitions

KeyguardService.wrap() is liberal with what it counts as an "app". The
first item in the apps list might not have a taskInfo if it's not a
Task, which causes a crash when unlocking the device for the first time.

Change-Id: I479b05a5da896a166a375d30fdf050dc87448f3c
Test: atest android.platform.test.scenario.sysui.lockscreen
Bug: 274954192
This commit is contained in:
Robin Lee
2023-05-12 09:05:01 +00:00
parent 6593d03bc6
commit 94d9200101

View File

@@ -1003,7 +1003,8 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable,
}
final RemoteAnimationTarget primary = apps[0];
final boolean isDream = (apps[0].taskInfo.topActivityType
final boolean isDream = (apps[0].taskInfo != null
&& apps[0].taskInfo.topActivityType
== WindowConfiguration.ACTIVITY_TYPE_DREAM);
if (!isDream) {
Log.w(TAG, "The occluding app isn't Dream; "
@@ -1103,7 +1104,8 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable,
}
final RemoteAnimationTarget primary = apps[0];
final boolean isDream = (apps[0].taskInfo.topActivityType
final boolean isDream = (apps[0].taskInfo != null
&& apps[0].taskInfo.topActivityType
== WindowConfiguration.ACTIVITY_TYPE_DREAM);
final SyncRtSurfaceTransactionApplier applier =