Merge "Fix a NPE in InputMonitor#updateInputFocusRequest" into udc-dev

This commit is contained in:
Ming-Shin Lu
2023-05-13 00:39:13 +00:00
committed by Android (Google) Code Review

View File

@@ -439,7 +439,9 @@ final class InputMonitor {
? mDisplayContent.getImeInputTarget().getActivityRecord() : null; ? mDisplayContent.getImeInputTarget().getActivityRecord() : null;
if (app != null) { if (app != null) {
mDisplayContent.removeImeSurfaceImmediately(); mDisplayContent.removeImeSurfaceImmediately();
mDisplayContent.mAtmService.takeTaskSnapshot(app.getTask().mTaskId); if (app.getTask() != null) {
mDisplayContent.mAtmService.takeTaskSnapshot(app.getTask().mTaskId);
}
} }
} else { } else {
// Disable IME icon explicitly when IME attached to the app in case // Disable IME icon explicitly when IME attached to the app in case