Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 5b15d13d authored by Massimo Carli's avatar Massimo Carli
Browse files

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
parent 5480a55e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment