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

Commit 531458f8 authored by Charles Chen's avatar Charles Chen Committed by Android (Google) Code Review
Browse files

Merge "[RESTRICT AUTOMERGE] Attempt to fix exception in IMS" into sc-v2-dev

parents b20b70ef 468f72f0
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -524,6 +524,7 @@ public class InputMethodService extends AbstractInputMethodService {
    private Handler mHandler;
    private boolean mImeSurfaceScheduledForRemoval;
    private ImsConfigurationTracker mConfigTracker = new ImsConfigurationTracker();
    private boolean mDestroyed;

    /**
     * An opaque {@link Binder} token of window requesting {@link InputMethodImpl#showSoftInput}
@@ -604,6 +605,11 @@ public class InputMethodService extends AbstractInputMethodService {
                Log.w(TAG, "The token has already registered, ignore this initialization.");
                return;
            }
            if (mDestroyed) {
                Log.i(TAG, "The InputMethodService has already onDestroyed()."
                    + "Ignore the initialization.");
                return;
            }
            Trace.traceBegin(TRACE_TAG_WINDOW_MANAGER, "IMS.initializeInternal");
            mConfigTracker.onInitialize(configChanges);
            mPrivOps.set(privilegedOperations);
@@ -1403,6 +1409,7 @@ public class InputMethodService extends AbstractInputMethodService {
    }

    @Override public void onDestroy() {
        mDestroyed = true;
        super.onDestroy();
        mRootView.getViewTreeObserver().removeOnComputeInternalInsetsListener(
                mInsetsComputer);