From 37fba99340f6aa31661a964cf833ad99ff5ec00e Mon Sep 17 00:00:00 2001 From: Siarhei Vishniakou Date: Thu, 3 Dec 2020 14:50:50 -1000 Subject: [PATCH] Remove portalToDisplayId from InputWindowHandle All of the existing users have already moved off of virtual displays. There are no more users of this functionality. Bug: 167946720 Test: compile only Change-Id: I8e602b781227c9ad18c933f4ed77cdc2f21efbb0 --- core/java/android/view/InputWindowHandle.java | 6 ------ core/jni/android_hardware_input_InputWindowHandle.cpp | 6 ------ .../core/java/com/android/server/wm/DisplayContent.java | 1 - .../core/java/com/android/server/wm/InputMonitor.java | 2 -- .../com/android/server/wm/InputWindowHandleWrapper.java | 8 -------- 5 files changed, 23 deletions(-) diff --git a/core/java/android/view/InputWindowHandle.java b/core/java/android/view/InputWindowHandle.java index 5a34a92a4b1a0..9aa54dabc93f6 100644 --- a/core/java/android/view/InputWindowHandle.java +++ b/core/java/android/view/InputWindowHandle.java @@ -16,8 +16,6 @@ package android.view; -import static android.view.Display.INVALID_DISPLAY; - import android.annotation.Nullable; import android.graphics.Region; import android.os.IBinder; @@ -101,10 +99,6 @@ public final class InputWindowHandle { // Display this input is on. public int displayId; - // If this value is set to a valid display ID, it indicates this window is a portal which - // transports the touch of this window to the display indicated by portalToDisplayId. - public int portalToDisplayId = INVALID_DISPLAY; - /** * Crops the touchable region to the bounds of the surface provided. * diff --git a/core/jni/android_hardware_input_InputWindowHandle.cpp b/core/jni/android_hardware_input_InputWindowHandle.cpp index 463d909821b14..6283f7fc630a7 100644 --- a/core/jni/android_hardware_input_InputWindowHandle.cpp +++ b/core/jni/android_hardware_input_InputWindowHandle.cpp @@ -66,7 +66,6 @@ static struct { jfieldID packageName; jfieldID inputFeatures; jfieldID displayId; - jfieldID portalToDisplayId; jfieldID replaceTouchableRegionWithCrop; WeakRefHandleField touchableRegionSurfaceControl; } gInputWindowHandleClassInfo; @@ -163,8 +162,6 @@ bool NativeInputWindowHandle::updateInfo() { env->GetIntField(obj, gInputWindowHandleClassInfo.inputFeatures)); mInfo.displayId = env->GetIntField(obj, gInputWindowHandleClassInfo.displayId); - mInfo.portalToDisplayId = env->GetIntField(obj, - gInputWindowHandleClassInfo.portalToDisplayId); jobject inputApplicationHandleObj = env->GetObjectField(obj, gInputWindowHandleClassInfo.inputApplicationHandle); @@ -348,9 +345,6 @@ int register_android_view_InputWindowHandle(JNIEnv* env) { GET_FIELD_ID(gInputWindowHandleClassInfo.displayId, clazz, "displayId", "I"); - GET_FIELD_ID(gInputWindowHandleClassInfo.portalToDisplayId, clazz, - "portalToDisplayId", "I"); - GET_FIELD_ID(gInputWindowHandleClassInfo.replaceTouchableRegionWithCrop, clazz, "replaceTouchableRegionWithCrop", "Z"); diff --git a/services/core/java/com/android/server/wm/DisplayContent.java b/services/core/java/com/android/server/wm/DisplayContent.java index 9195b1043e9c6..08341712098f9 100644 --- a/services/core/java/com/android/server/wm/DisplayContent.java +++ b/services/core/java/com/android/server/wm/DisplayContent.java @@ -5364,7 +5364,6 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp portalWindowHandle.scaleFactor = 1f; portalWindowHandle.ownerPid = Process.myPid(); portalWindowHandle.ownerUid = Process.myUid(); - portalWindowHandle.portalToDisplayId = mDisplayId; return portalWindowHandle; } diff --git a/services/core/java/com/android/server/wm/InputMonitor.java b/services/core/java/com/android/server/wm/InputMonitor.java index 8c781a13f7db3..eb5ab83756ef4 100644 --- a/services/core/java/com/android/server/wm/InputMonitor.java +++ b/services/core/java/com/android/server/wm/InputMonitor.java @@ -18,7 +18,6 @@ package com.android.server.wm; import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN; import static android.os.Trace.TRACE_TAG_WINDOW_MANAGER; -import static android.view.Display.INVALID_DISPLAY; import static android.view.WindowManager.INPUT_CONSUMER_PIP; import static android.view.WindowManager.INPUT_CONSUMER_RECENTS_ANIMATION; import static android.view.WindowManager.INPUT_CONSUMER_WALLPAPER; @@ -617,7 +616,6 @@ final class InputMonitor { inputWindowHandle.setScaleFactor(1f); inputWindowHandle.setLayoutParamsFlags( FLAG_NOT_TOUCH_MODAL | FLAG_NOT_TOUCHABLE | FLAG_NOT_FOCUSABLE); - inputWindowHandle.setPortalToDisplayId(INVALID_DISPLAY); inputWindowHandle.clearTouchableRegion(); inputWindowHandle.setTouchableRegionCrop(null); } diff --git a/services/core/java/com/android/server/wm/InputWindowHandleWrapper.java b/services/core/java/com/android/server/wm/InputWindowHandleWrapper.java index 7a4d13c2d6975..b4e11ff77cb3c 100644 --- a/services/core/java/com/android/server/wm/InputWindowHandleWrapper.java +++ b/services/core/java/com/android/server/wm/InputWindowHandleWrapper.java @@ -223,14 +223,6 @@ class InputWindowHandleWrapper { mChanged = true; } - void setPortalToDisplayId(int displayId) { - if (mHandle.portalToDisplayId == displayId) { - return; - } - mHandle.portalToDisplayId = displayId; - mChanged = true; - } - void setFrame(int left, int top, int right, int bottom) { if (mHandle.frameLeft == left && mHandle.frameTop == top && mHandle.frameRight == right && mHandle.frameBottom == bottom) {