am 9d9ea05c: Merge "Fix drag bug." into jb-mr1-dev
* commit '9d9ea05cde56f6663f57925212c87860d1cbc1b2': Fix drag bug.
This commit is contained in:
@@ -71,12 +71,6 @@ class DragState {
|
|||||||
mFlags = flags;
|
mFlags = flags;
|
||||||
mLocalWin = localWin;
|
mLocalWin = localWin;
|
||||||
mNotifiedWindows = new ArrayList<WindowState>();
|
mNotifiedWindows = new ArrayList<WindowState>();
|
||||||
WindowState win = service.mWindowMap.get(token);
|
|
||||||
if (win != null) {
|
|
||||||
mDisplayContent = win.mDisplayContent;
|
|
||||||
} else {
|
|
||||||
Slog.e(WindowManagerService.TAG, "No window associated with token");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void reset() {
|
void reset() {
|
||||||
@@ -92,7 +86,11 @@ class DragState {
|
|||||||
mNotifiedWindows = null;
|
mNotifiedWindows = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
void register() {
|
/**
|
||||||
|
* @param displayContent The display parameters associated with the window being dragged.
|
||||||
|
*/
|
||||||
|
void register(DisplayContent displayContent) {
|
||||||
|
mDisplayContent = displayContent;
|
||||||
if (WindowManagerService.DEBUG_DRAG) Slog.d(WindowManagerService.TAG, "registering drag input channel");
|
if (WindowManagerService.DEBUG_DRAG) Slog.d(WindowManagerService.TAG, "registering drag input channel");
|
||||||
if (mClientChannel != null) {
|
if (mClientChannel != null) {
|
||||||
Slog.e(WindowManagerService.TAG, "Duplicate register of drag input channel");
|
Slog.e(WindowManagerService.TAG, "Duplicate register of drag input channel");
|
||||||
|
|||||||
@@ -280,7 +280,7 @@ final class Session extends IWindowSession.Stub
|
|||||||
// !!! FIXME: put all this heavy stuff onto the mH looper, as well as
|
// !!! FIXME: put all this heavy stuff onto the mH looper, as well as
|
||||||
// the actual drag event dispatch stuff in the dragstate
|
// the actual drag event dispatch stuff in the dragstate
|
||||||
|
|
||||||
mService.mDragState.register();
|
mService.mDragState.register(callingWin.mDisplayContent);
|
||||||
mService.mInputMonitor.updateInputWindowsLw(true /*force*/);
|
mService.mInputMonitor.updateInputWindowsLw(true /*force*/);
|
||||||
if (!mService.mInputManager.transferTouchFocus(callingWin.mInputChannel,
|
if (!mService.mInputManager.transferTouchFocus(callingWin.mInputChannel,
|
||||||
mService.mDragState.mServerChannel)) {
|
mService.mDragState.mServerChannel)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user