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

Commit b3d18865 authored by Antonio Kantek's avatar Antonio Kantek
Browse files

Use try-finally in #hideSoftInputWithToken

Fix: 287045146
Test: atest CtsInputMethodTestCases
Change-Id: I47aa51d469956b911908bae4c1c308441f48dc05
parent e0f6c226
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -884,11 +884,14 @@ public class InputMethodService extends AbstractInputMethodService {
            mSystemCallingHideSoftInput = true;
            mCurHideInputToken = hideInputToken;
            mCurStatsToken = statsToken;
            try {
                hideSoftInput(flags, resultReceiver);
            } finally {
                mCurStatsToken = null;
                mCurHideInputToken = null;
                mSystemCallingHideSoftInput = false;
            }
        }

        /**
         * {@inheritDoc}