diff options
author | Craig Mautner <cmautner@google.com> | 2012-06-30 14:10:16 -0700 |
---|---|---|
committer | Craig Mautner <cmautner@google.com> | 2012-06-30 14:10:16 -0700 |
commit | 5702d4dfb5b81491f873a3617f8d8fc8dc5279e6 (patch) | |
tree | e9e9a95db55f1ee7ef8c3e9d5e807b083c53c59a /core/java/android/service/wallpaper | |
parent | 5af65850eaa92c53be37a6973603b1f1e4f02a43 (diff) | |
download | frameworks_base-5702d4dfb5b81491f873a3617f8d8fc8dc5279e6.zip frameworks_base-5702d4dfb5b81491f873a3617f8d8fc8dc5279e6.tar.gz frameworks_base-5702d4dfb5b81491f873a3617f8d8fc8dc5279e6.tar.bz2 |
Notify client side of window movement.
Add a one way method to notify Views that the window has moved
on the screen. Fixes issues arising from the IME popping up and
translating the window that uses it. Accessibility was left unaware
of these movements and was drawing the box around the wrong widgets.
Similarly PopupWindow used getLocationOnScreen to determine how
much screen real estate was above and below the anchor point to
determine where to put an anchored window.
Fixes bug 6623031.
Change-Id: I4731a94d5424c1ec77bf1729fba8fc9ea34cae46
Diffstat (limited to 'core/java/android/service/wallpaper')
-rw-r--r-- | core/java/android/service/wallpaper/WallpaperService.java | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/core/java/android/service/wallpaper/WallpaperService.java b/core/java/android/service/wallpaper/WallpaperService.java index 3e0942c..3b26af7 100644 --- a/core/java/android/service/wallpaper/WallpaperService.java +++ b/core/java/android/service/wallpaper/WallpaperService.java @@ -98,6 +98,7 @@ public abstract class WallpaperService extends Service { private static final int MSG_WALLPAPER_OFFSETS = 10020; private static final int MSG_WALLPAPER_COMMAND = 10025; private static final int MSG_WINDOW_RESIZED = 10030; + private static final int MSG_WINDOW_MOVED = 10035; private static final int MSG_TOUCH_EVENT = 10040; private Looper mCallbackLooper; @@ -259,7 +260,13 @@ public abstract class WallpaperService extends Service { reportDraw ? 1 : 0); mCaller.sendMessage(msg); } - + + @Override + public void moved(int newX, int newY) { + Message msg = mCaller.obtainMessageII(MSG_WINDOW_MOVED, newX, newY); + mCaller.sendMessage(msg); + } + @Override public void dispatchAppVisibility(boolean visible) { // We don't do this in preview mode; we'll let the preview @@ -290,7 +297,8 @@ public abstract class WallpaperService extends Service { } } } - + + @Override public void dispatchWallpaperCommand(String action, int x, int y, int z, Bundle extras, boolean sync) { synchronized (mLock) { @@ -1044,6 +1052,9 @@ public abstract class WallpaperService extends Service { mEngine.updateSurface(true, false, reportDraw); mEngine.doOffsetsChanged(true); } break; + case MSG_WINDOW_MOVED: { + // Do nothing. What does it mean for a Wallpaper to move? + } break; case MSG_TOUCH_EVENT: { boolean skip = false; MotionEvent ev = (MotionEvent)message.obj; |