From c9c9a48e7bafae63cb35a9aa69255e80aba83988 Mon Sep 17 00:00:00 2001 From: Svetoslav Ganov Date: Mon, 16 Jul 2012 08:46:07 -0700 Subject: Removing a workaround for incorrect window position on window move. 1. The window manager was not notifying a window when the latter has been moved. This was causing incorrect coordinates of the nodes reported to accessibility services. To workaround that we have carried the correct window location when making a call from the accessibility layer into a window. Now the window manager notifies the window when it is moved and the workaround is no longer needed. This change takes it out. 2. The left and right in the attach info were not updated properly after a report that the window has moved. 3. The accessibility manager service was calling directly methods on the window manager service without going through the interface of the latter. This leads to unnecessary coupling and in the long rung increases system complexity and reduces maintability. bug:6623031 Change-Id: Iacb734b1bf337a47fad02c827ece45bb2f53a79d --- .../bridge/android/BridgeWindowManager.java | 30 ++++++++++++++++++---- 1 file changed, 25 insertions(+), 5 deletions(-) (limited to 'tools/layoutlib') diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeWindowManager.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeWindowManager.java index 8ab875f..3e56b60 100644 --- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeWindowManager.java +++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeWindowManager.java @@ -23,6 +23,7 @@ import android.content.res.CompatibilityInfo; import android.content.res.Configuration; import android.graphics.Bitmap; import android.graphics.Point; +import android.graphics.Rect; import android.os.IBinder; import android.os.IRemoteCallback; import android.os.RemoteException; @@ -31,15 +32,11 @@ import android.view.Display; import android.view.Display_Delegate; import android.view.Gravity; import android.view.IApplicationToken; +import android.view.IInputFilter; import android.view.IOnKeyguardExitResult; import android.view.IRotationWatcher; import android.view.IWindowManager; import android.view.IWindowSession; -import android.view.InputChannel; -import android.view.InputDevice; -import android.view.InputEvent; -import android.view.KeyEvent; -import android.view.MotionEvent; import java.util.List; @@ -455,4 +452,27 @@ public class BridgeWindowManager implements IWindowManager { public void lockNow() { // TODO Auto-generated method stub } + + @Override + public IBinder getFocusedWindowToken() { + // TODO Auto-generated method stub + return null; + } + + @Override + public boolean getWindowFrame(IBinder token, Rect outBounds) { + // TODO Auto-generated method stub + return false; + } + + @Override + public float getWindowCompatibilityScale(IBinder windowToken) throws RemoteException { + // TODO Auto-generated method stub + return 0; + } + + @Override + public void setInputFilter(IInputFilter filter) throws RemoteException { + // TODO Auto-generated method stub + } } -- cgit v1.1