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

Skip to content
Commit 5f6cbca2 authored by Tiger Huang's avatar Tiger Huang
Browse files

Fix a NullPointerException caused by NEW_INSETS_MODE_FULL

InsetsSourceProvider.updateControlForTarget must be called while mWin
has the SurfaceControl. Otherwise, mAdapter will be cleared by
ControlAdapter.onAnimationCancelled. See
SurfaceAnimator.startAnimation.

This CL separates DisplayPolicy.prepareAddWindowLw into two parts:
1. Check if we can add a window to the system.
2. Apply policies on certain types of window.
We move the second part below mToken.addWindow. So the window has the
SurfaceControl while we set insets provider.

Bug: 118118435
Test: atest DisplayPolicyInsetsTests DisplayPolicyLayoutTests
Test: See if the system can be rebooted after entering the commands:
      adb root
      adb setprop persist.wm.new_insets 2
      adb reboot

Change-Id: I15c9a3ab49dee1c0f7009334adbd6fd1af8e0ba7
parent d211a321
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