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

Commit d558f89a authored by Ming-Shin Lu's avatar Ming-Shin Lu
Browse files

Fix a NPE in InputMonitor#updateInputFocusRequest

..introduced by CL[1] that getTask() may null if the activity is
removing.

[1]: I71f397b93b9f94e9351ded8191676b1dfb249d9e

Fix: 282114478
Bug: 222064495
Test: all tests passed
Change-Id: Ie24370d4ae06a82e9e5ab4d0f728226cc11b8852
parent d83febad
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -439,8 +439,10 @@ final class InputMonitor {
                                ? mDisplayContent.getImeInputTarget().getActivityRecord() : null;
                        if (app != null) {
                            mDisplayContent.removeImeSurfaceImmediately();
                            if (app.getTask() != null) {
                                mDisplayContent.mAtmService.takeTaskSnapshot(app.getTask().mTaskId);
                            }
                        }
                    } else {
                        // Disable IME icon explicitly when IME attached to the app in case
                        // IME icon might flickering while swiping to the next app task still