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

Commit 4a70d725 authored by Riddle Hsu's avatar Riddle Hsu
Browse files

Always cancel insets animation if control target is gone

Otherwise if updateControlForTarget is called when consuming
mHasPendingPosition with mPendingControlTarget==null in
mSetControlPositionConsumer, there could be NPE that mControl
is set to null from notifyControlTargetChanged.

Besides, it is unnecessary to handle position by
mSetControlPositionConsumer if the control target is gone.
So simply cancel the animation rather than adding null check.

Fix: 433587055
Flag: EXEMPT bugfix
Test: InsetsSourceProviderTest#testUpdateControlForTarget
Change-Id: Ia8e34bc583278c691f053ea07f375a451854e789
parent 431671f1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment