Fix bogus warning in startResizingTask

win will be null if no window is found for resizing which is normal.

bug: 24814867
Change-Id: I16fc55af62b8f90643a3e85ca6d741db92fae958
This commit is contained in:
Chong Zhang
2015-10-12 11:58:19 -07:00
parent c8b71bec12
commit fe98b064bc

View File

@@ -6875,6 +6875,8 @@ public class WindowManagerService extends IWindowManager.Stub
WindowState win = null;
synchronized (mWindowMap) {
win = windowForClientLocked(null, window, false);
// win shouldn't be null here, pass it down to startPositioningLocked
// to get warning if it's null.
if (!startPositioningLocked(win, false /*resize*/, startX, startY)) {
return false;
}
@@ -6889,7 +6891,7 @@ public class WindowManagerService extends IWindowManager.Stub
WindowState win = null;
synchronized (mWindowMap) {
win = displayContent.findWindowForControlPoint(startX, startY);
if (!startPositioningLocked(win, true /*resize*/, startX, startY)) {
if (win == null || !startPositioningLocked(win, true /*resize*/, startX, startY)) {
return;
}
}