summaryrefslogtreecommitdiff
path: root/libs/androidfw/misc.cpp
diff options
context:
space:
mode:
author Massimo Carli <mcarli@google.com> 2023-03-03 09:40:43 +0000
committer Massimo Carli <mcarli@google.com> 2023-03-06 17:52:29 +0000
commit5b15d13ddc47f5b25d2461bd2ac7fca7c774c161 (patch)
treef662031ca614c9fb78651d40c2989219d4f1e495 /libs/androidfw/misc.cpp
parent5480a55ea27a1208212c4698d39aa8d03aaeebcf (diff)
Prevent NullPointerException in ActivityRecord when in Size Compat Mode
When checking if a translucent activity strategy was in place we also checked if the current activity bounds was matching the bounds of the parent. When the translucent activities strategy is in place, ActivityRecord#matchParentBounds() can return true making LetterboxUiController#hasInheritedLetterboxBehavior return false. When this happens it's possible that ActivityRecord#getCompatDisplayInsets() returns null and then the NullPointerException. This CL also adds additional checks to prevent NullPointerException also reducing ActivityRecord#getCompatDisplayInsets() invocation using local variables. Fixes: 271427810 Test: Existing presubmit tests. Change-Id: I10591cd59057f7dc2e03653747bd541c66f23d4a
Diffstat (limited to 'libs/androidfw/misc.cpp')
0 files changed, 0 insertions, 0 deletions