summaryrefslogtreecommitdiff
path: root/core/java/android/view/ViewRootImpl.java
diff options
context:
space:
mode:
authorVishnu Nair <vishnun@google.com>2019-11-07 15:33:20 -0800
committerVishnu Nair <vishnun@google.com>2019-11-07 15:54:27 -0800
commit5cf25319775616f88d59768bd9dd0753afd0359f (patch)
tree68482078dd710dab7c5f07a6ec9d9c56cabb8f74 /core/java/android/view/ViewRootImpl.java
parentf8a289110576dcff9c7486d8e4f80a85d9786f23 (diff)
Update input policy to handle embedded windows
ANR - If embedded windows are slow in handling inputs the system should blame the embedded app. PointerDownOutsideFocus - if a user taps outside the currently focused window onto an embedded window, treat it as if the host window was tapped. Rename blessInputSurface -> grantInputChannel and add a name to embedded windows. Bug: 134365580 Test: b WindowlessWmTest Test: atest CtsWindowManagerDeviceTestCases:WindowlessWmTests Change-Id: If88970cf6ce17669b41fec995535151a492fab12
Diffstat (limited to 'core/java/android/view/ViewRootImpl.java')
-rw-r--r--core/java/android/view/ViewRootImpl.java15
1 files changed, 13 insertions, 2 deletions
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java
index 85bf19f855bb..97adaf57f9b4 100644
--- a/core/java/android/view/ViewRootImpl.java
+++ b/core/java/android/view/ViewRootImpl.java
@@ -69,6 +69,7 @@ import android.os.Build;
import android.os.Bundle;
import android.os.Debug;
import android.os.Handler;
+import android.os.IBinder;
import android.os.Looper;
import android.os.Message;
import android.os.ParcelFileDescriptor;
@@ -1661,7 +1662,7 @@ public final class ViewRootImpl implements ViewParent,
return mBlastBufferQueue.getSurface();
}
-
+
private void setBoundsLayerCrop() {
// mWinFrame is already adjusted for surface insets. So offset it and use it as
// the cropping bounds.
@@ -7179,7 +7180,7 @@ public final class ViewRootImpl implements ViewParent,
if (mSurfaceControl.isValid()) {
if (USE_BLAST_BUFFERQUEUE == false) {
mSurface.copyFrom(mSurfaceControl);
- } else {
+ } else {
mSurface.transferFrom(getOrCreateBLASTSurface(
(int) (mView.getMeasuredWidth() * appScale + 0.5f),
(int) (mView.getMeasuredHeight() * appScale + 0.5f)));
@@ -8932,6 +8933,16 @@ public final class ViewRootImpl implements ViewParent,
}
/**
+ * @return Returns a token used to identify the windows input channel.
+ */
+ public IBinder getInputToken() {
+ if (mInputEventReceiver == null) {
+ return null;
+ }
+ return mInputEventReceiver.getToken();
+ }
+
+ /**
* Class for managing the accessibility interaction connection
* based on the global accessibility state.
*/