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

Skip to content
Commit 2d44a29f authored by Tiger's avatar Tiger
Browse files

Refine equals of both InsetsState and WindowInsets

InsetsState:
It had logic errors in InsetsState#equals while excludesCaptionBar or
excludesInvisibleIme is true. For example, if the last source in one
InsetsState.mSources is captionBar() or ime(), but the other one doesn't
have a source of the same type, the type of source won't be excluded,
which make it always returns false, regardless of excludesCaptionBar or
excludesInvisibleIme.

WindowInsets:
Two WindowInsets could be considered as non-equal while they provide the
same insets of each type from WindowInsets#getInsets if one WindowInsets
has Insets.NONE for a type and the other one has null for the same type.

This CL fixes both problems.

Fix: 284406283
Test: OnApplyWindowInsetsListenerTest
Test: atest InsetsStateTest
Change-Id: I31b078737def461bd51eab9bb1114307a8ab994f
parent bb33d7cb
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