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

Commit e39d4a15 authored by Antonio Kantek's avatar Antonio Kantek Committed by Automerger Merge Worker
Browse files

Merge "Return the default touch mode for dead displays" into udc-dev am:...

Merge "Return the default touch mode for dead displays" into udc-dev am: 7b8a655a am: c09be4f6 am: 9a76d796

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23004839



Change-Id: I0e18c8d8c17fc381a729f6ce38d633dddf4aa6da
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 9bb3f123 9a76d796
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -3922,15 +3922,17 @@ public class WindowManagerService extends IWindowManager.Stub

    /**
     * Returns the touch mode state for the display id passed as argument.
     *
     * This method will return the default touch mode state (represented by
     * {@code com.android.internal.R.bool.config_defaultInTouchMode}) if the display passed as
     * argument is no longer registered in {@RootWindowContainer}).
     */
    @Override  // Binder call
    public boolean isInTouchMode(int displayId) {
        synchronized (mGlobalLock) {
            final DisplayContent displayContent = mRoot.getDisplayContent(displayId);
            if (displayContent == null) {
                throw new IllegalStateException("Failed to retrieve the touch mode state for"
                        + "display {" + displayId + "}: display is not registered in "
                        + "WindowRootContainer");
                return mContext.getResources().getBoolean(R.bool.config_defaultInTouchMode);
            }
            return displayContent.isInTouchMode();
        }