Skip to content
Commit 8260aebe authored by Ming-Shin Lu's avatar Ming-Shin Lu
Browse files

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
parent d1ea1214
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