Add Null check when excluding IME window surface for snapshot
TaskSnapshotController.createTaskSnapshot crashes when initializing SurfaceControl$LayerCaptureArgs for excluding NULL IME window surface control. As SurfaceControl#nativeCaptureLayers specified the elements in excludeLayers array should be non-null, Add a null check before adding excludeLayers when calling SurfaceControl.captureLayersExcluding to fix the crash issue. Fix: 174504297 Test: atest WmTests:TaskSnapshotControllerTest#\ testCreateTaskSnapshotWithExcludingIme Change-Id: Ie6fa7aa4ac61fc49a6235882d700e1e4d8437666
Loading
Please register or sign in to comment