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

Commit c4eb5b5e authored by Candice Lo's avatar Candice Lo Committed by Android (Google) Code Review
Browse files

Merge "Exclude input methods windows from EDT" into main

parents 3222bfba eb3d7d5c
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -106,6 +106,7 @@ import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY;
import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_STARTING;
import static android.view.WindowManager.LayoutParams.TYPE_BASE_APPLICATION;
import static android.view.WindowManager.LayoutParams.TYPE_INPUT_METHOD;
import static android.view.WindowManager.LayoutParams.TYPE_INPUT_METHOD_DIALOG;
import static android.view.WindowManager.LayoutParams.TYPE_STATUS_BAR_ADDITIONAL;
import static android.view.WindowManager.LayoutParams.TYPE_SYSTEM_ALERT;
import static android.view.WindowManager.LayoutParams.TYPE_TOAST;
@@ -2050,7 +2051,7 @@ public final class ViewRootImpl implements ViewParent,
                // properly configured dark theme are unaffected by force invert dark theme. For
                // self-declared light theme apps HWUI then performs its own "color area"
                // calculation to determine if the app actually renders with light colors.
                if (a.getBoolean(R.styleable.Theme_isLightTheme, false)) {
                if (!isInputWindow() && a.getBoolean(R.styleable.Theme_isLightTheme, false)) {
                    return ForceDarkType.FORCE_INVERT_COLOR_DARK;
                }
            }
@@ -2061,6 +2062,10 @@ public final class ViewRootImpl implements ViewParent,
        }
    }
    private boolean isInputWindow() {
        return mOrigWindowType == TYPE_INPUT_METHOD || mOrigWindowType == TYPE_INPUT_METHOD_DIALOG;
    }
    private boolean shouldApplyForceInvertDark() {
        if (!forceInvertColor()) {
            return false;